Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.
Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
31 lines
951 B
C
31 lines
951 B
C
#ifndef RAGNAROK_SOURCE_UTILITY_MATH_AFFINEMATRIX_H
|
|
#define RAGNAROK_SOURCE_UTILITY_MATH_AFFINEMATRIX_H
|
|
|
|
float ClientSin(float radians);
|
|
float ClientCos(float radians);
|
|
float ClientRadians(int degrees);
|
|
float ClientSine(int degrees);
|
|
float ClientCosine(int degrees);
|
|
|
|
struct AffineMatrix {
|
|
float values[12];
|
|
|
|
void Identity();
|
|
void SetXRotation(float radians);
|
|
void SetYRotation(float radians);
|
|
void SetZRotation(float radians);
|
|
void RotateX(float radians);
|
|
void RotateY(float radians);
|
|
void RotateZ(float radians);
|
|
void SetTranslation(float x, float y, float z);
|
|
void SetScale(float x, float y, float z);
|
|
void Scale(float x, float y, float z);
|
|
void Translate(const float* position);
|
|
void Compose(const AffineMatrix& first, const AffineMatrix& second);
|
|
void Inverse(const AffineMatrix& source);
|
|
void LookAt(const float* origin, const float* target, const float* up);
|
|
};
|
|
|
|
static_assert(sizeof(AffineMatrix) == 48);
|
|
|
|
#endif
|