Commit 1a7c2062 authored by maesius's avatar maesius
Browse files

debug

parent 13030aaf
Loading
Loading
Loading
Loading
+10 −9
Changes for LrBinderRegularGrid.cpp: 10 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ LrBinderRegularGrid::LrBinderRegularGrid()
:
LrBinder()
{
    initBinder();
    //initBinder();
}

LrBinderRegularGrid::LrBinderRegularGrid(const LrBinderRegularGrid & source)
@@ -43,7 +43,7 @@ m_lenBinder(source.m_lenBinder),
m_lenVoxel(source.m_lenVoxel),
m_tabVoxel(source.m_tabVoxel)
{
    initBinder();
    //initBinder();
}

LrBinderRegularGrid::LrBinderRegularGrid(const LrEntityList &entities, int nbVoxelX, int nbVoxelY, int nbVoxelZ)
@@ -63,7 +63,7 @@ m_tabVoxel(nbVoxelX*nbVoxelY*nbVoxelZ)

    }

    initBinder();
    //initBinder();
}

LrBinderRegularGrid::~LrBinderRegularGrid()
@@ -128,9 +128,9 @@ void LrBinderRegularGrid::initBinder()
            maxVoxelJ = (int)(((maxTMP.y - min.y) / m_lenBinder.y) * m_nbVoxelY);
            maxVoxelK = (int)(((maxTMP.z - min.z) / m_lenBinder.z) * m_nbVoxelZ);

            for (int i = minVoxelI; i <= maxVoxelI; i++) {
                for (int j = minVoxelJ; j <= maxVoxelJ; j++) {
                    for (int k = minVoxelK; k <= maxVoxelK; k++) {
            for (int i = minVoxelI; i < maxVoxelI; i++) {
                for (int j = minVoxelJ; j < maxVoxelJ; j++) {
                    for (int k = minVoxelK; k < maxVoxelK; k++) {

                        int numCase = (i + m_nbVoxelX * (j + k * m_nbVoxelY));
                        m_tabVoxel[numCase].push_back(infoVoxel);
@@ -425,6 +425,7 @@ bool LrBinderRegularGrid::getIntersection(const LrRay &ray, LrHit *hit, Real min
            next = NEXT_Z;
        }


        intersection = false;
        for (unsigned int i = 0; i < m_tabVoxel[curLineVoxel].size(); i++) {

@@ -452,7 +453,7 @@ bool LrBinderRegularGrid::getIntersection(const LrRay &ray, LrHit *hit, Real min
     case NEXT_X :
            curVoxelX += vX;
            if ((curVoxelX == -1) || (curVoxelX>=m_nbVoxelX)) {
                fin = false;
                fin = true;
            }
            curLineVoxel += incVoxelX;
            Dx += dx;
@@ -461,7 +462,7 @@ bool LrBinderRegularGrid::getIntersection(const LrRay &ray, LrHit *hit, Real min
    case NEXT_Y :
            curVoxelY += vY;
            if ((curVoxelY == -1) || (curVoxelY>=m_nbVoxelY)) {
                fin = false;
                fin = true;
            }
            curLineVoxel += incVoxelY;
            Dy += dy;
@@ -470,7 +471,7 @@ bool LrBinderRegularGrid::getIntersection(const LrRay &ray, LrHit *hit, Real min
    case NEXT_Z :
            curVoxelZ += vZ;
            if ((curVoxelZ == -1) || (curVoxelZ>=m_nbVoxelZ)) {
                fin = false;
                fin = true;
            }
            curLineVoxel += incVoxelZ;
            Dz += dz;