aboutsummaryrefslogtreecommitdiff
path: root/src/utils/scenedata.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/scenedata.h')
-rw-r--r--src/utils/scenedata.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/utils/scenedata.h b/src/utils/scenedata.h
index 043b84d..e60d0f0 100644
--- a/src/utils/scenedata.h
+++ b/src/utils/scenedata.h
@@ -163,11 +163,13 @@ struct ScenePrimitive {
struct SceneTransformation {
TransformationType type;
- glm::vec3 translate; // Only applicable when translating. Defines t_x, t_y, and t_z, the amounts to translate by, along each axis.
- glm::vec3 scale; // Only applicable when scaling. Defines s_x, s_y, and s_z, the amounts to scale by, along each axis.
- glm::vec3 rotate; // Only applicable when rotating. Defines the axis of rotation; should be a unit vector.
+ glm::vec4 translate; // Only applicable when translating. Defines t_x, t_y, and t_z, the amounts to translate by, along each axis.
+ glm::vec4 scale; // Only applicable when scaling. Defines s_x, s_y, and s_z, the amounts to scale by, along each axis.
+ glm::vec3 rotate3; // Only applicable when rotating. Defines the axis of rotation (for the first 3 axis); should be a unit vector.
+ glm::vec3 rotateW; // Only applicable when rotating. Defines the axis of rotation (for the last 3 axis); should be a unit vector.
float angle; // Only applicable when rotating. Defines the angle to rotate by in RADIANS, following the right-hand rule.
glm::mat4 matrix; // Only applicable when transforming by a custom matrix. This is that custom matrix.
+ glm::vec4 matrixRight4d; // Only applicable when transforming by a custom matrix. This is the 4d translation vector appended to the right of the matrix.
};
// Struct which represents a node in the scene graph/tree, to be parsed by the student's `SceneParser`.