mirror of
https://github.com/zeldaret/tp
synced 2026-05-23 15:01:53 -04:00
85ad8b190d
daBaseNpc_c::setBckAnm and J3DAnmTransform* daBaseNpc_c daBaseNpc_c::setBtpAnm daBaseNpc_c::attnSttsOn daBaseNpc_c::orderEvent daBaseNpc_c::setEnvTevColor daBaseNpc_c::setRoomNo daBaseNpc_c::checkEndAnm attempt CheckCreateHeap daNpcF_addIdx daNpcF_subIdx daNpcF_incIdx daNpcF_decIdx daNpcF_ActorMngr_c::initialize() daNpcF_ActorMngr_c::entry cleanup daNpcF_ActorMngr_c::entry daNpcF_ActorMngr_c::remove daNpcF_ActorMngr_c::getActorP daNpcF_MatAnm_c::calc attempt daNpcF_SPCurve_c::initialize minor fixes daNpcF_Path_c::initialize daNpcF_Path_c::setPathInfo daNpcF_Path_c::chkPassed daNpcF_Path_c::reverse daNpcF_Path_c::setNextIdx daNpcF_Path_c::getNextIdx daNpcF_Path_c::getBeforeIdx daNpcF_Path_c::getBeforePos daNpcF_Path_c::getNextPos daNpcT_MatAnm_c::initialize daNpcT_MatAnm_c::calc daNpcT_addIdx daNpcT_subIdx daNpcT_decIdx daNpcT_Path_c::hermite daNpcT_Path_c::initialize daNpcT_Path_c::setPathInfo attempt daNpcT_Path_c::setNextPathInfo daNpcT_Path_c::reverse daNpcT_Path_c::setNextIdx daNpcT_Path_c::getDstPos attempt daNpcT_DmgStagger_c::setParam Add FLOAT_LABEL where possible fopEn_enemy / fix e_wb move jasper's jsystem work over d_attention / d_demo / d_lib work remove asm clean up dolphin files / work on some rels (#212) * d_a_alldie / d_a_tboxSw / d_a_tag_gstart / d_a_tag_hstop * dolphin OS work / cleanup * dolphin GX work / cleanup * finish changing dolphin files to C * more files into C * match rest of MSL_C math functions * more dolphin files converted to C * remove asm * d_bg_w work * remove asm * d_a_alink work / kytag14 initial changes to d_a_e_yc checkpoint until virtual destructor issue is solved daNpcF_Lookat_c::adjustMoveDisAngle daBaseNpc_c::setMtx daBaseNpc_moveBgActor_c::daBaseNpc_moveBgActor_c() daNpcT_c::ctrlFaceMotion daNpcT_c::ctrlMsgAnm attempt daNpcT_c::initTalk daNpcF_clearMessageTmpBit daNpcF_getDistTableIdx daNpcF_offTmpBit daNpcF_onTmpBit daNpcF_chkTmpBit daNpcF_onEvtBit daNpcF_chkEvtBit daNpcF_c::getDistTableIdx daNpcF_chkPointInArea daNpcF_chkDoBtnEqSpeak daNpcF_getPlayerInfoFromPlayerList attempt daNpcF_pntVsLineSegmentLengthSquare2D daNpcF_c::chkPointInArea daNpcF_c::chkPointInArea daNpcF_c::getAttentionPos daNpcT_chkTmpBit daNpcT_offTmpBit daNpcT_onTmpBit daNpcT_chkEvtBit daNpcT_offEvtBit daNpcT_onEvtBit daNpcT_chkDoBtnIsSpeak daNpcT_getDistTableIdx daBaseNpc_acMngr_c::entry daNpcF_c::initTalk undo override
95 lines
4.8 KiB
C++
95 lines
4.8 KiB
C++
#ifndef C_M3D_H_
|
|
#define C_M3D_H_
|
|
|
|
#include "MSL_C/math.h"
|
|
#include "dolphin/types.h"
|
|
|
|
class cM3dGAab;
|
|
class cM3dGCps;
|
|
class cM3dGCyl;
|
|
class cM3dGLin;
|
|
class cM3dGPla;
|
|
class cM3dGSph;
|
|
class cM3dGTri;
|
|
class csXyz;
|
|
class cXyz;
|
|
|
|
struct cM3d_Range;
|
|
struct Vec;
|
|
|
|
extern f32 G_CM3D_F_ABS_MIN;
|
|
|
|
static void cM3d_InDivPos1(const Vec*, const Vec*, f32, Vec*);
|
|
void cM3d_InDivPos2(const Vec*, const Vec*, f32, Vec*);
|
|
f32 cM3d_Len2dSq(f32, f32, f32, f32);
|
|
bool cM3d_Len2dSqPntAndSegLine(f32, f32, f32, f32, f32, f32, f32*, f32*, f32*);
|
|
bool cM3d_Len3dSqPntAndSegLine(const cM3dGLin*, const Vec*, Vec*, f32*);
|
|
f32 cM3d_SignedLenPlaAndPos(const cM3dGPla*, const Vec*);
|
|
f32 cM3d_VectorProduct2d(f32, f32, f32, f32, f32, f32);
|
|
void cM3d_VectorProduct(const cXyz*, const cXyz*, const cXyz*, cXyz*);
|
|
void cM3d_CalcPla(const Vec*, const Vec*, const Vec*, Vec*, f32*);
|
|
bool cM3d_Cross_AabAab(const cM3dGAab*, const cM3dGAab*);
|
|
bool cM3d_Cross_AabCyl(const cM3dGAab*, const cM3dGCyl*);
|
|
bool cM3d_Cross_AabSph(const cM3dGAab*, const cM3dGSph*);
|
|
static int cM3d_Check_LinLin(const cM3dGLin*, const cM3dGLin*, f32*, f32*);
|
|
static bool cM3d_CrossInfLineVsInfPlane_proc(f32, f32, const Vec*, const Vec*, Vec*);
|
|
bool cM3d_Cross_LinPla(const cM3dGLin*, const cM3dGPla*, Vec*, bool, bool);
|
|
bool cM3d_Cross_MinMaxBoxLine(const Vec*, const Vec*, const Vec*, const Vec*);
|
|
static bool cM3d_InclusionCheckPosIn3PosBox3d(const Vec*, const Vec*, const Vec*, const Vec*, f32);
|
|
static bool cM3d_InclusionCheckPosIn3PosBox2d(f32, f32, f32, f32, f32, f32, f32, f32, f32);
|
|
static bool cM3d_CrossX_Tri(const cM3dGTri*, const Vec*, f32);
|
|
static bool cM3d_CrossX_Tri(const cM3dGTri*, const Vec*);
|
|
static bool cM3d_CrossX_LinTri_proc(const cM3dGTri*, const Vec*);
|
|
bool cM3d_CrossY_Tri(const cM3dGTri*, const Vec*);
|
|
static bool cM3d_CrossY_LinTri_proc(const cM3dGTri*, const Vec*);
|
|
bool cM3d_CrossY_Tri(const Vec&, const Vec&, const Vec&, const cM3dGPla&, const Vec*);
|
|
bool cM3d_CrossY_Tri_Front(const Vec&, const Vec&, const Vec&, const Vec*);
|
|
static bool cM3d_CrossY_Tri(const cM3dGTri*, const Vec*, f32*);
|
|
static bool cM3d_CrossY_Tri(const cM3dGTri*, const Vec*, f32);
|
|
static bool cM3d_CrossY_Tri(const cM3dGTri*, const Vec*, const cM3d_Range*, f32*);
|
|
static bool cM3d_CrossZ_Tri(const cM3dGTri*, const Vec*, f32);
|
|
static bool cM3d_CrossZ_Tri(const cM3dGTri*, const Vec*);
|
|
static bool cM3d_CrossZ_LinTri_proc(const cM3dGTri*, const Vec*);
|
|
bool cM3d_Cross_LinTri(const cM3dGLin*, const cM3dGTri*, Vec*, bool, bool);
|
|
static bool cM3d_Cross_LinTri_Easy(const cM3dGTri*, const Vec*);
|
|
static bool cM3d_Cross_SphPnt(const cM3dGSph*, const Vec*);
|
|
bool cM3d_Cross_LinSph(const cM3dGLin*, const cM3dGSph*, Vec*);
|
|
int cM3d_Cross_LinSph_CrossPos(const cM3dGSph&, const cM3dGLin&, Vec*, Vec*);
|
|
bool cM3d_Cross_CylSph(const cM3dGCyl*, const cM3dGSph*, f32*);
|
|
bool cM3d_Cross_CylSph(const cM3dGCyl*, const cM3dGSph*, Vec*, f32*);
|
|
bool cM3d_Cross_SphSph(const cM3dGSph*, const cM3dGSph*, f32*);
|
|
static bool cM3d_Cross_SphSph(const cM3dGSph*, const cM3dGSph*, f32*, f32*);
|
|
bool cM3d_Cross_SphSph(const cM3dGSph*, const cM3dGSph*, Vec*);
|
|
static void cM3d_CalcSphVsTriCrossPoint(const cM3dGSph*, const cM3dGTri*, Vec*);
|
|
bool cM3d_Cross_SphTri(const cM3dGSph*, const cM3dGTri*, Vec*);
|
|
bool cM3d_Cross_CylCyl(const cM3dGCyl*, const cM3dGCyl*, f32*);
|
|
bool cM3d_Cross_CylCyl(const cM3dGCyl*, const cM3dGCyl*, Vec*);
|
|
bool cM3d_Cross_CylTri(const cM3dGCyl*, const cM3dGTri*, Vec*);
|
|
int cM3d_Cross_CylLin(const cM3dGCyl*, const cM3dGLin*, Vec*, Vec*);
|
|
static int cM3d_Cross_CylPntPnt(const cM3dGCyl*, const Vec*, const Vec*, Vec*, Vec*);
|
|
static bool cM3d_Cross_CylPnt(const cM3dGCyl*, const Vec*);
|
|
bool cM3d_Cross_CpsCps(const cM3dGCps&, const cM3dGCps&, Vec*);
|
|
bool cM3d_Cross_CpsCyl(const cM3dGCps&, const cM3dGCyl&, Vec*);
|
|
static bool cM3d_Cross_CpsSph_CrossPos(const cM3dGCps&, const cM3dGSph&, const Vec&, Vec*);
|
|
bool cM3d_Cross_CpsSph(const cM3dGCps&, const cM3dGSph&, Vec*);
|
|
bool cM3d_Cross_TriTri(const cM3dGTri&, const cM3dGTri&, Vec*);
|
|
bool cM3d_Cross_CpsTri(const cM3dGCps&, cM3dGTri, Vec*);
|
|
void cM3d_CalcVecAngle(const Vec&, short*, short*);
|
|
void cM3d_CalcVecZAngle(const Vec&, csXyz*);
|
|
static void cM3d_PlaneCrossLineProcWork(f32, f32, f32, f32, f32, f32, f32, f32*, f32*);
|
|
static int cM3d_2PlaneCrossLine(const cM3dGPla&, const cM3dGPla&, cM3dGLin*);
|
|
bool cM3d_3PlaneCrossPos(const cM3dGPla&, const cM3dGPla&, const cM3dGPla&, Vec*);
|
|
f32 cM3d_lineVsPosSuisenCross(const cM3dGLin*, const Vec*, Vec*);
|
|
f32 cM3d_lineVsPosSuisenCross(const Vec&, const Vec&, const Vec&, Vec*);
|
|
int cM3d_2PlaneLinePosNearPos(const cM3dGPla&, const cM3dGPla&, const Vec*, Vec*);
|
|
void cM3d_CrawVec(const Vec&, const Vec&, Vec*);
|
|
|
|
inline bool cM3d_IsZero(f32 f) {
|
|
return fabsf(f) < G_CM3D_F_ABS_MIN;
|
|
}
|
|
// this is the inline cM3d_IsZero but inverted. Sometimes this will get a match where the regular cM3d_IsZero inline won't
|
|
inline bool cM3d_IsZero_inverted(f32 param_0) {
|
|
return !(fabsf(param_0) < G_CM3D_F_ABS_MIN);
|
|
}
|
|
|
|
#endif |