a small bug in function: getCellDistanceFromBorders()???

If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter
Post Reply
njdxzjj
Posts: 7
Joined: Mon Mar 25, 2013 6:57 am

a small bug in function: getCellDistanceFromBorders()???

Post by njdxzjj »

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];
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: a small bug in function: getCellDistanceFromBorders()???

Post by daniel »

Nice one!

Luckily this version of the method is never called ;)
Daniel, CloudCompare admin
Post Reply