#include #include Cell::Cell() { mRenderWeight = 0; mpCentroid[0] = 0.0f; mpCentroid[1] = 0.0f; mpCentroid[2] = 0.0f; mBounds.mMax.x = 0.0f; mBounds.mMin.x = 0.0f; mBlockIndex[0] = -1; } Cell::~Cell() { } //////////////////////////////////////////////////////////////////////// // What: // Accumulator functions use negative numbers to accumulate // Value is inverted on call to Generate Cell // Why: // This is used to ensure access doesn't happen previous to generation // Note: // The only holes in this type of assertion is where all the vertices // are at X = 0, or there are no Vertices. // //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // TODO: // Eliminate a linear factor out of these for loops: // Incriment RenderWeight by size at the end; reorganize. //////////////////////////////////////////////////////////////////////// void Cell::AccVertexList( FixedArray& irVertexList ) { int i; for( i=irVertexList.mSize; i>-1; i-- ) { AccVertex( irVertexList[i] ); } } void Cell::AccVertexList( rmt::Vector* ipVector, int iCount ) { int i; for( i=0; i= 0.0f); return true; } bool Cell::IsBoundsSet() { return ( !((mBounds.mMin.x == 0.0f)&&(mBounds.mMax.x == 0.0f)) ); } bool Cell::IsIndexSet() { return (mBlockIndex[0] >= 0); }