Changeset 2390


Ignore:
Timestamp:
05/21/07 14:51:38 (17 years ago)
Author:
vizrt_christian_seidl
Message:

ADDED: Faster method for building BIH Tree
BUGFIX: Termination criteria for BIH Tree works now

Location:
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBiHierarchy.h

    r2384 r2390  
    423423                        { 
    424424                                // cse  
    425                                 //showBoxes=true; 
     425                                showBoxes=true; 
    426426                                if (showBoxes) 
    427427                                { 
     
    430430                                        queue->addRenderable(getWireBoundingBox()); 
    431431                                        */ 
    432                                         /* 
     432                                         
    433433                                        if (mLevel == mOwner->getHiLiteLevel() || mOwner->getShowAllBoxes()) 
    434434                                                queue->addRenderable(getWireBoundingBox()); 
    435                                         */ 
     435                                         
    436436                                } 
    437437 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBihRenderable.h

    r2385 r2390  
    7171                }; 
    7272 
     73                inline void setActualSide(int d,BihPlaneEvent::Side s) 
     74                { 
     75                        mActualSide[d] = s; 
     76                }; 
     77 
     78                inline void FinalizeSide(int d) 
     79                { 
     80                        mFinalSide[d]=mActualSide[d]; 
     81                }; 
     82 
     83                inline BihPlaneEvent::Side GetFinalSide(int d) 
     84                { 
     85                        return mFinalSide[d]; 
     86                }; 
     87 
    7388                // funcions for attachment/detachment of renderables to/from the kd-tree 
    7489                inline bool isAttached() 
     
    132147                // Flag for the SAH determining the "cheaper" side of the split plane 
    133148                BihPlaneEvent::Side mSide; 
     149                BihPlaneEvent::Side mFinalSide[3]; 
     150                BihPlaneEvent::Side mActualSide[3]; 
    134151                // Flag for the SAH which marks if this renderable was already placed in the list after a split 
    135152                bool mClassified; 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreBiHierarchy.cpp

    r2383 r2390  
    364364        Vector3 bmin = parent.getMinimum(); 
    365365        Vector3 bmax = parent.getMaximum(); 
    366         Real mu=lookupPenalty( 
     366        Real mu=/*lookupPenalty( 
    367367                (mPosition[mDimension] - bmin[mDimension]) /  
    368                 (bmax[mDimension] - bmin[mDimension])); 
     368                (bmax[mDimension] - bmin[mDimension]));*/ 1; 
    369369        Real sav = surfaceArea(parent); 
    370370        Real pl = surfaceArea(split.bleft) / sav; 
     
    11151115BiHierarchy::Node * BiHierarchy::recBuild(BihPlaneEventList& events, int nObjects, AxisAlignedBox& aabb, BiHierarchy::Branch * parent) 
    11161116{ 
    1117 #define OLD_METHOD       
    1118 //      859 
     1117#undef OLD_METHOD        
     1118#undef DEBUG_BUILD_TREE 
     1119 
    11191120        // determine the depth we are on 
    11201121        int level = 0; 
     
    11311132        // initialize 
    11321133        const int dim = 3; 
    1133         int pStart, pOn, pEnd; 
     1134//      int pStart, pOn, pEnd; 
    11341135        int nLeft[dim], nPlane[dim], nRight[dim]; 
    11351136        int nObjectCount[dim]; 
     
    11501151        BihPlaneEventList::iterator it_a = begin; // iterator for adjusting the bounding box 
    11511152     
     1153        // hold the minimum left and right bounding box 
    11521154        AxisAlignedBox minLefts[dim]; 
    11531155        AxisAlignedBox minRights[dim]; 
    11541156 
    1155         Vector3 MaxBoundingLeft=aabb.getMaximum(); 
    1156         Vector3 MinBoundingRight=aabb.getMinimum(); 
    1157  
    1158         Vector3 LastPosition=MinBoundingRight; 
    1159  
    1160  
    1161          
    1162  
    1163  
    1164         bool LeftMod[dim]; 
    1165         bool RightMod[dim]; 
    1166  
     1157 
     1158 
     1159        Vector3 LastPosition=aabb.getMinimum(); // needed to remember the last split plane position  
     1160 
     1161        // needed for the final sort before splitting 
    11671162        AxisAlignedBox minLeft; 
    11681163        AxisAlignedBox minRight; 
     1164 
     1165        // the border which seperates finished and unfinished events 
    11691166        BihPlaneEventList::iterator LeftBorder[dim]; 
    11701167         
    11711168    for (int i=0; i<dim; i++) 
    11721169        { 
    1173           minLefts[i].setNull();                         
    1174           minRights[i]=aabb; 
    1175           nRight[i]=nObjects; 
    1176           nLeft[i]=0; 
    1177           LeftBorder[i]=it; 
     1170          minLefts[i].setNull(); // left aabb starts with null 
     1171          minRights[i]=aabb; // right aabb contains all objects 
     1172          nRight[i]=nObjects; // all objects are on the right side 
     1173          nLeft[i]=0;  
     1174          LeftBorder[i]=it; // set the left border to the first event 
    11781175        } 
    11791176        // try all planes to find the best one for the given set of objects 
     
    11841181        { 
    11851182 
     1183// slow implementation. for every event the left and right bounding boxes are calculated. 
    11861184#ifdef OLD_METHOD 
    11871185                it = begin; 
     
    12761274                while (it != end) 
    12771275                { 
    1278                         it->getRenderable()->setDecided(0,false); 
    1279                         it->getRenderable()->setDecided(1,false); 
    1280                         it->getRenderable()->setDecided(2,false); 
     1276                        for (int i=0; i<dim; i++) 
     1277                        { 
     1278                          it->getRenderable()->setDecided(i,false); 
     1279                          it->getRenderable()->setActualSide(i,BihPlaneEvent::PES_RIGHT); 
     1280                        } 
    12811281                        it->ClearGrowBB(); 
    12821282                        it++; 
     
    12841284                it = end; 
    12851285                AxisAlignedBox tempBB[3]; 
    1286                 for (int i=0; i<3; i++) tempBB[i].setNull(); 
     1286                for (int i=0; i<dim; i++) tempBB[i].setNull(); 
     1287                 
    12871288                while (it != begin) 
    12881289                { 
    12891290            it--; 
    1290                         if ((it->getRenderable()) && (it->equalsType(*it, BihPlaneEvent::PET_START))) 
     1291                        if ((it->getRenderable())) //&& (it->equalsType(*it, BihPlaneEvent::PET_START))) 
    12911292                        { 
    12921293                          tempBB[it->getDimension()].merge(it->getRenderable()->getBoundingBox()); 
    12931294                          it->GrowBB(tempBB[it->getDimension()]); 
    12941295                        } 
     1296                         
    12951297                         
    12961298                         
     
    13341336                                                         
    13351337                                                        minRights[d]=it_a->GetGrowBB(); 
    1336                                                         //mBuildLog->logMessage("Found Right side: d" + StringConverter::toString(d)+ " " + StringConverter::toString(pos[d]) ); 
     1338#ifdef DEBUG_BUILD_TREE 
     1339                                                        mBuildLog->logMessage("Found Right side: d" + StringConverter::toString(d)+ " " + StringConverter::toString(pos[d]) ); 
     1340#endif                                                   
    13371341                                                        break; 
    13381342                                                } 
     
    13461350                                                if (it_a->getRenderable()) 
    13471351                                                { 
    1348                                                         /* 
    1349                                                         if (it_a->getDimension()==0 && d==0) 
    1350                                                         { 
    1351                                                                 mBuildLog->logMessage("--------Enter Loop: d"  ); 
    1352                                                                 if (it_a->GetType() == BihPlaneEvent::PET_START) 
    1353                                                                         mBuildLog->logMessage("--------START"  ); 
    1354                                                                 if (it_a->GetType() == BihPlaneEvent::PET_END) 
    1355                                                                         mBuildLog->logMessage("--------END"  ); 
    1356                                                                 if (it_a->GetType() == BihPlaneEvent::PET_ON) 
    1357                                                                         mBuildLog->logMessage("--------ON"  ); 
    1358  
    1359                                                         } 
    1360                                                         */ 
    1361                                                         if ((it_a->getDimension()==d) /*&& (it_a->GetType() == BihPlaneEvent::PET_START) */&& (!it_a->getRenderable()->isDecided(d))) 
     1352                                                         
     1353                                                        if ((it_a->getDimension()==d)  && (!it_a->getRenderable()->isDecided(d))) 
    13621354                                                        { 
    13631355                                                                it_a->classify(*it, split.side,true); 
     
    13661358                                                                        // right side 
    13671359                                                                         
    1368                                                                          
    1369                                                                         minRights[d].merge(it_a->GetGrowBB()); 
    1370                                                                         //if (d==0) 
    1371                                                                         //mBuildLog->logMessage("Move to Right side: d" + StringConverter::toString(d)+ " " + StringConverter::toString(pos[d]) ); 
    1372                                                                          
     1360                                                                        minRights[d].merge(it_a->getRenderable()->getBoundingBox()); 
     1361#ifdef DEBUG_BUILD_TREE 
     1362                                                                        mBuildLog->logMessage("Move to Right side: d" + StringConverter::toString(d)+ " " + StringConverter::toString(pos[d]) ); 
     1363#endif                                                                   
    13731364 
    13741365                                                                } else 
     
    13761367                                                                        minLefts[d].merge(it_a->getRenderable()->getBoundingBox()); 
    13771368                                                                        it_a->getRenderable()->setDecided(d,true); 
     1369                                                                        it_a->getRenderable()->setActualSide(d,BihPlaneEvent::PES_LEFT); 
     1370 
     1371 
    13781372                                                                        Vector3 pos=minLefts[d].getMaximum(); 
    13791373                                                                        nLeft[d]++; nRight[d]--; 
    1380                                                                         //if (d==0) 
    1381                                     //mBuildLog->logMessage("Move to Left side: d" + StringConverter::toString(d)+ " " + StringConverter::toString(pos[d]) ); 
    1382  
     1374#ifdef DEBUG_BUILD_TREE 
     1375                                    mBuildLog->logMessage("Move to Left side: d" + StringConverter::toString(d)+ " " + StringConverter::toString(pos[d]) ); 
     1376#endif 
    13831377                                                                        if ((it_a->getPosition()[d]>LeftBorder[d]->getPosition()[d]) && (!foundLeft[d])) 
    13841378                                                                        { 
    13851379                                                                                LeftBorder[d]=it_a; 
    1386                                                                                 //if (d==0) 
    1387                                                                                 //mBuildLog->logMessage("Adjust left to  d" + StringConverter::toString(d)+ " " + StringConverter::toString(it_a->getPosition()[d]) ); 
     1380#ifdef DEBUG_BUILD_TREE 
     1381                                                                                mBuildLog->logMessage("Adjust left to  d" + StringConverter::toString(d)+ " " + StringConverter::toString(it_a->getPosition()[d]) ); 
     1382#endif                                                                   
    13881383                                                                        } else 
    13891384                                                                        { 
    1390                                                                             //if (d==0) 
    1391                                                                                 //mBuildLog->logMessage("Found left   d" + StringConverter::toString(d)+ " " + StringConverter::toString(it_a->getPosition()[d]) ); 
     1385#ifdef DEBUG_BUILD_TREE 
     1386                                                                                mBuildLog->logMessage("Found left   d" + StringConverter::toString(d)+ " " + StringConverter::toString(it_a->getPosition()[d]) ); 
     1387#endif                                                                           
    13921388                                                                                foundLeft[d]=true; 
    13931389                                                                        } 
     
    14001396                                                else 
    14011397                                                { 
    1402                                                         //if (d==0) 
    1403                                                         //mBuildLog->logMessage("------No renderable " + StringConverter::toString(d)+ " " + StringConverter::toString(it_a->getPosition()[d]) ); 
     1398#ifdef DEBUG_BUILD_TREE 
     1399                                                        mBuildLog->logMessage("------No renderable " + StringConverter::toString(d)+ " " + StringConverter::toString(it_a->getPosition()[d]) ); 
     1400#endif                                           
    14041401                                                } 
    14051402                                                it_a++; 
    14061403                                        } 
    1407  
    1408  
    1409                                                                  
    1410  
    1411  
    1412  
    1413  
    1414                                          
    1415  
    1416                             
     1404                    
    14171405#endif 
    14181406                            if (it!=end) it++; 
     
    14211409                                if (split.cost < best.cost) 
    14221410                                { 
     1411                                        if ((nLeft[d]!=0) && (nRight[d]!=0)) 
    14231412                                        best = split; 
    14241413                                } 
    1425 #endif 
    1426                                 /* 
    1427                                 if (d==0) 
     1414#ifdef DEBUG_BUILD_TREE 
    14281415                                mBuildLog->logMessage("SAH " + StringConverter::toString(best.cost)+ " " + StringConverter::toString(split.cost) +  
    14291416                                        "dim: " + StringConverter::toString(d)+ "Elements: " + StringConverter::toString(nLeft[d]) +   
     
    14311418                                        " " + StringConverter::toString(it->getPosition()[d]) +" " + StringConverter::toString(minRights[d].getMinimum()[d]) 
    14321419                                        +" " + StringConverter::toString(LeftBorder[d]->getPosition()[d])); 
    1433                                 */ 
     1420 
     1421                                    mBuildLog->logMessage("   BOXES  " + StringConverter::toString(minLefts[d].getMaximum()[d]-minLefts[d].getMinimum()[d]) + 
     1422                                        " " + StringConverter::toString(minRights[d].getMaximum()[d]-minRights[d].getMinimum()[d])); 
     1423#endif // DEBUG_BUILD_TREE 
     1424                                 
     1425#endif // OLD_METHOD 
     1426                                 
     1427                                 
     1428                                 
    14341429#ifndef OLD_METHOD 
    14351430                                if (it!=end) 
     
    14411436                                        if (split.cost < best.cost) 
    14421437                                        { 
    1443                                                 best = split; 
     1438                                                if ((nLeft[d]!=0) && (nRight[d]!=0)) 
     1439                                                { 
     1440                                                        best = split; 
     1441 
     1442                                                        it_a=begin; 
     1443                                                        while (it_a!=end) 
     1444                                                        { 
     1445                                                                if (it_a->getRenderable()) it_a->getRenderable()->FinalizeSide(d); 
     1446                                                                it_a++; 
     1447                                                        } 
     1448#ifdef DEBUG_BUILD_TREE 
     1449                                                        mBuildLog->logMessage("SAH " + StringConverter::toString(best.cost)+ " " + StringConverter::toString(split.cost) +  
     1450                                                        "dim: " + StringConverter::toString(d)+ "Elements: " + StringConverter::toString(nLeft[d]) +   
     1451                                                        " " + StringConverter::toString(nRight[d])+ "Planes: "+ StringConverter::toString(minLefts[d].getMaximum()[d]) + 
     1452                                                        " " + StringConverter::toString(it->getPosition()[d]) +" " + StringConverter::toString(minRights[d].getMinimum()[d]) 
     1453                                                        +" " + StringConverter::toString(LeftBorder[d]->getPosition()[d])+ " " + StringConverter::toString(it->getPosition()[it->getDimension()])); 
     1454                                                     
     1455                                                        mBuildLog->logMessage("BOXES Left " + StringConverter::toString(minLefts[d].getMaximum()[d]-minLefts[d].getMinimum()[d]) + 
     1456                                                        " " + StringConverter::toString(minRights[d].getMaximum()[d]-minRights[d].getMinimum()[d])); 
     1457#endif 
     1458                                                } 
     1459 
    14441460                                        } 
     1461                                         
     1462                                         
     1463                                         
     1464                                         
     1465                                } else 
     1466                                { 
     1467#ifdef DEBUG_BUILD_TREE 
     1468                                        mBuildLog->logMessage("Cancel " + StringConverter::toString(it->getPosition()[it->getDimension()])); 
     1469#endif 
    14451470                                } 
     1471 
    14461472                                } else 
    14471473                                { 
     
    14491475                                        if (split.cost < best.cost) 
    14501476                                        { 
    1451                                                 best = split; 
     1477                                                if ((nLeft[d]!=0) && (nRight[d]!=0)) 
     1478                                                { 
     1479                                                        best = split; 
     1480                                                        it_a=begin; 
     1481                                                        while (it_a!=end) 
     1482                                                        { 
     1483                                                                if (it_a->getRenderable()) it_a->getRenderable()->FinalizeSide(d); 
     1484                                                                it_a++; 
     1485                                                        } 
     1486                                                } 
    14521487                                        } 
     1488#ifdef DEBUG_BUILD_TREE 
     1489                                        mBuildLog->logMessage("SAH " + StringConverter::toString(best.cost)+ " " + StringConverter::toString(split.cost) +  
     1490                                        "dim: " + StringConverter::toString(d)+ "Elements: " + StringConverter::toString(nLeft[d]) +   
     1491                                        " " + StringConverter::toString(nRight[d])+ "Planes: "+ StringConverter::toString(minLefts[d].getMaximum()[d]) + 
     1492                                        " " + StringConverter::toString(it->getPosition()[d]) +" " + StringConverter::toString(minRights[d].getMinimum()[d]) 
     1493                                        +" " + StringConverter::toString(LeftBorder[d]->getPosition()[d])+ " " + StringConverter::toString(it->getPosition()[it->getDimension()])); 
     1494#endif 
    14531495                                } 
    14541496 
     
    15151557        /************************************************/ 
    15161558        // check terminating condition 
    1517         if (best.cost > BihPlaneEvent::KI*nObjects || level >= mMaxDepth  || nObjects<4 ) 
    1518         //if (best.cost > 2*nObjects || level >= mMaxDepth )//|| nObjects<4 ) 
     1559         
     1560        if (best.cost > BihPlaneEvent::KI*nObjects || level >= mMaxDepth  || nObjects<2 ) 
    15191561        { 
    15201562                // Terminating condition reached, create leaf and add renderables to list 
     1563#ifdef DEBUG_BUILD_TREE 
    15211564                mBuildLog->logMessage("Terminate " + StringConverter::toString(best.cost)+ " o:" + StringConverter::toString(nObjects) +  
    15221565                                " ki: " + StringConverter::toString(BihPlaneEvent::KI*nObjects)+ " dim: " + StringConverter::toString(best.event.getDimension())); 
     1566#endif 
    15231567                BiHierarchy::Leaf * leaf = new BiHierarchy::Leaf(this, level, aabb, parent); 
    15241568                if (parent->GetSide()==1) leaf->SetToLeft(); else leaf->SetToRight(); 
     
    15791623                { 
    15801624                        // right-only nodes go in right list 
    1581                         if (it->getRenderable()->getSide() == BihPlaneEvent::PES_RIGHT) 
    1582                         { 
    1583                                 if (!it->getRenderable()->isClassified()) 
     1625                        if (it->getRenderable()) 
     1626                        { 
     1627                                if (it->getRenderable()->GetFinalSide(best.event.getDimension()) == BihPlaneEvent::PES_RIGHT) 
    15841628                                { 
    1585                                         it->getRenderable()->setClassified(true); 
    1586                                         nRightS++; 
     1629                                        if (!it->getRenderable()->isClassified()) 
     1630                                        { 
     1631                                                it->getRenderable()->setClassified(true); 
     1632                                                nRightS++; 
     1633                                        } 
     1634                                        minRight.merge(it->getRenderable()->getBoundingBox()); 
     1635                                        eventsRight.push_back(*it); 
    15871636                                } 
    1588                                 minRight.merge(it->getRenderable()->getBoundingBox()); 
    1589                                 //mBuildLog->logMessage("merge right " + StringConverter::toString(minRight.volume())); 
    1590                                 eventsRight.push_back(*it); 
    1591                         } 
    1592                         // left-only nodes go in left list 
    1593                         else if (it->getRenderable()->getSide() == BihPlaneEvent::PES_LEFT) 
    1594                         { 
    1595                                 if (!it->getRenderable()->isClassified()) 
     1637                                // left-only nodes go in left list 
     1638                                else if (it->getRenderable()->GetFinalSide(best.event.getDimension()) == BihPlaneEvent::PES_LEFT) 
    15961639                                { 
    1597                                         it->getRenderable()->setClassified(true); 
    1598                                         nLeftS++; 
     1640                                        if (!it->getRenderable()->isClassified()) 
     1641                                        { 
     1642                                                it->getRenderable()->setClassified(true); 
     1643                                                nLeftS++; 
     1644                                        } 
     1645                                        minLeft.merge(it->getRenderable()->getBoundingBox()); 
     1646                                        eventsLeft.push_back(*it); 
    15991647                                } 
    1600                                 minLeft.merge(it->getRenderable()->getBoundingBox()); 
    1601                                 //mBuildLog->logMessage("merge left " + StringConverter::toString(minLeft.volume())); 
    1602                                 eventsLeft.push_back(*it); 
    1603                         } 
    1604                         // remaining nodes go in both lists, bust must be clipped to prevent 
    1605                         // events from lying outside the new nodes aabb 
    1606                         else 
    1607                         { 
    1608                                 if (!it->getRenderable()->isClassified()) 
    1609                                 { 
    1610                                         it->getRenderable()->setClassified(true); 
    1611                                         nBothS++; 
    1612                                 } 
    1613                                  
    1614                                 // calculate the intersecting box for the right side 
    1615                  
    1616                   
    1617                                   minRight.merge(best.bright.intersection(it->getRenderable()->getBoundingBox())); 
    1618                                  
    1619  
    1620                                 //mBuildLog->logMessage("merge Right Overlap " + StringConverter::toString(minRight.volume())); 
    1621                                 eventsRight.push_back(it->clip(best.bright, best.event.getDimension())); 
    1622                                  
    1623                                   minLeft.merge(best.bleft.intersection(it->getRenderable()->getBoundingBox())); 
    1624                                  
    1625                                 //mBuildLog->logMessage("merge Left Overlap " + StringConverter::toString(minLeft.volume())); 
    1626                                 eventsLeft.push_back(it->clip(best.bleft, best.event.getDimension())); 
    1627                         } 
     1648                        } 
     1649                         
    16281650                        it++; 
    16291651                } 
    1630  
    1631                 mBuildLog->logMessage("Split R:" + StringConverter::toString(nRightS)+ " L:" + StringConverter::toString(nLeftS) +  
    1632                                 " O: " + StringConverter::toString(nObjects)); 
    1633  
     1652#ifdef DEBUG_BUILD_TREE 
     1653                mBuildLog->logMessage("Split " + StringConverter::toString(best.cost)+ " o:" + StringConverter::toString(nObjects) +  
     1654                                " ki: " + StringConverter::toString(BihPlaneEvent::KI*nObjects)+ " dim: " + StringConverter::toString(best.event.getDimension())); 
     1655#endif 
     1656         
    16341657                 
    16351658 
    16361659 
    1637                 // calculate minimum of the left bounding box 
    1638                 /* 
    1639                 AxisAlignedBox minimum; 
    1640                 minimum.setNull(); 
    1641                 it=eventsLeft.begin(); 
    1642                 while (it!=eventsLeft.end()) 
    1643                 { 
    1644                         minimum.merge(it->getRenderable()->getBoundingBox()); 
    1645                         it++; 
    1646                 } 
    1647                 */ 
     1660                 
    16481661 
    16491662  
     
    16541667 
    16551668                // now create the child nodes and continue recursion 
    1656          
    1657                 //if (best.bleft.volume()>minLeft.volume()) 
    1658                 { 
    1659                         mBuildLog->logMessage("Volume Smaller Left " + StringConverter::toString(minLeft.volume()) + " " + StringConverter::toString(best.bleft.volume(),3,3)); 
    1660                     if (best.bleft.volume()!=minLeft.volume()) 
    1661                         { 
    1662                                 mBuildLog->logMessage("Error Volume Left "   + StringConverter::toString(best.bleft.getMinimum())+ " " + StringConverter::toString(best.bleft.getMaximum())); 
    1663                                 mBuildLog->logMessage("Error Volume Left " + StringConverter::toString(minLeft.getMinimum()) + " " + StringConverter::toString(minLeft.getMaximum()) ); 
    1664                         } 
    1665  
    1666                 } 
    1667  
    1668                 //if (best.bright.volume()>minRight.volume()) 
    1669                 { 
    1670                         mBuildLog->logMessage("Volume Smaller Right " + StringConverter::toString(minRight.volume()) + " " + StringConverter::toString(best.bright.volume(),3,3)); 
    1671                         if (best.bright.volume()!=minRight.volume()) 
    1672                         { 
    1673                                 mBuildLog->logMessage("Error Volume Right " + StringConverter::toString(best.bright.getMinimum())+ " " + StringConverter::toString(best.bright.getMaximum())); 
    1674                                 mBuildLog->logMessage("Error Volume Right " + StringConverter::toString(minRight.getMinimum()) + " " + StringConverter::toString(minRight.getMaximum()) ); 
    1675                         } 
    1676                 } 
    1677                  
    16781669 
    16791670                if (eventsLeft.size() > 0) 
    16801671                { 
    16811672                         
    1682                         branch->mLeft = recBuild(eventsLeft, nLeftS + nBothS, /*best.bleft*/minLeft, branch); 
     1673                        branch->mLeft = recBuild(eventsLeft, nLeftS + nBothS, minLeft, branch); 
    16831674                        branch->mLeft->SetToLeft(); 
    1684                         //mBuildLog->logMessage("SetToLeft"); 
    1685                         //branch->mLeft = recBuild(eventsLeft, nLeftS + nBothS, best.bleft, branch); 
     1675                         
    16861676                } 
    16871677                if (eventsRight.size() > 0) 
     
    16901680                        branch->mRight = recBuild(eventsRight, nBothS + nRightS, /*best.bright*/ minRight, branch); 
    16911681                        branch->mRight->SetToRight(); 
    1692                         //mBuildLog->logMessage("SetToRight"); 
    1693  
    1694  
    1695                         //branch->mRight = recBuild(eventsRight, nBothS + nRightS, best.bright, branch); 
     1682                         
    16961683                } 
    16971684 
     
    22772264                queue->addRenderable(getWireBoundingBox()); 
    22782265                */ 
    2279                 /* 
     2266                 
    22802267                if (mLevel == mOwner->getHiLiteLevel() || mOwner->getShowAllBoxes()) 
    22812268                        queue->addRenderable(getWireBoundingBox()); 
    2282                 */ 
     2269                 
    22832270        } 
    22842271 
Note: See TracChangeset for help on using the changeset viewer.