Changeset 1588


Ignore:
Timestamp:
10/09/06 17:07:02 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp

    r1587 r1588  
    3636        Vector3 normal; 
    3737           
    38         const int i = (int)RandomValue(0, float((int)mPreprocessor.mObjects.size() - 1)); 
     38        const int i = (int)RandomValue(0, (float)mPreprocessor.mObjects.size() - 0.5f); 
    3939 
    4040        Intersectable *object = mPreprocessor.mObjects[i]; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r1586 r1588  
    49344934        //-- compression 
    49354935 
    4936 //#if HAS_TO_BE_REDONE 
    49374936        if (ViewCellsTreeConstructed() && mCompressViewCells) 
    49384937        { 
     
    49454944                Debug << "number of entries after compress: " << pvsEntries << endl; 
    49464945        } 
    4947 //#endif 
    49484946 
    49494947        ///////////// 
     
    53995397        if (!ViewCellsConstructed()) 
    54005398                return NULL; 
     5399 
    54015400        if (!mViewSpaceBox.IsInside(point)) 
    54025401                return NULL; 
     5402 
    54035403        return mHierarchyManager->GetVspTree()->GetViewCell(point, active); 
    54045404} 
     
    56845684        cout << "finished" << endl; 
    56855685 
     5686        if (0) 
     5687        for (int i = 0; i <50; ++ i) 
     5688        { 
     5689                Vector3 point = GetViewSpaceBox().GetRandomPoint(); 
     5690                ViewCell *vc = GetViewCell(point); 
     5691        } 
    56865692        disposeRays(evaluationSamples, NULL); 
    56875693} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp

    r1586 r1588  
    374374 
    375375 
    376  
    377376VspLeaf::VspLeaf(VspInterior *parent, ViewCellLeaf *viewCell):  
    378377VspNode(parent), mViewCell(viewCell), mPvs(NULL) 
     
    380379} 
    381380 
     381 
    382382ViewCellLeaf *VspLeaf::GetViewCell() const 
    383383{ 
    384384        return mViewCell; 
    385385} 
     386 
    386387 
    387388void VspLeaf::SetViewCell(ViewCellLeaf *viewCell) 
     
    24982499                if (node->IsLeaf())  
    24992500                { 
     2501                        /*const AxisAlignedBox3 box = GetBoundingBox(dynamic_cast<VspLeaf *>(node)); 
     2502                        if (!box.IsInside(point)) 
     2503                                cerr << "error, point " << point << " should be in view cell " << box << endl; 
     2504                        */       
    25002505                        viewcell = dynamic_cast<VspLeaf *>(node)->GetViewCell(); 
    25012506                        break; 
     
    25072512                        // random decision 
    25082513                        if (interior->GetPosition() - point[interior->GetAxis()] < 0) 
     2514                        { 
     2515                                nodeStack.push(interior->GetFront()); 
     2516                        } 
     2517                        else 
     2518                        { 
    25092519                                nodeStack.push(interior->GetBack()); 
    2510                         else 
    2511                                 nodeStack.push(interior->GetFront()); 
     2520                        } 
    25122521                } 
    25132522        } 
Note: See TracChangeset for help on using the changeset viewer.