| 296 | } |
| 297 | |
| 298 | ShadowVolumeBSP::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 | |
| 323 | void ShadowVolumeBSP::recyclePoly(SVPoly * poly) |
| 324 | { |