a small bug in function: getCellDistanceFromBorders()???
Posted: Tue Mar 26, 2013 5:16 am
void DgmOctree::getCellDistanceFromBorders(const int* cellPos,
uchar level,
int* cellDists) const
{
const int* fillIndexes = m_fillIndexes+6*level;
int* _cellDists = cellDists;
*_cellDists++ = cellPos[0]-fillIndexes[0];
*_cellDists++ = fillIndexes[3]-cellPos[0];
*_cellDists++ = cellPos[1]-fillIndexes[1];
*_cellDists++ = fillIndexes[4]-cellPos[1];
*_cellDists++ = cellPos[2]-fillIndexes[2];
*_cellDists++ = fillIndexes[4]-cellPos[2]; //there is a small bug, and it should be : *_cellDists++ = fillIndexes[5]-cellPos[2];
uchar level,
int* cellDists) const
{
const int* fillIndexes = m_fillIndexes+6*level;
int* _cellDists = cellDists;
*_cellDists++ = cellPos[0]-fillIndexes[0];
*_cellDists++ = fillIndexes[3]-cellPos[0];
*_cellDists++ = cellPos[1]-fillIndexes[1];
*_cellDists++ = fillIndexes[4]-cellPos[1];
*_cellDists++ = cellPos[2]-fillIndexes[2];
*_cellDists++ = fillIndexes[4]-cellPos[2]; //there is a small bug, and it should be : *_cellDists++ = fillIndexes[5]-cellPos[2];