MCPcopy Create free account
hub / github.com/JACoders/OpenJK / CM_PointOnPlaneSide

Function CM_PointOnPlaneSide

code/qcommon/cm_patch.cpp:586–606  ·  view source on GitHub ↗

================== CM_PointOnPlaneSide ================== */

Source from the content-addressed store, hash-verified

584==================
585*/
586static int CM_PointOnPlaneSide( float *p, int planeNum ) {
587 float *plane;
588 float d;
589
590 if ( planeNum == -1 ) {
591 return SIDE_ON;
592 }
593 plane = planes[ planeNum ].plane;
594
595 d = DotProduct( p, plane ) - plane[3];
596
597 if ( d > PLANE_TRI_EPSILON ) {
598 return SIDE_FRONT;
599 }
600
601 if ( d < -PLANE_TRI_EPSILON ) {
602 return SIDE_BACK;
603 }
604
605 return SIDE_ON;
606}
607
608
609static int CM_GridPlane( int gridPlanes[CM_MAX_GRID_SIZE][CM_MAX_GRID_SIZE][2], int i, int j, int tri ) {

Callers 1

CM_SetBorderInwardFunction · 0.70

Calls 1

DotProductFunction · 0.85

Tested by

no test coverage detected