some actor documentation and cleanup

This commit is contained in:
LagoLunatic
2024-01-18 18:55:47 -05:00
parent e724cdf62e
commit fa5010b1dd
35 changed files with 358 additions and 325 deletions
+2 -2
View File
@@ -363,9 +363,9 @@ bool cCcD_CpsAttr::GetNVec(const cXyz& vec, cXyz* dst) const {
cXyz pt;
if (dot < 0.0f) {
pt.set(*GetStartP());
pt.set(GetStart());
} else if (dot > 1.0f) {
pt.set(*GetEndP());
pt.set(GetEnd());
} else {
VECScale(&lin, &lin, dot);
VECAdd(&lin, GetStartP(), &pt);
+1 -3
View File
@@ -187,9 +187,7 @@ void cCcS::ChkCo() {
continue;
f32 cross_len = 0.0f;
if (co1ShapeAttr->CrossCo(*co2ShapeAttr, &cross_len)) {
cXyz& obj2CoCP = co2ShapeAttr->GetCoCP();
cXyz& obj1CoCP = co1ShapeAttr->GetCoCP();
SetCoCommonHitInf(*objCo1, &obj1CoCP, *objCo2, &obj2CoCP, cross_len);
SetCoCommonHitInf(*objCo1, co1ShapeAttr->GetCoCP(), *objCo2, co2ShapeAttr->GetCoCP(), cross_len);
}
}
}
+2 -2
View File
@@ -220,7 +220,7 @@ bool cM3d_Cross_LinPla(const cM3dGLin* lin, const cM3dGPla* pla, Vec* dst, bool
f32 startVal = pla->getPlaneFunc(lin->GetStartP());
f32 endVal = pla->getPlaneFunc(lin->GetEndP());
if (startVal * endVal > 0.0f) {
*dst = *lin->GetEndP();
*dst = lin->GetEnd();
return false;
} else {
if (startVal >= 0.0f && endVal <= 0.0f) {
@@ -232,7 +232,7 @@ bool cM3d_Cross_LinPla(const cM3dGLin* lin, const cM3dGPla* pla, Vec* dst, bool
return cM3d_CrossInfLineVsInfPlane_proc(startVal, endVal, lin->GetStartP(), lin->GetEndP(), dst);
}
}
*dst = *lin->GetEndP();
*dst = lin->GetEnd();
return false;
}
}