mirror of https://github.com/PrimeDecomp/prime.git
Remove redundant, fake, function in CPlane
This commit is contained in:
parent
7fb8be3eea
commit
5fcb595f2b
|
@ -21,9 +21,7 @@ public:
|
||||||
}
|
}
|
||||||
// IsFacing__6CPlaneCFRC9CVector3f
|
// IsFacing__6CPlaneCFRC9CVector3f
|
||||||
float ClipLineSegment(const CVector3f& start, const CVector3f& end) const;
|
float ClipLineSegment(const CVector3f& start, const CVector3f& end) const;
|
||||||
|
|
||||||
float PointToPlaneDist(const CVector3f& pos) const { return CVector3f::Dot(GetNormal(), pos) - xc_constant; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CUnitVector3f x0_normal;
|
CUnitVector3f x0_normal;
|
||||||
float xc_constant;
|
float xc_constant;
|
||||||
|
|
|
@ -13,7 +13,7 @@ bool RayPlaneIntersection(const CVector3f& from, const CVector3f& to, const CPla
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
float tmp = -plane.PointToPlaneDist(from) / CUnitVector3f::Dot(delta, planeNorm);
|
float tmp = -plane.GetHeight(from) / CUnitVector3f::Dot(delta, planeNorm);
|
||||||
|
|
||||||
if (tmp < -0.f || tmp > 1.0001f) {
|
if (tmp < -0.f || tmp > 1.0001f) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -34,8 +34,7 @@ bool RaySphereIntersection(const CSphere& sphere, const CVector3f& pos, const CV
|
||||||
if (dirDot < 0.f && magSq > radSq) {
|
if (dirDot < 0.f && magSq > radSq) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
intersectSq -= magSq;
|
intersectSq = radSq - (magSq - intersectSq);
|
||||||
intersectSq -= radSq;
|
|
||||||
|
|
||||||
if (intersectSq < 0.f) {
|
if (intersectSq < 0.f) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue