#include
<IParticleChannelTrueFalseIterator.h>
List of all
members.
Constructor & Destructor Documentation
Member Function Documentation
int GetMajorIndex |
( |
void |
|
) |
const [inline] |
void SetMajorIndex |
( |
int |
index |
) |
[inline] |
void AddBlockIndex |
( |
int |
index |
) |
[inline] |
int NumberSet |
( |
void |
|
) |
const [inline] |
{
static NumberBitsSetInUChar nbc;
int numSet = 0;
uchar* miniBlocks = (uchar*)(&m_blockIndices);
for(int i=0; i<4; ++i)
numSet += nbc.getNumBitsSet(miniBlocks[i]);
return numSet;
}
static int SetAllTrueBlocks |
( |
int |
particleCount, |
|
|
OrbazTrueBlock *& |
trueBlocks |
|
) |
|
[inline, static] |
{
if (trueBlocks != NULL)
{
delete [] trueBlocks;
trueBlocks = NULL;
}
int numTrueBlocks = particleCount>>5;
bool incompleteEndBlock = (particleCount%kBitsPerDWORD != 0);
int numCompleteBlocks = numTrueBlocks;
if (incompleteEndBlock)
++numTrueBlocks;
trueBlocks = new OrbazTrueBlock[numTrueBlocks];
int i=0;
for(; i<numCompleteBlocks; ++i)
trueBlocks[i] = OrbazTrueBlock(i<<5, 0xFFFFFFFF);
if (incompleteEndBlock)
for(int j=i<<5; j<particleCount; ++j)
trueBlocks[i].AddBlockIndex(j);
return numTrueBlocks;
}
static int GetMaxNumTrueBlocks |
( |
int |
particleCount |
) |
[inline, static] |
{
int numTrueBlocks = particleCount >> 5;
if (particleCount % kBitsPerDWORD != 0)
++numTrueBlocks;
return numTrueBlocks;
}
static int OptimizeMemoryUsage |
( |
int |
numBlocksSet, |
|
|
int |
numBlocksAllocated, |
|
|
OrbazTrueBlock *& |
trueBlocks |
|
) |
|
[inline, static] |
{
if (numBlocksSet != numBlocksAllocated)
{
OrbazTrueBlock* temp = new OrbazTrueBlock[numBlocksSet];
memcpy(temp, trueBlocks, sizeof(OrbazTrueBlock)*numBlocksSet);
delete [] trueBlocks;
trueBlocks = temp;
}
return numBlocksSet;
}
Member Data Documentation
OrbazTrueBlock OrbazTrueBlock
OrbazTrueBlock OrbazTrueBlock OrbazTrueBlock OrbazTrueBlock
OrbazTrueBlock OrbazTrueBlock OrbazTrueBlock OrbazTrueBlock
OrbazTrueBlock OrbazTrueBlock
OrbazTrueBlock OrbazTrueBlock OrbazTrueBlock OrbazTrueBlock
OrbazTrueBlock OrbazTrueBlock OrbazTrueBlock OrbazTrueBlock