aboutsummaryrefslogtreecommitdiff
path: root/src/vec4ops/vec4ops.h
blob: f4f62f1ed17b9aa421ac614b333e24552a65f3e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// Created by Michael Foiani on 12/8/23.
//

#ifndef PROJECTS_RAY_VEC4OPS_H
#define PROJECTS_RAY_VEC4OPS_H

#include <glm/glm.hpp>
#include <vector>

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::vec4 transformDir4(glm::vec4 dir4, glm::mat4 transformDirectionMatrix);

    static glm::vec4 inverseTransformDir4(glm::vec4 dir4, glm::mat4 inverseTransformDirectionMatrix);

    static glm::mat4 getViewMatrix4(glm::vec4 upVector, glm::vec4 lookVector, glm::vec4 overVector);

    static glm::mat4 getRotationMatrix4(std::vector<float> anglesRadians);
};

#endif //PROJECTS_RAY_VEC4OPS_H