SSBM Decomp
Loading...
Searching...
No Matches
mtx.h
Go to the documentation of this file.
1#ifndef __MTX_H__
2#define __MTX_H__
3
4#include <platform.h>
5
6#include <dolphin/mtx/types.h>
7
8void C_MTXOrtho(Mtx44 m, f32 t, f32 b, f32 l, f32 r, f32 n, f32 f);
9void C_MTXPerspective(Mtx44 m, f32 fovY, f32 aspect, f32 n, f32 f);
11void C_MTXCopy(const Mtx src, Mtx dst);
12void C_MTXConcat(const Mtx a, const Mtx b, Mtx ab);
13void C_MTXConcatArray(const Mtx a, const Mtx* srcBase, Mtx* dstBase,
14 u32 count);
15void C_MTXTranspose(const Mtx src, Mtx xPose);
16void C_MTXFrustum(Mtx44 m, f32 t, f32 b, f32 l, f32 r, f32 n, f32 f);
17u32 C_MTXInverse(const Mtx src, Mtx inv);
18u32 C_MTXInvXpose(const Mtx src, Mtx invX);
19
21void PSMTXCopy(const Mtx src, Mtx dst);
22void PSMTXConcat(const Mtx a, const Mtx b, Mtx ab);
23void PSMTXConcatArray(const Mtx a, const Mtx* srcBase, Mtx* dstBase,
24 u32 count);
25void PSMTXTranspose(const Mtx src, Mtx xPose);
26u32 PSMTXInverse(const Mtx src, Mtx inv);
27u32 PSMTXInvXpose(const Mtx src, Mtx invX);
28
29#define MTXIdentity PSMTXIdentity
30#define MTXCopy PSMTXCopy
31#define MTXConcat PSMTXConcat
32#define MTXConcatArray PSMTXConcatArray
33#define MTXTranspose PSMTXTranspose
34#define MTXInverse PSMTXInverse
35#define MTXInvXpose PSMTXInvXpose
36
37void C_MTXQuat(Mtx m, const Quaternion* q);
38void C_MTXReflect(Mtx m, const Vec3* p, const Vec3* n);
39void C_MTXTrans(Mtx m, f32 xT, f32 yT, f32 zT);
40void C_MTXTransApply(const Mtx src, Mtx dst, f32 xT, f32 yT, f32 zT);
41void C_MTXScale(Mtx m, f32 xS, f32 yS, f32 zS);
42void C_MTXScaleApply(const Mtx src, Mtx dst, f32 xS, f32 yS, f32 zS);
43void C_MTXRotRad(Mtx m, char axis, f32 rad);
44void C_MTXRotTrig(Mtx m, char axis, f32 sinA, f32 cosA);
45void C_MTXRotAxisRad(Mtx m, const Vec3* axis, f32 rad);
46void C_MTXLookAt(Mtx m, Vec3* cam_pos, Vec3* up, Vec3* target);
47
48void PSMTXQuat(Mtx m, const Quaternion* q);
49void PSMTXReflect(Mtx m, const Vec3* p, const Vec3* n);
50void PSMTXTransApply(const Mtx src, Mtx dst, f32 xT, f32 yT, f32 zT);
51void PSMTXScaleApply(const Mtx src, Mtx dst, f32 xS, f32 yS, f32 zS);
52void PSMTXRotRad(Mtx m, char axis, f32 rad);
53void PSMTXRotTrig(Mtx m, char axis, f32 sinA, f32 cosA);
54void PSMTXRotAxisRad(Mtx m, const Vec3* axis, f32 rad);
55
56#define MTXQuat PSMTXQuat
57#define MTXReflect PSMTXReflect
58#define MTXTrans PSMTXTrans
59#define MTXTransApply PSMTXTransApply
60#define MTXScale PSMTXScale
61#define MTXScaleApply PSMTXScaleApply
62#define MTXRotRad PSMTXRotRad
63#define MTXRotTrig PSMTXRotTrig
64#define MTXRotAxisRad PSMTXRotAxisRad
65
66void PSMTXIdentity(Mtx m);
67void PSMTXTrans(Mtx m, f32 x_trans, f32 y_trans, f32 z_trans);
68void PSMTXScale(Mtx m, f32 x_scale, f32 y_scale, f32 z_scale);
69
70#define MTXLightPerspective C_MTXLightPerspective
71#define MTXLightFrustum C_MTXLightFrustum
72#define MTXLightOrtho C_MTXLightOrtho
73
74void C_MTXLightPerspective(Mtx m, f32 fov, f32 aspect, f32 x_scale,
75 f32 y_scale, f32 z_x_mult, f32 z_y_mult);
76void C_MTXLightFrustum(Mtx m, f32 top, f32 bottom, f32 left, f32 right,
77 f32 near, f32 x_scale, f32 y_scale, f32 z_x_mult,
78 f32 z_y_mult);
79void C_MTXLightOrtho(Mtx m, f32 top, f32 bottom, f32 left, f32 right,
80 f32 x_scale, f32 y_scale, f32 z_x_mult, f32 z_y_mult);
81
82#endif
f32 Mtx44[4][4]
Definition forward.h:9
f32 Mtx[3][4]
Definition forward.h:6
void C_MTXLightPerspective(Mtx m, f32 fov, f32 aspect, f32 x_scale, f32 y_scale, f32 z_x_mult, f32 z_y_mult)
u32 PSMTXInverse(const Mtx src, Mtx inv)
void C_MTXLightFrustum(Mtx m, f32 top, f32 bottom, f32 left, f32 right, f32 near, f32 x_scale, f32 y_scale, f32 z_x_mult, f32 z_y_mult)
void C_MTXConcat(const Mtx a, const Mtx b, Mtx ab)
void C_MTXCopy(const Mtx src, Mtx dst)
u32 C_MTXInvXpose(const Mtx src, Mtx invX)
u32 C_MTXInverse(const Mtx src, Mtx inv)
void C_MTXQuat(Mtx m, const Quaternion *q)
void C_MTXConcatArray(const Mtx a, const Mtx *srcBase, Mtx *dstBase, u32 count)
void C_MTXLightOrtho(Mtx m, f32 top, f32 bottom, f32 left, f32 right, f32 x_scale, f32 y_scale, f32 z_x_mult, f32 z_y_mult)
void C_MTXReflect(Mtx m, const Vec3 *p, const Vec3 *n)
void C_MTXIdentity(Mtx m)
void PSMTXScale(Mtx m, f32 x_scale, f32 y_scale, f32 z_scale)
void PSMTXIdentity(Mtx m)
void PSMTXRotRad(Mtx m, char axis, f32 rad)
void C_MTXTransApply(const Mtx src, Mtx dst, f32 xT, f32 yT, f32 zT)
void PSMTXTranspose(const Mtx src, Mtx xPose)
void C_MTXFrustum(Mtx44 m, f32 t, f32 b, f32 l, f32 r, f32 n, f32 f)
Definition mtx44.c:8
void PSMTXConcatArray(const Mtx a, const Mtx *srcBase, Mtx *dstBase, u32 count)
void C_MTXScaleApply(const Mtx src, Mtx dst, f32 xS, f32 yS, f32 zS)
void PSMTXConcat(const Mtx a, const Mtx b, Mtx ab)
u32 PSMTXInvXpose(const Mtx src, Mtx invX)
void PSMTXRotTrig(Mtx m, char axis, f32 sinA, f32 cosA)
void PSMTXRotAxisRad(Mtx m, const Vec3 *axis, f32 rad)
void PSMTXScaleApply(const Mtx src, Mtx dst, f32 xS, f32 yS, f32 zS)
void C_MTXPerspective(Mtx44 m, f32 fovY, f32 aspect, f32 n, f32 f)
Definition mtx44.c:41
void C_MTXRotAxisRad(Mtx m, const Vec3 *axis, f32 rad)
void PSMTXQuat(Mtx m, const Quaternion *q)
void C_MTXRotRad(Mtx m, char axis, f32 rad)
void PSMTXCopy(const Mtx src, Mtx dst)
void C_MTXRotTrig(Mtx m, char axis, f32 sinA, f32 cosA)
void C_MTXScale(Mtx m, f32 xS, f32 yS, f32 zS)
void C_MTXTrans(Mtx m, f32 xT, f32 yT, f32 zT)
void C_MTXOrtho(Mtx44 m, f32 t, f32 b, f32 l, f32 r, f32 n, f32 f)
Definition mtx44.c:72
void PSMTXTransApply(const Mtx src, Mtx dst, f32 xT, f32 yT, f32 zT)
void PSMTXTrans(Mtx m, f32 x_trans, f32 y_trans, f32 z_trans)
void C_MTXLookAt(Mtx m, Vec3 *cam_pos, Vec3 *up, Vec3 *target)
void PSMTXReflect(Mtx m, const Vec3 *p, const Vec3 *n)
void C_MTXTranspose(const Mtx src, Mtx xPose)
unsigned long u32
An unsigned 32-bit integer.
Definition platform.h:26
float f32
A 32-bit floating-point number.
Definition platform.h:62
Definition types.h:13
Definition ground.c:2466