mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-25 17:54:15 +00:00
16b304d548
* split func_800473A0.s * split func_80051B3C.s * split func_80054478 * split func_8004B5A0, match a few functions * rename Matrix_TranslateThenRotateZYX to Matrix_RotateRPYf (#96) * rename Matrix_TranslateThenRotateZYX to Matrix_RotateRPYf * rename Matrix_RotateRPYf to Matrix_JointPosition * rename Matrix_RotateZYX to Matrix_RotateRPY * extract camera floats, and jump tables * decompile baby functions priv_wip wip * rename struct_80045714 to VecSph
71 lines
983 B
C
71 lines
983 B
C
#ifndef _Z64MATH_H_
|
|
#define _Z64MATH_H_
|
|
|
|
#include <ultra64.h>
|
|
|
|
#define VEC_SET(V,X,Y,Z) V.x=X;V.y=Y;V.z=Z
|
|
|
|
typedef struct {
|
|
f32 x, y;
|
|
} Vec2f;
|
|
|
|
typedef struct {
|
|
f32 x, y, z;
|
|
} Vec3f;
|
|
|
|
typedef struct {
|
|
s16 x, y, z;
|
|
} Vec3s;
|
|
|
|
typedef struct {
|
|
s32 x, y, z;
|
|
} Vec3i;
|
|
|
|
typedef struct {
|
|
Vec3s center;
|
|
s16 radius;
|
|
} Sphere16;
|
|
|
|
typedef struct {
|
|
Vec3f center;
|
|
f32 radius;
|
|
} Spheref;
|
|
|
|
|
|
typedef struct {
|
|
Vec3f normal;
|
|
f32 originDist;
|
|
} Plane;
|
|
|
|
typedef struct {
|
|
Vec3f vtx[3];
|
|
Plane plane;
|
|
} TriNorm; //size = 0x34
|
|
|
|
typedef struct {
|
|
s16 radius;
|
|
s16 height;
|
|
s16 yShift;
|
|
Vec3s pos;
|
|
} Cylinder16;
|
|
|
|
typedef struct {
|
|
f32 radius;
|
|
f32 height;
|
|
f32 yShift;
|
|
Vec3f pos;
|
|
} Cylinderf;
|
|
|
|
typedef struct {
|
|
Vec3f a;
|
|
Vec3f b;
|
|
} Linef;
|
|
|
|
// Defines a point in the spherical coordinate system
|
|
typedef struct {
|
|
f32 r; // radius
|
|
s16 phi; // polar (zenith) angle
|
|
s16 theta; // azimuthal angle
|
|
} VecSph;
|
|
|
|
#endif
|