MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / g3_CheckNormalFacing

Function g3_CheckNormalFacing

renderer/HardwareDraw.cpp:106–112  ·  view source on GitHub ↗

returns true if a plane is facing the viewer. takes the unrotated surface normal of the plane, and a point on it. The normal need not be normalized

Source from the content-addressed store, hash-verified

104// returns true if a plane is facing the viewer. takes the unrotated surface
105// normal of the plane, and a point on it. The normal need not be normalized
106bool g3_CheckNormalFacing(vector *v, vector *norm) {
107 vector tempv;
108
109 tempv = View_position - *v;
110
111 return ((tempv * *norm) > 0);
112}
113
114bool DoFacingCheck(vector *norm, g3Point **vertlist, vector *p) {
115 if (norm) {

Callers 6

DoFacingCheckFunction · 0.85
DrawRoomFunction · 0.85
DrawShardObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected