mirror of
https://github.com/zeldaret/ss
synced 2026-08-09 18:57:50 -04:00
74 lines
1.9 KiB
C
74 lines
1.9 KiB
C
#ifndef RVL_SDK_MTX_MTX_H
|
|
#define RVL_SDK_MTX_MTX_H
|
|
#include "common.h"
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef f32 Mtx[3][4];
|
|
typedef f32 Mtx44[4][4];
|
|
|
|
// do these belong in the sdk?
|
|
typedef f32 Mtx33[3][3];
|
|
typedef f32 Mtx23[2][3];
|
|
typedef f32 (*Mtx3P)[3];
|
|
typedef f32 (*MtxP)[4];
|
|
typedef const f32 (*CMtxP)[4];
|
|
typedef f32 QuaternionP[4];
|
|
|
|
typedef struct Vec {
|
|
f32 x, y, z;
|
|
} Vec;
|
|
|
|
typedef struct Vec2 {
|
|
f32 x, y;
|
|
} Vec2;
|
|
|
|
typedef struct Quaternion {
|
|
f32 x, y, z, w;
|
|
} Quaternion;
|
|
|
|
#define MTXIdentity PSMTXIdentity
|
|
#define MTXCopy PSMTXCopy
|
|
#define MTXConcat PSMTXConcat
|
|
#define MTXConcatArray PSMTXConcatArray
|
|
#define MTXInverse PSMTXInverse
|
|
#define MTXTranspose PSMTXTranspose
|
|
#define MTXInverse PSMTXInverse
|
|
#define MTXInvXpose PSMTXInvXpose
|
|
#define MTXRotRad PSMTXRotRad
|
|
#define MTXRotTrig PSMTXRotTrig
|
|
#define MTXRotAxisRad PSMTXRotAxisRad
|
|
#define MTXTrans PSMTXTrans
|
|
#define MTXTransApply PSMTXTransApply
|
|
#define MTXScale PSMTXScale
|
|
#define MTXScaleApply PSMTXScaleApply
|
|
#define MTXQuat PSMTXQuat
|
|
#define MTXReflect PSMTXReflect
|
|
|
|
void PSMTXIdentity(Mtx);
|
|
void PSMTXCopy(const Mtx, Mtx);
|
|
void PSMTXConcat(const Mtx, const Mtx, Mtx);
|
|
void PSMTXConcatArray(const Mtx, const Mtx, Mtx, u32);
|
|
void PSMTXTranspose(const Mtx, Mtx);
|
|
u32 PSMTXInverse(const Mtx, Mtx);
|
|
u32 PSMTXInvXpose(const Mtx, Mtx);
|
|
void PSMTXRotRad(Mtx, f32, char);
|
|
void PSMTXRotTrig(Mtx, f32, f32, char);
|
|
void PSMTXRotAxisRad(Mtx, const Vec *, f32);
|
|
void PSMTXTrans(Mtx, f32, f32, f32);
|
|
void PSMTXTransApply(const Mtx, Mtx, f32, f32, f32);
|
|
void PSMTXScale(Mtx, f32, f32, f32);
|
|
void PSMTXScaleApply(const Mtx, Mtx, f32, f32, f32);
|
|
void PSMTXQuat(Mtx, const Quaternion *);
|
|
|
|
void C_MTXLookAt(Mtx, const Vec *, const Vec *, const Vec *);
|
|
void C_MTXLightFrustum(Mtx, f32, f32, f32, f32, f32, f32, f32, f32, f32);
|
|
void C_MTXLightPerspective(Mtx, f32, f32, f32, f32, f32, f32);
|
|
void C_MTXLightOrtho(Mtx, f32, f32, f32, f32, f32, f32, f32, f32);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|