mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Merge branch 'sys_math3d_bss' of https://github.com/Decompollaborate/mm into zret
This commit is contained in:
@@ -1114,101 +1114,6 @@ void CmpDma_LoadAllFiles(uintptr_t segmentVrom, void* dst, size_t size);
|
||||
void Check_ExpansionPak(void);
|
||||
void Check_RegionIsSupported(void);
|
||||
|
||||
f32 Math3D_Normalize(Vec3f* vec);
|
||||
s32 Math3D_PlaneVsLineSegClosestPoint(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB, f32 planeBC, f32 planeBDist, Vec3f* linePointA, Vec3f* linePointB, Vec3f* closestPoint);
|
||||
s32 func_80179798(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3, Vec3f* param_4, Vec3f* param_5, Vec3f* param_6);
|
||||
f32 func_80179A44(Vec3f* arg0, PosRot* arg1, Vec3f* arg2);
|
||||
void func_80179B34(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32* arg7, f32* arg8);
|
||||
// UNK_TYPE4 func_80179B94(f32 fParm1, f32 fParm2, f32 fParm5, f32 param_4, f32 param_5, f32 param_6, f32 param_7, f32 param_8, Vec3f* param_9);
|
||||
// void func_80179D74(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10);
|
||||
void Math3D_ScaleAndAdd(Vec3f* a, Vec3f* b, f32 scale, Vec3f* dst);
|
||||
void Math3D_Lerp(Vec3f* a, Vec3f* b, f32 t, Vec3f* dst);
|
||||
f32 Math3D_Parallel(Vec3f* a, Vec3f* b);
|
||||
s32 Math3D_AngleBetweenVectors(Vec3f* a, Vec3f* b, f32* angle);
|
||||
void func_80179F64(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3);
|
||||
s32 Math3D_XZBoundCheck(f32 xMin, f32 xMax, f32 zMin, f32 zMax, f32 x, f32 z);
|
||||
// void func_8017A09C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
|
||||
// void func_8017A1D0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
|
||||
s32 func_8017A304(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 z, f32 x, f32 chkDist);
|
||||
// UNK_TYPE4 func_8017A438(Vec3f* pfParm1, Vec3f* pfParm2, Vec3f* pfParm3, Vec3f* pfParm4, f32 param_5);
|
||||
f32 Math3D_XZLengthSquared(f32 x, f32 z);
|
||||
f32 Math3D_XZLength(f32 x, f32 z);
|
||||
f32 Math3D_XZDistanceSquared(f32 x1, f32 x2, f32 z1, f32 z2);
|
||||
f32 Math3D_XZDistance(f32 x1, f32 x2, f32 z1, f32 z2);
|
||||
f32 Math3D_LengthSquared(Vec3f* vec);
|
||||
f32 Math3D_Vec3fMagnitude(Vec3f* vec);
|
||||
f32 Math3D_Vec3fDistSq(Vec3f* a, Vec3f* b);
|
||||
f32 Math3D_Distance(Vec3f* a, Vec3f* b);
|
||||
f32 Math3D_DistanceS(Vec3s* s, Vec3f* f);
|
||||
f32 func_8017A7B8(f32* param_1, f32* param_2, f32 param_3, f32 param_4);
|
||||
f32 func_8017A7F8(f32* param_1, f32* param_2, f32 param_3, f32 param_4);
|
||||
f32 func_8017A838(f32* param_1, f32* param_2, f32 param_3, f32 param_4);
|
||||
void Math3D_CrossProduct(Vec3f* a, Vec3f* b, Vec3f* res);
|
||||
void Math3D_SurfaceNorm(Vec3f* a, Vec3f* b, Vec3f* c, Vec3f* res);
|
||||
u32 Math3D_PointRelativeToCubeFaces(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3);
|
||||
u32 Math3D_PointRelativeToCubeEdges(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3);
|
||||
u32 Math3D_PointRelativeToCubeVertices(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3);
|
||||
s32 Math3D_LineVsCube(Vec3f* min, Vec3f* max, Vec3f* a, Vec3f* b);
|
||||
// void func_8017B68C(void);
|
||||
void func_8017B7F8(Vec3f* arg0, s16 arg1, f32* arg2, f32* arg3, f32* arg4);
|
||||
void Math3D_UnitNormalVector(Vec3f* a, Vec3f* b, Vec3f* c, f32* normX, f32* normY, f32* normZ, f32* param_7);
|
||||
f32 Math3D_SignedDistanceFromPlane(f32 normX, f32 normY, f32 normZ, f32 d, Vec3f* position);
|
||||
// void func_8017B9D8(void);
|
||||
f32 Math3D_UDistPlaneToPos(f32 normX, f32 normY, f32 normZ, f32 d, Vec3f* position);
|
||||
f32 Math3D_DistPlaneToPos(f32 normX, f32 normY, f32 normZ, f32 d, Vec3f* position);
|
||||
s32 Math3D_TriChkPointParaYDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 y, f32 z, f32 unk, f32 chkDist, f32 ny);
|
||||
// void func_8017BD98(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
|
||||
// void func_8017BDE0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
s32 Math3D_TriChkPointParaYIntersectDist(Vec3f* a, Vec3f* b, Vec3f* c, f32 nx, f32 ny, f32 nz, f32 dist, f32 z, f32 x, f32* yIntersect, f32 chkDist);
|
||||
s32 Math3D_TriChkPointParaYIntersectInsideTri(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 chkDist);
|
||||
// void func_8017BF8C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
|
||||
s32 Math3D_TriChkLineSegParaYIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 y0, f32 y1);
|
||||
// void func_8017C17C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
|
||||
// void func_8017C1F0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8);
|
||||
s32 Math3D_TriChkPointParaYIntersectInsideTri2(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 chkDist);
|
||||
s32 Math3D_TriChkPointParaXDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 y, f32 z, f32 unk, f32 chkDist, f32 nx);
|
||||
// void func_8017C808(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
|
||||
s32 Math3D_TriChkPointParaXIntersect(Vec3f* a, Vec3f* b, Vec3f* c, f32 nx, f32 ny, f32 nz, f32 dist, f32 y, f32 z, f32* xIntersect);
|
||||
// void func_8017C904(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
|
||||
s32 Math3D_TriChkLineSegParaXIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 y, f32 z, f32* xIntersect, f32 x0, f32 x1);
|
||||
// void func_8017CB08(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
|
||||
s32 Math3D_TriChkLineSegParaZDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 y, f32 z, f32 unk, f32 chkDist, f32 nz);
|
||||
// void func_8017CEA8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
|
||||
s32 Math3D_TriChkPointParaZIntersect(Vec3f* a, Vec3f* b, Vec3f* c, f32 nx, f32 ny, f32 nz, f32 dist, f32 x, f32 y, f32* zIntersect);
|
||||
// void func_8017CFA4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
|
||||
s32 Math3D_TriChkLineSegParaZIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 x, f32 y, f32* zIntersect, f32 z0, f32 z1);
|
||||
// void func_8017D1AC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
|
||||
// void func_8017D220(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
s32 Math3D_LineSegVsPlane(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* linePointA, Vec3f* linePointB, Vec3f* intersect, s32 fromFront);
|
||||
// void func_8017D404(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
|
||||
void Math3D_TriSetCoords(TriNorm* tri, Vec3f* pointA, Vec3f* pointB, Vec3f* pointC);
|
||||
u32 Math3D_IsPointInSphere(Sphere16* sphere, Vec3f* point);
|
||||
s32 Math3D_PointDistToLine2D(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32* arg6, f32* arg7, f32* arg8); // returns boolean
|
||||
s32 func_8017D7C0(f32 x0, f32 y0, f32 x1, f32 y1, f32 x2, f32 y2, f32* lineLenSq);
|
||||
// void func_8017D814(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
// void func_8017D91C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
// void func_8017DA24(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
s32 Math3D_LineVsSph(Sphere16* sphere, LineSegment* line);
|
||||
void func_8017DD34(Sphere16* sphere, TriNorm* tri, Vec3f* pfParm3);
|
||||
s32 Math3D_ColSphereTri(Sphere16* sphere, TriNorm* tri, Vec3f* uParm3);
|
||||
// void func_8017E294(void);
|
||||
UNK_TYPE func_8017E350(UNK_PTR, Vec3f*, Vec3f*, Vec3f*, Vec3f*);
|
||||
s32 Math3D_ColCylinderTri(Cylinder16* cylinder, TriNorm* tri, Vec3f* pzParm3);
|
||||
// void func_8017F1A0(void);
|
||||
s32 Math3D_SphVsSph(Sphere16* sphere1, Sphere16* sphere2);
|
||||
s32 Math3D_ColSphereSphereIntersect(Sphere16* sphere1, Sphere16* sphere2, f32* intersectAmount);
|
||||
s32 Math3D_ColSphereSphereIntersectAndDistance(Sphere16* sphere1, Sphere16* sphere2, f32* intersectAmount, f32* dist);
|
||||
s32 Math3D_ColSphereCylinderDistance(Sphere16* sphere, Cylinder16* cylinder, f32* dist);
|
||||
s32 Math3D_ColSphereCylinderDistanceAndAmount(Sphere16* sphere, Cylinder16* cylinder, f32* dist, f32* intersectAmount);
|
||||
s32 Math3D_ColCylinderCylinderAmount(Cylinder16* cylinder1, Cylinder16* cylinder2, f32* intersectAmount);
|
||||
s32 Math3D_ColCylinderCylinderAmountAndDistance(Cylinder16* cylinder1, Cylinder16* cylinder2, f32* intersectAmount, f32* dist);
|
||||
s32 Math3d_ColTriTri(TriNorm* tri1, TriNorm* tri2, Vec3f* uParm3);
|
||||
s32 Math3D_XZInSphere(Sphere16* sphere, f32 x, f32 z);
|
||||
s32 Math3D_XYInSphere(Sphere16* sphere, f32 x, f32 y);
|
||||
s32 Math3D_YZInSphere(Sphere16* sphere, f32 y, f32 z);
|
||||
// void func_8017FB1C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
|
||||
// void func_8017FD44(void);
|
||||
|
||||
u64* SysUcode_GetUCodeBoot(void);
|
||||
size_t SysUcode_GetUCodeBootSize(void);
|
||||
u64* SysUcode_GetUCode(void);
|
||||
|
||||
@@ -84,9 +84,6 @@
|
||||
#define VTX_T(x, y, z, s, t, cr, cg, cb, a) \
|
||||
{ { x, y, z }, 0, { s, t }, { cr, cg, cb, a }, }
|
||||
|
||||
#define SQ(x) ((x) * (x))
|
||||
#define ABS(x) ((x) >= 0 ? (x) : -(x))
|
||||
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
|
||||
#define DECR(x) ((x) == 0 ? 0 : --(x))
|
||||
|
||||
//! checks min first
|
||||
|
||||
+2
-74
@@ -1617,14 +1617,14 @@ extern Vec3f D_801EDE20;
|
||||
extern Vec3f D_801EDE30;
|
||||
extern TriNorm D_801EDE40;
|
||||
extern TriNorm D_801EDE78;
|
||||
extern LineSegment D_801EDEB0;
|
||||
extern Linef D_801EDEB0;
|
||||
extern TriNorm D_801EDEC8;
|
||||
extern TriNorm D_801EDF00;
|
||||
extern Vec3f D_801EDF38;
|
||||
extern Vec3f D_801EDF48;
|
||||
extern TriNorm D_801EDF58;
|
||||
extern TriNorm D_801EDF90;
|
||||
extern LineSegment D_801EDFC8;
|
||||
extern Linef D_801EDFC8;
|
||||
extern Vec3f D_801EDFE0;
|
||||
extern Vec3f D_801EDFF0;
|
||||
extern TriNorm D_801EE000;
|
||||
@@ -1691,78 +1691,6 @@ extern GfxMasterList* gGfxMasterDL;
|
||||
extern u64* gAudioSPDataPtr;
|
||||
extern u32 gAudioSPDataSize;
|
||||
|
||||
extern Vec3f D_801FBBF0;
|
||||
extern LineSegment Math3D_ColSphereTri_line;
|
||||
extern Vec3f Math3D_ColSphereTri_point;
|
||||
// extern UNK_TYPE1 D_801FBC28;
|
||||
// extern UNK_TYPE1 D_801FBC2C;
|
||||
// extern UNK_TYPE1 D_801FBC30;
|
||||
// extern UNK_TYPE1 D_801FBC38;
|
||||
// extern UNK_TYPE1 D_801FBC3A;
|
||||
// extern UNK_TYPE1 D_801FBC3C;
|
||||
// extern UNK_TYPE1 D_801FBC3E;
|
||||
// extern UNK_TYPE1 D_801FBC40;
|
||||
// extern UNK_TYPE1 D_801FBC42;
|
||||
// extern UNK_TYPE1 D_801FBC44;
|
||||
// extern UNK_TYPE1 D_801FBC46;
|
||||
// extern UNK_TYPE1 D_801FBC48;
|
||||
// extern UNK_TYPE1 D_801FBC58;
|
||||
extern Vec3f Math3D_NormalVector_temp1;
|
||||
extern Vec3f Math3D_NormalVector_temp2;
|
||||
extern f32 D_801FBC8C;
|
||||
extern f32 D_801FBC90;
|
||||
extern f32 D_801FBC98;
|
||||
extern f32 D_801FBCA4;
|
||||
extern f32 D_801FBCAC;
|
||||
extern f32 D_801FBCB0;
|
||||
extern f32 D_801FBCB4;
|
||||
extern f32 D_801FBCB8;
|
||||
extern f32 D_801FBCBC;
|
||||
extern f32 D_801FBCC0;
|
||||
extern f32 D_801FBCC4;
|
||||
extern f32 D_801FBCC8;
|
||||
extern f32 D_801FBCCC;
|
||||
extern f32 D_801FBCD0;
|
||||
extern f32 D_801FBCD4;
|
||||
extern f32 D_801FBCD8;
|
||||
extern f32 D_801FBCDC;
|
||||
// extern UNK_TYPE1 D_801FBCE0;
|
||||
// extern UNK_TYPE1 D_801FBCE4;
|
||||
// extern UNK_TYPE1 D_801FBCE8;
|
||||
// extern UNK_TYPE1 D_801FBCF0;
|
||||
// extern UNK_TYPE1 D_801FBCF4;
|
||||
// extern UNK_TYPE1 D_801FBCF8;
|
||||
// extern UNK_TYPE1 D_801FBD00;
|
||||
// extern UNK_TYPE1 D_801FBD04;
|
||||
// extern UNK_TYPE1 D_801FBD08;
|
||||
// extern UNK_TYPE1 D_801FBD10;
|
||||
// extern UNK_TYPE1 D_801FBD20;
|
||||
// extern UNK_TYPE1 D_801FBD24;
|
||||
// extern UNK_TYPE1 D_801FBD28;
|
||||
// extern UNK_TYPE1 D_801FBD30;
|
||||
// extern UNK_TYPE1 D_801FBD34;
|
||||
// extern UNK_TYPE1 D_801FBD38;
|
||||
// extern UNK_TYPE1 D_801FBD40;
|
||||
// extern UNK_TYPE1 D_801FBD44;
|
||||
// extern UNK_TYPE1 D_801FBD48;
|
||||
// extern UNK_TYPE1 D_801FBD50;
|
||||
// extern UNK_TYPE1 D_801FBD54;
|
||||
// extern UNK_TYPE1 D_801FBD58;
|
||||
extern Vec3f Math3D_UnitNormalVector_temp;
|
||||
// extern UNK_TYPE1 D_801FBD70;
|
||||
// extern UNK_TYPE1 D_801FBD74;
|
||||
// extern UNK_TYPE1 D_801FBD78;
|
||||
extern Vec3f D_801FBD80[2];
|
||||
extern Vec3f D_801FBD98;
|
||||
extern Vec3f D_801FBDA4;
|
||||
// extern UNK_TYPE1 D_801FBDB0;
|
||||
// extern UNK_TYPE1 D_801FBDB4;
|
||||
// extern UNK_TYPE1 D_801FBDB8;
|
||||
// extern UNK_TYPE1 D_801FBDC0;
|
||||
// extern UNK_TYPE1 D_801FBDD8;
|
||||
// extern UNK_TYPE1 D_801FBDDC;
|
||||
// extern UNK_TYPE1 D_801FBDE0;
|
||||
extern Vec3f D_801FBDE8;
|
||||
extern MtxF* sMatrixStack;
|
||||
extern MtxF* sCurrentMatrix;
|
||||
|
||||
|
||||
+2
-2
@@ -2,6 +2,7 @@
|
||||
#define Z64CAMERA_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "z64math.h"
|
||||
#include "z64actor.h"
|
||||
#include "z64save.h"
|
||||
#include "unk.h"
|
||||
@@ -1193,8 +1194,7 @@ typedef struct {
|
||||
/* 0x00 */ Vec3f unk_00;
|
||||
/* 0x0C */ Vec3f unk_0C;
|
||||
/* 0x18 */ f32 unk_18;
|
||||
/* 0x1C */ Vec3f unk_1C;
|
||||
/* 0x28 */ Vec3f unk_28;
|
||||
/* 0x1C */ InfiniteLine unk_1C;
|
||||
/* 0x34 */ Vec3s unk_34;
|
||||
/* 0x3A */ s16 unk_3A;
|
||||
/* 0x3C */ s16 timer;
|
||||
|
||||
@@ -10,100 +10,100 @@ struct PlayState;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ struct Actor* actor; // Attached actor
|
||||
/* 0x04 */ struct Actor* at; // Actor attached to what it collided with as an AT collider.
|
||||
/* 0x08 */ struct Actor* ac; // Actor attached to what it collided with as an AC collider.
|
||||
/* 0x0C */ struct Actor* oc; // Actor attached to what it collided with as an OC collider.
|
||||
/* 0x10 */ u8 atFlags; // Information flags for AT collisions.
|
||||
/* 0x11 */ u8 acFlags; // Information flags for AC collisions.
|
||||
/* 0x12 */ u8 ocFlags1; // Information flags for OC collisions.
|
||||
/* 0x13 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
|
||||
/* 0x14 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
|
||||
/* 0x15 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
|
||||
/* 0x04 */ struct Actor* at; // Actor attached to what it collided with as an AT collider.
|
||||
/* 0x08 */ struct Actor* ac; // Actor attached to what it collided with as an AC collider.
|
||||
/* 0x0C */ struct Actor* oc; // Actor attached to what it collided with as an OC collider.
|
||||
/* 0x10 */ u8 atFlags; // Information flags for AT collisions.
|
||||
/* 0x11 */ u8 acFlags; // Information flags for AC collisions.
|
||||
/* 0x12 */ u8 ocFlags1; // Information flags for OC collisions.
|
||||
/* 0x13 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
|
||||
/* 0x14 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
|
||||
/* 0x15 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
|
||||
} Collider; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
|
||||
/* 0x1 */ u8 atFlags; // Information flags for AT collisions.
|
||||
/* 0x2 */ u8 acFlags; // Information flags for OC collisions.
|
||||
/* 0x0 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
|
||||
/* 0x1 */ u8 atFlags; // Information flags for AT collisions.
|
||||
/* 0x2 */ u8 acFlags; // Information flags for OC collisions.
|
||||
/* 0x3 */ u8 ocFlags1; // Information flags for OC collisions.
|
||||
/* 0x4 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
|
||||
/* 0x5 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
|
||||
/* 0x5 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
|
||||
} ColliderInit; // size = 0x6
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
|
||||
/* 0x1 */ u8 atFlags; // Information flags for AT collisions.
|
||||
/* 0x2 */ u8 acFlags; // Information flags for AC collisions.
|
||||
/* 0x0 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
|
||||
/* 0x1 */ u8 atFlags; // Information flags for AT collisions.
|
||||
/* 0x2 */ u8 acFlags; // Information flags for AC collisions.
|
||||
/* 0x3 */ u8 ocFlags1; // Information flags for OC collisions.
|
||||
/* 0x4 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
|
||||
/* 0x4 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
|
||||
} ColliderInitType1; // size = 0x5
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ struct Actor* actor; // Attached actor
|
||||
/* 0x4 */ u8 atFlags; // Information flags for AT collisions.
|
||||
/* 0x5 */ u8 acFlags; // Information flags for AC collisions.
|
||||
/* 0x6 */ u8 ocFlags1; // Information flags for OC collisions.
|
||||
/* 0x7 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
|
||||
/* 0x4 */ u8 atFlags; // Information flags for AT collisions.
|
||||
/* 0x5 */ u8 acFlags; // Information flags for AC collisions.
|
||||
/* 0x6 */ u8 ocFlags1; // Information flags for OC collisions.
|
||||
/* 0x7 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
|
||||
} ColliderInitToActor; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 dmgFlags; // Toucher damage type flags.
|
||||
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
|
||||
/* 0x5 */ u8 damage; // Damage or Stun Timer
|
||||
/* 0x0 */ u32 dmgFlags; // Toucher damage type flags.
|
||||
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
|
||||
/* 0x5 */ u8 damage; // Damage or Stun Timer
|
||||
} ColliderTouch; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 dmgFlags; // Toucher damage type flags.
|
||||
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
|
||||
/* 0x5 */ u8 damage; // Damage or Stun Timer
|
||||
/* 0x0 */ u32 dmgFlags; // Toucher damage type flags.
|
||||
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
|
||||
/* 0x5 */ u8 damage; // Damage or Stun Timer
|
||||
} ColliderTouchInit; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 dmgFlags; // Bumper damage type flags.
|
||||
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
|
||||
/* 0x5 */ u8 defense; // Damage Resistance
|
||||
/* 0x6 */ Vec3s hitPos; // Point of contact
|
||||
/* 0x0 */ u32 dmgFlags; // Bumper damage type flags.
|
||||
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
|
||||
/* 0x5 */ u8 defense; // Damage Resistance
|
||||
/* 0x6 */ Vec3s hitPos; // Point of contact
|
||||
} ColliderBump; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 dmgFlags; // Bumper exclusion mask
|
||||
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
|
||||
/* 0x5 */ u8 defense; // Damage Resistance
|
||||
/* 0x0 */ u32 dmgFlags; // Bumper exclusion mask
|
||||
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
|
||||
/* 0x5 */ u8 defense; // Damage Resistance
|
||||
} ColliderBumpInit; // size = 0x8
|
||||
|
||||
typedef struct ColliderInfo {
|
||||
/* 0x00 */ ColliderTouch toucher; // Damage properties when acting as an AT collider
|
||||
/* 0x08 */ ColliderBump bumper; // Damage properties when acting as an AC collider
|
||||
/* 0x14 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
|
||||
/* 0x15 */ u8 toucherFlags; // Information flags for AT collisions
|
||||
/* 0x16 */ u8 bumperFlags; // Information flags for AC collisions
|
||||
/* 0x17 */ u8 ocElemFlags; // Information flags for OC collisions
|
||||
/* 0x18 */ Collider* atHit; // object touching this element's AT collider
|
||||
/* 0x1C */ Collider* acHit; // object touching this element's AC collider
|
||||
/* 0x20 */ struct ColliderInfo* atHitInfo; // element that hit the AT collider
|
||||
/* 0x24 */ struct ColliderInfo* acHitInfo; // element that hit the AC collider
|
||||
/* 0x00 */ ColliderTouch toucher; // Damage properties when acting as an AT collider
|
||||
/* 0x08 */ ColliderBump bumper; // Damage properties when acting as an AC collider
|
||||
/* 0x14 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
|
||||
/* 0x15 */ u8 toucherFlags; // Information flags for AT collisions
|
||||
/* 0x16 */ u8 bumperFlags; // Information flags for AC collisions
|
||||
/* 0x17 */ u8 ocElemFlags; // Information flags for OC collisions
|
||||
/* 0x18 */ Collider* atHit; // object touching this element's AT collider
|
||||
/* 0x1C */ Collider* acHit; // object touching this element's AC collider
|
||||
/* 0x20 */ struct ColliderInfo* atHitInfo; // element that hit the AT collider
|
||||
/* 0x24 */ struct ColliderInfo* acHitInfo; // element that hit the AC collider
|
||||
} ColliderInfo; // size = 0x28
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
|
||||
/* 0x04 */ ColliderTouchInit toucher; // Damage properties when acting as an AT collider
|
||||
/* 0x0C */ ColliderBumpInit bumper; // Damage properties when acting as an AC collider
|
||||
/* 0x14 */ u8 toucherFlags; // Information flags for AT collisions
|
||||
/* 0x15 */ u8 bumperFlags; // Information flags for AC collisions
|
||||
/* 0x16 */ u8 ocElemFlags; // Information flags for OC collisions
|
||||
/* 0x00 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
|
||||
/* 0x04 */ ColliderTouchInit toucher; // Damage properties when acting as an AT collider
|
||||
/* 0x0C */ ColliderBumpInit bumper; // Damage properties when acting as an AC collider
|
||||
/* 0x14 */ u8 toucherFlags; // Information flags for AT collisions
|
||||
/* 0x15 */ u8 bumperFlags; // Information flags for AC collisions
|
||||
/* 0x16 */ u8 ocElemFlags; // Information flags for OC collisions
|
||||
} ColliderInfoInit; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Sphere16 modelSphere; // model space sphere
|
||||
/* 0x08 */ Sphere16 worldSphere; // world space sphere
|
||||
/* 0x10 */ f32 scale; // worldsphere = modelsphere * scale * 0.01
|
||||
/* 0x14 */ u8 limb; // attached limb
|
||||
/* 0x00 */ Sphere16 modelSphere; // model space sphere
|
||||
/* 0x08 */ Sphere16 worldSphere; // world space sphere
|
||||
/* 0x10 */ f32 scale; // worldsphere = modelsphere * scale * 0.01
|
||||
/* 0x14 */ u8 limb; // attached limb
|
||||
} ColliderJntSphElementDim; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 limb; // attached limb
|
||||
/* 0x2 */ Sphere16 modelSphere; // model space sphere
|
||||
/* 0xA */ s16 scale; // world space sphere = model * scale * 0.01
|
||||
/* 0x0 */ u8 limb; // attached limb
|
||||
/* 0x2 */ Sphere16 modelSphere; // model space sphere
|
||||
/* 0xA */ s16 scale; // world space sphere = model * scale * 0.01
|
||||
} ColliderJntSphElementDimInit; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
@@ -141,27 +141,27 @@ typedef struct {
|
||||
} ColliderJntSphInitToActor; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Collider base;
|
||||
/* 0x00 */ Collider base;
|
||||
/* 0x18 */ ColliderInfo info;
|
||||
/* 0x40 */ Cylinder16 dim;
|
||||
/* 0x40 */ Cylinder16 dim;
|
||||
} ColliderCylinder; // size = 0x4C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInit base;
|
||||
/* 0x00 */ ColliderInit base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x20 */ Cylinder16 dim;
|
||||
/* 0x20 */ Cylinder16 dim;
|
||||
} ColliderCylinderInit; // size = 0x2C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInitType1 base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x20 */ Cylinder16 dim;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x20 */ Cylinder16 dim;
|
||||
} ColliderCylinderInitType1; // size = 0x2C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInitToActor base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x20 */ Cylinder16 dim;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x20 */ Cylinder16 dim;
|
||||
} ColliderCylinderInitToActor; // size = 0x2C
|
||||
|
||||
typedef struct {
|
||||
@@ -170,7 +170,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInfo info;
|
||||
/* 0x28 */ TriNorm dim;
|
||||
/* 0x28 */ TriNorm dim;
|
||||
} ColliderTrisElement; // size = 0x5C
|
||||
|
||||
typedef struct {
|
||||
@@ -198,9 +198,9 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f quad[4];
|
||||
/* 0x30 */ Vec3s dcMid; // midpoint of vectors d, c
|
||||
/* 0x36 */ Vec3s baMid; // midpoint of vectors b, a
|
||||
/* 0x3C */ f32 acDist; // distance to nearest AC collision this frame.
|
||||
/* 0x30 */ Vec3s dcMid; // midpoint of vectors d, c
|
||||
/* 0x36 */ Vec3s baMid; // midpoint of vectors b, a
|
||||
/* 0x3C */ f32 acDist; // distance to nearest AC collision this frame.
|
||||
} ColliderQuadDim; // size = 0x40
|
||||
|
||||
typedef struct {
|
||||
@@ -208,50 +208,50 @@ typedef struct {
|
||||
} ColliderQuadDimInit; // size = 0x30
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Collider base;
|
||||
/* 0x18 */ ColliderInfo info;
|
||||
/* 0x00 */ Collider base;
|
||||
/* 0x18 */ ColliderInfo info;
|
||||
/* 0x40 */ ColliderQuadDim dim;
|
||||
} ColliderQuad; // size = 0x80
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInit base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x00 */ ColliderInit base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x20 */ ColliderQuadDimInit dim;
|
||||
} ColliderQuadInit; // size = 0x50
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInitType1 base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x00 */ ColliderInitType1 base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x20 */ ColliderQuadDimInit dim;
|
||||
} ColliderQuadInitType1; // size = 0x50
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Collider base;
|
||||
/* 0x00 */ Collider base;
|
||||
/* 0x18 */ ColliderInfo info;
|
||||
/* 0x40 */ ColliderJntSphElementDim dim;
|
||||
} ColliderSphere; // size = 0x58
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInit base;
|
||||
/* 0x00 */ ColliderInit base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x20 */ ColliderJntSphElementDimInit dim;
|
||||
} ColliderSphereInit; // size = 0x2C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ LineSegment line;
|
||||
/* 0x18 */ u16 ocFlags;
|
||||
/* 0x00 */ Linef line;
|
||||
/* 0x18 */ u16 ocFlags;
|
||||
} OcLine; // size = 0x1C
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ s16 colATCount;
|
||||
/* 0x002 */ u16 sacFlags; // Controls whether new collidors can be added or removed, or only swapped
|
||||
/* 0x000 */ s16 colATCount;
|
||||
/* 0x002 */ u16 sacFlags; // Controls whether new collidors can be added or removed, or only swapped
|
||||
/* 0x004 */ Collider* colAT[50];
|
||||
/* 0x0CC */ s32 colACCount;
|
||||
/* 0x0CC */ s32 colACCount;
|
||||
/* 0x0D0 */ Collider* colAC[60];
|
||||
/* 0x1C0 */ s32 colOCCount;
|
||||
/* 0x1C0 */ s32 colOCCount;
|
||||
/* 0x1C4 */ Collider* colOC[50];
|
||||
/* 0x28C */ s32 colLineCount;
|
||||
/* 0x290 */ OcLine* colLine[3];
|
||||
/* 0x28C */ s32 colLineCount;
|
||||
/* 0x290 */ OcLine* colLine[3];
|
||||
} CollisionCheckContext; // size = 0x29C
|
||||
|
||||
typedef struct {
|
||||
@@ -626,7 +626,7 @@ void CollisionCheck_SetHitEffects(struct PlayState* play, CollisionCheckContext*
|
||||
void CollisionCheck_AC(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* colAT);
|
||||
void CollisionCheck_AT(struct PlayState* play, CollisionCheckContext* colCtxt);
|
||||
s32 CollisionCheck_GetMassType(u8 mass);
|
||||
void CollisionCheck_SetOCvsOC(struct PlayState* play, Collider* left, ColliderInfo* leftInfo, Vec3f* leftPos, Collider* right, ColliderInfo* rightInfo, Vec3f* rightPos, f32 overlap);
|
||||
void CollisionCheck_SetOCvsOC(struct PlayState* play, Collider* left, ColliderInfo* leftInfo, Vec3f* leftPos, Collider* right, ColliderInfo* rightInfo, Vec3f* rightPos, f32 overlapSize);
|
||||
void CollisionCheck_OC_JntSphVsJntSph(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* l, Collider* r);
|
||||
void CollisionCheck_OC_JntSphVsCyl(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* l, Collider* r);
|
||||
void CollisionCheck_OC_JntSphVsSphere(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* l, Collider* r);
|
||||
|
||||
+101
-2
@@ -1,7 +1,7 @@
|
||||
#ifndef Z64MATH_H
|
||||
#define Z64MATH_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "PR/ultratypes.h"
|
||||
|
||||
#define VEC_SET(V,X,Y,Z) V.x=X;V.y=Y;V.z=Z
|
||||
|
||||
@@ -90,7 +90,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f a;
|
||||
/* 0x0C */ Vec3f b;
|
||||
} LineSegment; // size = 0x18
|
||||
} Linef; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ f32 r; // radius
|
||||
@@ -153,6 +153,10 @@ typedef union {
|
||||
|
||||
#define IS_ZERO(f) (fabsf(f) < 0.008f)
|
||||
|
||||
#define SQ(x) ((x) * (x))
|
||||
#define ABS(x) ((x) >= 0 ? (x) : -(x))
|
||||
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
|
||||
|
||||
// Casting a float to an integer, when the float value is larger than what the integer type can hold,
|
||||
// leads to undefined behavior. For example (f32)0x8000 doesn't fit in a s16, so it cannot be cast to s16.
|
||||
// This isn't an issue with IDO, but is one with for example GCC.
|
||||
@@ -258,4 +262,99 @@ f32 Math_Atan2F(f32 y, f32 x);
|
||||
s16 Math_Atan2S_XY(f32 x, f32 y);
|
||||
f32 Math_Atan2F_XY(f32 x, f32 y);
|
||||
|
||||
f32 Math3D_Normalize(Vec3f* vec);
|
||||
s32 Math3D_PlaneVsLineSegClosestPoint(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB, f32 planeBC, f32 planeBDist, Vec3f* linePointA, Vec3f* linePointB, Vec3f* closestPoint);
|
||||
s32 Math3D_LineSegMakePerpLineSeg(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB, Vec3f* lineAClosestToB, Vec3f* lineBClosestToA);
|
||||
f32 Math3D_LineClosestToPoint(InfiniteLine* line, Vec3f* pos, Vec3f* closestPoint);
|
||||
void Math3D_FindPointOnPlaneIntersect(float planeAAxis1Norm, f32 planeAAxis2Norm, f32 planeBAxis1Norm, f32 planeBAxis2Norm, f32 axis3Direction, f32 planeADist, f32 planeBDist, float* axis1Point, float* axis2Point);
|
||||
s32 Math3D_PlaneVsPlaneNewLine(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB, f32 planeBC, f32 planeBDist, InfiniteLine* intersect);
|
||||
s32 Math3D_PlaneVsPlaneVsLineClosestPoint(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB, f32 planeBC, f32 planeBDist, Vec3f* point, Vec3f* closestPoint);
|
||||
void Math3D_PointOnDirectedLine(Vec3f* v0, Vec3f* dir, f32 scale, Vec3f* ret);
|
||||
void Math3D_LineSplitRatio(Vec3f* v0, Vec3f* v1, f32 ratio, Vec3f* ret);
|
||||
f32 Math3D_Cos(Vec3f* a, Vec3f* b);
|
||||
s32 Math3D_CosOut(Vec3f* a, Vec3f* b, f32* dst);
|
||||
void Math3D_Vec3fReflect(Vec3f* vec, Vec3f* normal, Vec3f* reflVec);
|
||||
s32 Math3D_PointInSquare2D(f32 upperLeftX, f32 lowerRightX, f32 upperLeftY, f32 lowerRightY, f32 x, f32 y);
|
||||
s32 Math3D_CirSquareVsTriSquareXY(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 centerX, f32 centerY, f32 radius);
|
||||
s32 Math3D_CirSquareVsTriSquareYZ(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 centerY, f32 centerZ, f32 radius);
|
||||
s32 Math3D_CirSquareVsTriSquareZX(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 centerZ, f32 centerX, f32 radius);
|
||||
s32 Math3D_SphCubeVsTriCube(Vec3f* v0, Vec3f* v1, Vec3f* v2, Vec3f* center, f32 radius);
|
||||
f32 Math3D_Dist1DSq(f32 a, f32 b);
|
||||
f32 Math3D_Dist1D(f32 a, f32 b);
|
||||
f32 Math3D_Dist2DSq(f32 x0, f32 y0, f32 x1, f32 y1);
|
||||
f32 Math3D_Dist2D(f32 x0, f32 y0, f32 x1, f32 y1);
|
||||
f32 Math3D_Vec3fMagnitudeSq(Vec3f* vec);
|
||||
f32 Math3D_Vec3fMagnitude(Vec3f* vec);
|
||||
f32 Math3D_Vec3fDistSq(Vec3f* a, Vec3f* b);
|
||||
f32 Math3D_Vec3f_DistXYZ(Vec3f* a, Vec3f* b);
|
||||
f32 Math3D_DistXYZ16toF(Vec3s* a, Vec3f* b);
|
||||
f32 Math3D_Vec3fDiff_CrossZ(Vec3f* a, Vec3f* b, f32 dx, f32 dy);
|
||||
f32 Math3D_Vec3fDiff_CrossX(Vec3f* a, Vec3f* b, f32 dy, f32 dz);
|
||||
f32 Math3D_Vec3fDiff_CrossY(Vec3f* a, Vec3f* b, f32 dz, f32 dx);
|
||||
void Math3D_Vec3f_Cross(Vec3f* a, Vec3f* b, Vec3f* ret);
|
||||
void Math3D_SurfaceNorm(Vec3f* va, Vec3f* vb, Vec3f* vc, Vec3f* normal);
|
||||
s32 Math3D_PointRelativeToCubeFaces(Vec3f* point, Vec3f* min, Vec3f* max);
|
||||
s32 Math3D_PointRelativeToCubeEdges(Vec3f* point, Vec3f* min, Vec3f* max);
|
||||
s32 Math3D_PointRelativeToCubeVertices(Vec3f* point, Vec3f* min, Vec3f* max);
|
||||
s32 Math3D_LineVsCube(Vec3f* min, Vec3f* max, Vec3f* a, Vec3f* b);
|
||||
s32 Math3D_LineVsCubeShort(Vec3s* min, Vec3s* max, Vec3s* a, Vec3s* b);
|
||||
void Math3D_RotateXZPlane(Vec3f* pointOnPlane, s16 angle, f32* a, f32* c, f32* d);
|
||||
void Math3D_DefPlane(Vec3f* va, Vec3f* vb, Vec3f* vc, f32* nx, f32* ny, f32* nz, f32* originDist);
|
||||
f32 Math3D_PlaneF(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* pointOnPlane);
|
||||
f32 Math3D_Plane(Plane* plane, Vec3f* pointOnPlane);
|
||||
f32 Math3D_UDistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p);
|
||||
f32 Math3D_DistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p);
|
||||
s32 Math3D_TriChkPointParaYImpl(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 z, f32 x, f32 detMax, f32 chkDist, f32 ny);
|
||||
s32 Math3D_TriChkPointParaYDeterminate(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 z, f32 x, f32 detMax, f32 ny);
|
||||
s32 Math3D_TriChkPointParaYSlopedY(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 z, f32 x);
|
||||
s32 Math3D_TriChkPointParaYIntersectDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 chkDist);
|
||||
s32 Math3D_TriChkPointParaYIntersectInsideTri(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 chkDist);
|
||||
s32 Math3D_TriChkPointParaY(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 ny, f32 z, f32 x);
|
||||
s32 Math3D_TriChkLineSegParaYIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 y0, f32 y1);
|
||||
s32 Math3D_TriChkPointParaYDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, Plane* plane, f32 z, f32 x, f32 chkDist);
|
||||
s32 Math3D_TriChkPointParaYImplNoCheckRange(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 z, f32 x, f32 detMax, f32 chkDist, f32 ny);
|
||||
s32 Math3D_TriChkPointParaYNoRangeCheckIntersectInsideTri(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 chkDist);
|
||||
s32 Math3D_TriChkPointParaXImpl(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 y, f32 z, f32 detMax, f32 chkDist, f32 ny);
|
||||
s32 Math3D_TriChkPointParaXDeterminate(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 y, f32 z, f32 detMax, f32 nx);
|
||||
s32 Math3D_TriChkPointParaXIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 y, f32 z, f32* xIntersect);
|
||||
s32 Math3D_TriChkPointParaX(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 y, f32 z);
|
||||
s32 Math3D_TriChkLineSegParaXIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 y, f32 z, f32* xIntersect, f32 x0, f32 x1);
|
||||
s32 Math3D_TriChkLineSegParaXDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, Plane* plane, f32 y, f32 z, f32 chkDist);
|
||||
s32 Math3D_TriChkPointParaZImpl(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 x, f32 y, f32 detMax, f32 chkDist, f32 nz);
|
||||
s32 Math3D_TriChkPointParaZDeterminate(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 y, f32 z, f32 detMax, f32 nx);
|
||||
s32 Math3D_TriChkPointParaZIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 x, f32 y, f32* zIntersect);
|
||||
s32 Math3D_TriChkPointParaZ(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 y, f32 z);
|
||||
s32 Math3D_TriChkLineSegParaZIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 x, f32 y, f32* zIntersect, f32 z0, f32 z1);
|
||||
s32 Math3D_TriChkLineSegParaZDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, Plane* plane, f32 x, f32 y, f32 chkDist);
|
||||
s32 Math3D_LineSegFindPlaneIntersect(f32 pointADist, f32 pointBDist, Vec3f* pointA, Vec3f* pointB, Vec3f* intersect);
|
||||
s32 Math3D_LineSegVsPlane(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* linePointA, Vec3f* linePointB, Vec3f* intersect, s32 fromFront);
|
||||
s32 Math3D_TriLineIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* linePointA, Vec3f* linePointB, Vec3f* intersect, s32 fromFront) ;
|
||||
void Math3D_TriNorm(TriNorm* tri, Vec3f* va, Vec3f* vb, Vec3f* vc);
|
||||
s32 Math3D_PointInSph(Sphere16* sphere, Vec3f* point);
|
||||
s32 Math3D_PointDistSqToLine2DImpl(f32 x0, f32 y0, f32 x1, f32 y1, f32 x2, f32 y2, f32* perpXOut, f32* perpYOut, f32* lineLenSq); // returns boolean
|
||||
s32 Math3D_PointDistSqToLine2D(f32 x0, f32 y0, f32 x1, f32 y1, f32 x2, f32 y2, f32* lineLenSq);
|
||||
s32 Math3D_PointDistSqToLineXY(f32 x0, f32 y0, Vec3f* p1, Vec3f* p2, f32* lineLenSq);
|
||||
s32 Math3D_PointDistSqToLineYZ(f32 y0, f32 z0, Vec3f* p1, Vec3f* p2, f32* lineLenSq);
|
||||
s32 Math3D_PointDistSqToLineZX(f32 z0, f32 x0, Vec3f* p1, Vec3f* p2, f32* lineLenSq);
|
||||
s32 Math3D_LineVsSph(Sphere16* sphere, Linef* line);
|
||||
void Math3D_GetSphVsTriIntersectPoint(Sphere16* sphere, TriNorm* tri, Vec3f* intersectPoint);
|
||||
s32 Math3D_TriVsSphIntersect(Sphere16* sphere, TriNorm* tri, Vec3f* intersectPoint);
|
||||
s32 Math3D_PointInCyl(Cylinder16* cyl, Vec3f* point);
|
||||
s32 Math3D_CylVsLineSeg(Cylinder16* cyl, Vec3f* linePointA, Vec3f* linePointB, Vec3f* intersectA, Vec3f* intersectB);
|
||||
s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect);
|
||||
s32 Math3D_CylVsTri(Cylinder16* cyl, TriNorm* tri);
|
||||
s32 Math3D_SphVsSph(Sphere16* sphereA, Sphere16* sphereB);
|
||||
s32 Math3D_SphVsSphOverlap(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize);
|
||||
s32 Math3D_SphVsSphOverlapCenterDist(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize, f32* centerDist);
|
||||
s32 Math3D_SphVsCylOverlap(Sphere16* sph, Cylinder16* cyl, f32* overlapSize);
|
||||
s32 Math3D_SphVsCylOverlapCenterDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize, f32* centerDist);
|
||||
s32 Math3D_CylVsCylOverlap(Cylinder16* ca, Cylinder16* cb, f32* overlapSize);
|
||||
s32 Math3D_CylVsCylOverlapCenterDist(Cylinder16* ca, Cylinder16* cb, f32* overlapSize, f32* centerDist);
|
||||
s32 Math3D_TriVsTriIntersect(TriNorm* ta, TriNorm* tb, Vec3f* intersect);
|
||||
s32 Math3D_XZInSphere(Sphere16* sphere, f32 x, f32 z);
|
||||
s32 Math3D_XYInSphere(Sphere16* sphere, f32 x, f32 y);
|
||||
s32 Math3D_YZInSphere(Sphere16* sphere, f32 y, f32 z);
|
||||
s32 Math3D_CircleLineIntersections(f32 centreX, f32 centerY, f32 radius, f32 pointX, f32 pointY, f32 dirX, f32 dirY, f32* intersectAX, f32* intersectAY, f32* intersectBX, f32* intersectBY);
|
||||
void func_8017FD44(Vec3f* arg0, Vec3f* arg1, Vec3f* dst, f32 arg3);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user