Krig Game Engine
Loading...
Searching...
No Matches
Frustum Class Reference

Public Member Functions

void extractFromProjectionMatrix (const Matrix &m)
void getPlaneDefinition (const int &, float &, float &, float &, float &)
int testSphere (const Sphere &sphere)
int testBoundingBox ()

Member Function Documentation

◆ testSphere()

int Frustum::testSphere ( const Sphere & sphere)

Tests whether a sphere is inside, intersecting, or outside the frustum. Returns 1 (inside all planes), 0 (intersecting one or more planes), or -1 (outside at least one plane). Both engine callers treat r != -1 as visible. The check is conservative: the loop returns 0 on the first intersecting plane without testing remaining planes, so a sphere that intersects one plane but is outside another may return 0 instead of -1, causing it to be rendered rather than culled.


The documentation for this class was generated from the following files: