Physics Simulation & Visualization Tool
0.1
A C++ physics simulation engine with real-time 3D visualization
Loading...
Searching...
No Matches
InstanceData.h
Go to the documentation of this file.
1
#pragma once
2
#include <glm/glm.hpp>
3
4
namespace
Rendering
{
17
struct
InstanceData
{
18
// Transform (locations 2-5)
19
glm::mat4
model
;
20
21
// Object identification (location 6)
22
uint32_t
objectID
;
23
24
// Visual properties (location 7)
25
glm::vec3
color
;
26
27
// Future fields can be added here:
28
29
// Default constructor
30
InstanceData
() :
model
(1.0f),
objectID
(0),
color
(1.0f, 1.0f, 1.0f) {}
31
32
// Convenience constructor for common use case
33
InstanceData
(
const
glm::mat4& m, uint32_t
id
,
const
glm::vec3& col = glm::vec3(1.0f))
34
:
model
(m),
objectID
(id),
color
(col) {}
35
};
36
}
Rendering
Definition
InstanceData.h:4
Rendering::InstanceData
Per-instance data for instanced rendering.
Definition
InstanceData.h:17
Rendering::InstanceData::color
glm::vec3 color
Definition
InstanceData.h:25
Rendering::InstanceData::objectID
uint32_t objectID
Definition
InstanceData.h:22
Rendering::InstanceData::InstanceData
InstanceData(const glm::mat4 &m, uint32_t id, const glm::vec3 &col=glm::vec3(1.0f))
Definition
InstanceData.h:33
Rendering::InstanceData::model
glm::mat4 model
Definition
InstanceData.h:19
Rendering::InstanceData::InstanceData
InstanceData()
Definition
InstanceData.h:30
src
graphics
core
InstanceData.h
Generated by
1.9.8