mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
ref: gl: cleanup unused functions in frustum
This commit is contained in:
@@ -183,49 +183,6 @@ int PlaneTypeForNormal( const vec3_t normal )
|
||||
return PLANE_NONAXIAL;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
PlanesGetIntersectionPoint
|
||||
|
||||
=================
|
||||
*/
|
||||
qboolean PlanesGetIntersectionPoint( const mplane_t *plane1, const mplane_t *plane2, const mplane_t *plane3, vec3_t out )
|
||||
{
|
||||
vec3_t n1, n2, n3;
|
||||
vec3_t n1n2, n2n3, n3n1;
|
||||
float denom;
|
||||
|
||||
VectorNormalize2( plane1->normal, n1 );
|
||||
VectorNormalize2( plane2->normal, n2 );
|
||||
VectorNormalize2( plane3->normal, n3 );
|
||||
|
||||
CrossProduct( n1, n2, n1n2 );
|
||||
CrossProduct( n2, n3, n2n3 );
|
||||
CrossProduct( n3, n1, n3n1 );
|
||||
|
||||
denom = DotProduct( n1, n2n3 );
|
||||
VectorClear( out );
|
||||
|
||||
// check if the denominator is zero (which would mean that no intersection is to be found
|
||||
if( denom == 0.0f )
|
||||
{
|
||||
// no intersection could be found, return <0,0,0>
|
||||
return false;
|
||||
}
|
||||
|
||||
// compute intersection point
|
||||
#if 0
|
||||
VectorMAMAM( plane1->dist, n2n3, plane2->dist, n3n1, plane3->dist, n1n2, out );
|
||||
#else
|
||||
VectorMA( out, plane1->dist, n2n3, out );
|
||||
VectorMA( out, plane2->dist, n3n1, out );
|
||||
VectorMA( out, plane3->dist, n1n2, out );
|
||||
#endif
|
||||
VectorScale( out, ( 1.0f / denom ), out );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
NearestPOW
|
||||
|
||||
@@ -188,7 +188,6 @@ void VectorVectors( const vec3_t forward, vec3_t right, vec3_t up );
|
||||
void VectorAngles( const float *forward, float *angles );
|
||||
void AngleVectors( const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up );
|
||||
void VectorsAngles( const vec3_t forward, const vec3_t right, const vec3_t up, vec3_t angles );
|
||||
qboolean PlanesGetIntersectionPoint( const struct mplane_s *plane1, const struct mplane_s *plane2, const struct mplane_s *plane3, vec3_t out );
|
||||
void PlaneIntersect( const struct mplane_s *plane, const vec3_t p0, const vec3_t p1, vec3_t out );
|
||||
|
||||
void ClearBounds( vec3_t mins, vec3_t maxs );
|
||||
|
||||
Reference in New Issue
Block a user