Implement cM3d_Len3dSqPntAndSegLine

Fix cM3d_Len2dSqPntAndSegLine
This commit is contained in:
Franklyn Tackitt
2024-02-26 16:12:02 -07:00
parent 9b6f6484c4
commit 68c97bf2db
4 changed files with 41 additions and 12 deletions
+1
View File
@@ -78,6 +78,7 @@ 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*);
bool cM3d_NearPos_Cps(const cM3dGCps&, const Vec&, Vec*);
void cM3d_PlaneCrossLineProcWork(f32, f32, f32, f32, f32, f32, f32, f32*, f32*);
int cM3d_2PlaneCrossLine(const cM3dGPla&, const cM3dGPla&, cM3dGLin*);
bool cM3d_3PlaneCrossPos(const cM3dGPla&, const cM3dGPla&, const cM3dGPla&, Vec*);
+3 -1
View File
@@ -36,7 +36,9 @@ public:
f32 GetR() const { return mRadius; }
void SetR(f32 r) { mRadius = r; }
void NearPos(cXyz, cXyz*) const {}
bool NearPos(const cXyz& pos, cXyz* outPos) {
return cM3d_NearPos_Cps(*this, pos, outPos);
}
}; // Size = 0x20
STATIC_ASSERT(0x20 == sizeof(cM3dGCps));
+4 -1
View File
@@ -28,7 +28,10 @@ public:
SetC(src.mCenter);
SetR(src.mRadius);
}
void Set(const cXyz&, f32) {}
void Set(const cXyz& srcCenter, f32 srcRadius) {
SetC(srcCenter);
SetR(srcRadius);
}
bool Cross(const cM3dGCps* cps, cXyz* dst) const {
return cM3d_Cross_CpsSph(*cps, *this, dst);
}