ref: gl: cleanup unused functions in frustum

This commit is contained in:
Alibek Omarov
2023-04-03 05:05:18 +03:00
parent fd795d5612
commit 550ced9c36
5 changed files with 0 additions and 235 deletions

View File

@@ -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

View File

@@ -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 );