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

Function g3_SetCustomClipPlane

renderer/HardwareClipper.cpp:376–388  ·  view source on GitHub ↗

Sets up a custom clipping plane - g3_StartFrame must be called before this is called

Source from the content-addressed store, hash-verified

374
375// Sets up a custom clipping plane - g3_StartFrame must be called before this is called
376void g3_SetCustomClipPlane(uint8_t state, vector *pnt, vector *normal) {
377 Clip_custom = state;
378 if (state) {
379 vector tempv;
380 vector norm = *normal;
381
382 tempv = *pnt - View_position;
383 Clip_plane_point = tempv * View_matrix;
384
385 Clip_plane = norm * Unscaled_matrix; // View_matrix;
386 vm_NormalizeVector(&Clip_plane);
387 }
388}

Callers 1

RenderMirroredRoomFunction · 0.85

Calls 1

vm_NormalizeVectorFunction · 0.85

Tested by

no test coverage detected