setup dolphin VEC/MTX function defines (#1903)

* setup VEC function defines

* setup MTX function defines
This commit is contained in:
TakaRikka
2023-09-02 06:38:08 -07:00
committed by GitHub
parent f90d73eeeb
commit 2a67e0a8ba
102 changed files with 479 additions and 404 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ public:
void SetStartEnd(const cXyz&, const cXyz&);
void SetStartEnd(const Vec&, const Vec&);
void CalcPos(Vec*, f32) const;
void CalcVec(Vec* pOut) const { PSVECSubtract(&this->mEnd, &this->mStart, pOut); }
void CalcVec(Vec* pOut) const { VECSubtract(&this->mEnd, &this->mStart, pOut); }
void SetEnd(const cXyz&);
const cXyz& GetStartP(void) const { return mStart; }
cXyz& GetStartP(void) { return mStart; }
+1 -1
View File
@@ -23,7 +23,7 @@ public:
virtual ~cM3dGPla() {}
f32 getPlaneFunc(const Vec* pPoint) const { return mD + PSVECDotProduct(&mNormal, pPoint); }
f32 getPlaneFunc(const Vec* pPoint) const { return mD + VECDotProduct(&mNormal, pPoint); }
const cXyz& GetNP() const { return mNormal; }
const cXyz* i_GetNP() const { return &mNormal; }
f32 GetD() const { return mD; }
+6 -6
View File
@@ -52,9 +52,9 @@ struct cXyz : Vec {
y -= f;
z -= f;
}
void operator-=(const Vec& other) { PSVECSubtract(this, &other, this); }
void operator+=(const Vec& other) { PSVECAdd(this, &other, this); }
void operator*=(f32 scale) { PSVECScale(this, this, scale); }
void operator-=(const Vec& other) { VECSubtract(this, &other, this); }
void operator+=(const Vec& other) { VECAdd(this, &other, this); }
void operator*=(f32 scale) { VECScale(this, this, scale); }
/* 80266C6C */ cXyz getCrossProduct(Vec const&) const;
/* 80266CBC */ cXyz outprod(Vec const&) const;
/* 80266CE4 */ cXyz norm() const;
@@ -111,8 +111,8 @@ struct cXyz : Vec {
}
}
float getSquareMag() const { return PSVECSquareMag(this); }
f32 getSquareDistance(const Vec& other) const { return PSVECSquareDistance(this, &other); }
float getSquareMag() const { return VECSquareMag(this); }
f32 getSquareDistance(const Vec& other) const { return VECSquareDistance(this, &other); }
static float getNearZeroValue() { return 8e-11f; }
@@ -134,7 +134,7 @@ struct cXyz : Vec {
f32 absXZ(const Vec& other) const { return sqrtf(this->abs2XZ(other)); }
f32 getMagXZ() const { return cXyz(this->x, 0, this->z).getSquareMag(); }
f32 getDotProduct(const Vec& other) const { return PSVECDotProduct(this, &other); }
f32 getDotProduct(const Vec& other) const { return VECDotProduct(this, &other); }
f32 inprod(const Vec& other) const { return getDotProduct(other); }
};