aboutsummaryrefslogtreecommitdiff
path: root/src/utils/scenedata.h
diff options
context:
space:
mode:
authorNicholas Bottone <nick@bottone.io>2023-12-08 13:52:22 -0500
committerNicholas Bottone <nick@bottone.io>2023-12-08 13:52:22 -0500
commit965859204890f980594f5fff1d20a46bb8606f55 (patch)
tree5f7da56bbd7beffe47ee43b091e1b92dc07461ff /src/utils/scenedata.h
parent7e02d29375e9d6a1bbea98dc6dca600730ab8ec3 (diff)
Update translation and scaling in SceneTransformation struct
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`.