diff options
author | sotech117 <michael_foiani@brown.edu> | 2023-12-08 15:03:20 -0500 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2023-12-08 15:03:24 -0500 |
commit | 480c22ce9b50caad259e254d0127e99294b4c6ab (patch) | |
tree | 2edd19cfbf756aef0f9b2f1060ca458a5c27cd4f /src/vec4ops/vec4ops.h | |
parent | 3c39ba9ce8710332c87e713d0881fcc7a510b8f2 (diff) |
rename src directory for vec4ops
Diffstat (limited to 'src/vec4ops/vec4ops.h')
-rw-r--r-- | src/vec4ops/vec4ops.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/vec4ops/vec4ops.h b/src/vec4ops/vec4ops.h new file mode 100644 index 0000000..d1c3ac8 --- /dev/null +++ b/src/vec4ops/vec4ops.h @@ -0,0 +1,37 @@ +// +// Created by Michael Foiani on 12/8/23. +// + +#ifndef PROJECTS_RAY_VEC4OPS_H +#define PROJECTS_RAY_VEC4OPS_H + +#include <glm/glm.hpp> + +class Vec4Ops { +public: + + static glm::mat4 getRotationMatrix4XY(float angleRadians); + + static glm::mat4 getRotationMatrix4YZ(float angleRadians); + + static glm::mat4 getRotationMatrix4ZX(float angleRadians); + + static glm::mat4 getRotationMatrix4XW(float angleRadians); + + static glm::mat4 getRotationMatrix4YW(float angleRadians); + + static glm::mat4 getRotationMatrix4ZW(float angleRadians); + + static glm::vec4 transformPoint4(glm::vec4 point4, glm::mat4 transformDirectionMatrix, glm::vec4 translationPointVector); + + static glm::vec4 inverseTransformPoint4(glm::vec4 point4, glm::mat4 inverseTransformDirectionMatrix, + glm::vec4 inverseTranslationPointVector); + + static glm::vec4 cross4(glm::vec4 u, glm::vec4 v, glm::vec4 w); + + static glm::vec4 dot4(glm::vec4 u, glm::vec4 v); + + static glm::mat4 getViewMatrix4(glm::vec4 fromPoint, glm::vec4 toPoint, glm::vec4 upVector, glm::vec4 lookVector); +}; + +#endif //PROJECTS_RAY_VEC4OPS_H |