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
4namespace 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}
Per-instance data for instanced rendering.
InstanceData(const glm::mat4 &m, uint32_t id, const glm::vec3 &col=glm::vec3(1.0f))