//Matrix.h - [2020-04-13 11:57:47]
#ifndef _MATRIX_H_
#define _MATRIX_H_

#include "CFTTMatrix32.h"
#include "CFTTVector32.h"
#include "CFTTVector32x4.h"
#include "FTTGraphics.h"

//0011E2B4
void MatrixMultiply_Affine(CFTTMatrix32 *result, CFTTMatrix32 const*matrix1, CFTTMatrix32 const*matrix2);

//0011FE10
void VectorMatrixMultiply(CFTTVector32 *result, CFTTVector32 const *vector, CFTTMatrix32 const *matrix);

//00123934
void VectorMatrixMultiply(CFTTVector32 *result, CFTTMatrix32 const *matrix);

//0017CF04
void VectorMatrixMultiply_PerspectiveDivide(CFTTVector32 *result, CFTTVector32 const *vector, CFTTMatrix32 const *matrix);

//0018634C
void NormalMatrixMultiply(CFTTVector32 *result, CFTTVector32 const *vector, CFTTMatrix32 const *matrix);

//0019F088
void MatrixMultiply(CFTTMatrix32 *dst, CFTTMatrix32 const *matrix1, CFTTMatrix32 const *matrix2);

//001C622A
void VectorMatrixMultiply(CFTTVector32x4 *result, CFTTVector32x4 const *vector, CFTTMatrix32 const *matrix);

//00265F9E
CFTTMatrix32 MakeMatrix32Inverse(CFTTMatrix32 const &matrix);

//00265F78
CFTTMatrix32 MakeMatrix32Transpose(CFTTMatrix32 const &matrix);

//002018F8
void MatrixTranspose(CFTTMatrix32 *result, CFTTMatrix32 const*src);

//00265F52
CFTTMatrix32 MakeIdentityMatrix32();

//00266C06
CFTTVector32 FTTMatrix_GetColumn(CFTTMatrix32 const &a1, int a2);

//0018666C
float DotProduct(CFTTVector32 const &a1, CFTTVector32 const &a2);

//0011E8BE
float SquareMagnitude(CFTTVector32 const &a1);

//0011E7E4
CFTTVector32 Normalize(CFTTVector32 const &a1);

//0012354C
void NormalizeInPlace(CFTTVector32 &a1);

//0017D27C
CFTTVector32 CrossProduct(CFTTVector32 const &vec32_r1_arg, CFTTVector32 const &vec32_r2_arg);

//00266302
CFTTMatrix32 MakeXRotationMatrix32(float f_r0_arg);

//00266342
CFTTMatrix32 MakeYRotationMatrix32(float f_r0);

//002664FC
CFTTMatrix32 MakeVectorRotationMatrix32(CFTTVector32, float);

//002664AE
CFTTMatrix32 MakeScaleMatrix32(float);

//002665E4 //^_- 经过单元测试，功能正常
CFTTMatrix32 MakeOrientationMatrix32(CFTTVector32 const &a2, CFTTVector32 const *a3);

//002666C4 ^_^
CFTTMatrix32 MakeProjectionMatrix32(float a2, float a3, float a4, float a5, float a6, float a7, EScreenRotation a8, bool a9, bool a10);

//00266900 //^_-  经过单元测试，功能正常
CFTTMatrix32 MakeProjectionMatrixOrtho32(float a2, float a3, float a4, float a5, float a6, float a7, EScreenRotation a8, bool a9, bool a10);

//00266444
CFTTMatrix32 MakeTranslationMatrix32(float f1, float f2, float f3);

//00266476
CFTTMatrix32 MakeTranslationMatrix32(CFTTVector32 const&);

//002664D4
CFTTMatrix32 MakeScaleMatrix32(float, float, float);

//00266384
CFTTMatrix32 MakeZRotationMatrix32(float);

#endif  //_MATRIX_H_