MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / createPoly

Method createPoly

Engine/source/lighting/common/shadowVolumeBSP.cpp:298–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298ShadowVolumeBSP::SVPoly * ShadowVolumeBSP::createPoly()
299{
300 SVPoly * poly;
301
302 if(mPolyStore)
303 {
304 poly = mPolyStore;
305 mPolyStore = mPolyStore->mNext;
306 }
307 else
308 poly = mPolyChunker.alloc();
309
310 //
311 poly->mNext = 0;
312 poly->mTarget = 0;
313 poly->mSurfaceInfo = 0;
314 poly->mShadowVolume = 0;
315 poly->mWindingCount = 0;
316
317 for (U32 i = 0; i < SVPoly::MaxWinding; i++)
318 poly->mWinding[i] = Point3F(0.0f, 0.0f, 0.0f);
319
320 return(poly);
321}
322
323void ShadowVolumeBSP::recyclePoly(SVPoly * poly)
324{

Callers 1

addStaticMethod · 0.80

Calls 2

Point3FClass · 0.50
allocMethod · 0.45

Tested by

no test coverage detected