aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bottone <nick@bottone.io>2023-12-12 22:48:02 -0500
committerNicholas Bottone <nick@bottone.io>2023-12-12 22:48:03 -0500
commit29785b8a928d464b46cb5c977adf100ee966be6b (patch)
tree47325e70764c2d09d4af78855399e836e0137062
parent647069c4d9151b8eed87240cc3ed7b664e5b5ec5 (diff)
Add gravity and velocity properties to SceneGlobalData and ScenePrimitive
-rw-r--r--src/utils/scenedata.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils/scenedata.h b/src/utils/scenedata.h
index e60d0f0..c6bae08 100644
--- a/src/utils/scenedata.h
+++ b/src/utils/scenedata.h
@@ -41,6 +41,7 @@ struct SceneGlobalData {
float kd; // Diffuse term
float ks; // Specular term
float kt; // Transparency; used for extra credit (refraction)
+ glm::vec4 gravity; // Acceleration due to gravity (as a 4d vector)
};
// Struct which contains raw parsed data fro a single light
@@ -80,8 +81,10 @@ struct SceneCameraData {
glm::vec4 pos;
glm::vec4 look;
glm::vec4 up;
+ glm::vec4 over;
float heightAngle; // The height angle of the camera in RADIANS
+ float depthAngle; // The depth angle of the camera in RADIANS
float aperture; // Only applicable for depth of field
float focalLength; // Only applicable for depth of field
@@ -157,6 +160,7 @@ struct ScenePrimitive {
PrimitiveType type;
SceneMaterial material;
std::string meshfile; // Used for triangle meshes
+ glm::vec4 velocity; // Current velocity of the primitive
};
// Struct which contains data for a transformation.