Repository navigation
Expand file tree
/
Copy pathApplicationData.h
More file actions
42 lines (34 loc) · 1.5 KB
/
Copy pathApplicationData.h
File metadata and controls
42 lines (34 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* @file ApplicationData.h
* @brief This header file keeps user-provided application data (vertices, indices etc.).
* @author Mustafa Yemural (myemural)
* @date 09.09.2025
*
* Copyright (c) 2025 Mustafa Yemural - www.mustafayemural.com
* Released under the MIT License
* https://opensource.org/licenses/MIT
*/
#pragma once
#include <vector>
#include <glm/mat4x4.hpp>
#include "PrimitiveUtils.h"
#include "Vertex.h"
namespace examples::fundamentals::drawing_3d::basic_camera_control
{
#define NUM_CUBES 10
// Vertex Data for Cube
inline const std::vector vertices = common::utility::CreateCubeVertices<common::utility::VertexPos3Uv2>(1.0f);
// Index Data for Cube
inline const std::vector indices = common::utility::CreateCubeIndices();
// MVP Matrix (for Push Constants)
struct MvpData
{
glm::mat4 mvpMatrix;
};
// Model position vectors for cube
inline constexpr glm::vec3 modelPositions[NUM_CUBES] = {glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(-2.1f, 0.9f, -0.7f),
glm::vec3(0.6f, 2.7f, -1.5f), glm::vec3(-1.9f, -2.5f, 1.1f),
glm::vec3(2.5f, -0.4f, 1.6f), glm::vec3(-0.8f, 1.3f, -2.7f),
glm::vec3(1.9f, 0.3f, -1.8f), glm::vec3(-2.7f, -1.5f, 2.2f),
glm::vec3(0.4f, 1.6f, -0.9f), glm::vec3(-1.4f, -0.7f, 2.6f)};
} // namespace examples::fundamentals::drawing_3d::basic_camera_control