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

Function FreePolygon

Descent3/bsp.cpp:243–252  ·  view source on GitHub ↗

Frees up a polygon and all the vertices associated with it

Source from the content-addressed store, hash-verified

241
242// Frees up a polygon and all the vertices associated with it
243void FreePolygon(bsppolygon *poly) {
244 ASSERT(poly != NULL);
245 ASSERT(poly->nv > 2);
246
247 if (poly->nv > 0) {
248 mem_free(poly->verts);
249 }
250
251 mem_free(poly);
252}
253
254// Calculates the plane equation for a given polygon
255void CalculatePolygonPlane(bsppolygon *poly) {

Callers 2

BuildBSPNodeFunction · 0.85
DestroyBSPNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected