diff options
Diffstat (limited to 'include/BH/Math/Mat4f.h')
| -rw-r--r-- | include/BH/Math/Mat4f.h | 136 |
1 files changed, 136 insertions, 0 deletions
diff --git a/include/BH/Math/Mat4f.h b/include/BH/Math/Mat4f.h new file mode 100644 index 0000000..2030433 --- /dev/null +++ b/include/BH/Math/Mat4f.h @@ -0,0 +1,136 @@ +#ifndef BH_MATH_MAT4F_H +#define BH_MATH_MAT4F_H + +#include "../Common.h" + + +void BH_Mat4fIdentity(float out[16]); + + + +void BH_Mat4fAdd(const float a[16], + const float b[16], + float out[16]); + + + +void BH_Mat4fSub(const float a[16], + const float b[16], + float out[16]); + + + +void BH_Mat4fMul(const float a[16], + const float b[16], + float out[16]); + + + +void BH_Mat4fScale(const float a[16], + float b, + float out[16]); + + + +void BH_Mat4fTranspose(const float in[16], + float out[16]); + + + +float BH_Mat4fTrace(const float in[16]); + + + +float BH_Mat4fDet(const float in[16]); + + + +int BH_Mat4fInverse(const float in[16], + float out[16]); + + + +void BH_Mat4fFromScale(float x, + float y, + float z, + float out[16]); + + + +void BH_Mat4fFromTranslation(float x, + float y, + float z, + float out[16]); + + + +void BH_Mat4fFromRotationX(float angle, + float out[16]); + + + +void BH_Mat4fFromRotationY(float angle, + float out[16]); + + + +void BH_Mat4fFromRotationZ(float angle, + float out[16]); + + + +void BH_Mat4fFromAxis(const float axis[3], + float angle, + float out[16]); + + + +void BH_Mat4fFromEuler(float roll, + float pitch, + float yaw, + float out[16]); + + + +void BH_Mat4fFromQuat4f(const float in[4], + float out[16]); + + + +void BH_Mat4fFromOrtho(float xMin, + float xMax, + float yMin, + float yMax, + float zMin, + float zMax, + float out[16]); + + + +void BH_Mat4fFromFrustum(float fov, + float aspect, + float zMin, + float zMax, + float out[16]); + + + +void BH_Mat4fFromLookAt(const float position[3], + const float at[3], + const float up[3], + float out[16]); + + + +void BH_Mat4fApplyVec4f(const float a[16], + const float b[4], + float out[4]); + + + +void BH_Mat4fApplyVec3f(const float a[16], + const float b[3], + float out[3]); + + +#endif /* BH_MATH_MAT4F */ |
