Changeset 2073


Ignore:
Timestamp:
02/01/07 18:30:35 (17 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells.env

    r2072 r2073  
    165165        } 
    166166 
    167         showVisualization true 
    168         #showVisualization false 
     167        #showVisualization true 
     168        showVisualization false 
    169169        evaluateViewCells false 
    170170         
     
    247247        Construction { 
    248248 
    249                 samples 2000000 
     249                samples 1500000 
    250250 
    251251                # type 0 = sequential computation, 1 = interleaved, 2 = gradient 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp

    r2066 r2073  
    24562456 
    24572457 
    2458 } 
     2458void HierarchyManager::CreateTraversalTree() 
     2459{ 
     2460} 
     2461 
     2462 
     2463} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h

    r2003 r2073  
    511511                                                                   AxisAlignedBox3 *forcedViewSpace); 
    512512 
     513        void CreateTraversalTree(); 
    513514 
    514515        /////////////////////////// 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj

    r2069 r2073  
    854854                        </File> 
    855855                        <File 
     856                                RelativePath=".\TraversalTree.cpp"> 
     857                        </File> 
     858                        <File 
     859                                RelativePath=".\TraversalTree.h"> 
     860                        </File> 
     861                        <File 
    856862                                RelativePath="..\src\Triangle3.cpp"> 
    857863                        </File> 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r2072 r2073  
    65656565                                                                                                   ViewCell *viewCell) 
    65666566{ 
    6567         return mHierarchyManager-> 
    6568                 GetVspTree()->LineSegmentIntersects(origin, termination, viewCell); 
     6567        return false; 
    65696568} 
    65706569 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp

    r2072 r2073  
    34633463 
    34643464 
    3465 bool VspTree::LineSegmentIntersects(const Vector3 &origin,  
    3466                                                                         const Vector3 &termination,  
    3467                                                                         ViewCell *viewCell) 
    3468 { 
    3469         /*float mint = 0.0f, maxt = 1.0f; 
    3470         const Vector3 dir = termination - origin; 
    3471  
    3472         stack<LineTraversalData> tStack; 
    3473  
    3474         Vector3 entp = origin; 
    3475         Vector3 extp = termination; 
    3476  
    3477         VspNode *node = mRoot; 
    3478         VspNode *farChild; 
    3479  
    3480         float position; 
    3481         int axis; 
    3482  
    3483         while (1) 
    3484         { 
    3485                 if (!node->IsLeaf()) 
    3486                 { 
    3487                         VspInterior *in = static_cast<VspInterior *>(node); 
    3488                         position = in->GetPosition(); 
    3489                         axis = in->GetAxis(); 
    3490  
    3491                         if (entp[axis] <= position) 
    3492                         { 
    3493                                 if (extp[axis] <= position) 
    3494                                 { 
    3495                                         node = in->GetBack(); 
    3496                                         // cases N1,N2,N3,P5,Z2,Z3 
    3497                                         continue; 
    3498                                 } else 
    3499                                 { 
    3500                                         // case N4 
    3501                                         node = in->GetBack(); 
    3502                                         farChild = in->GetFront(); 
    3503                                 } 
    3504                         } 
    3505                         else 
    3506                         { 
    3507                                 if (position <= extp[axis]) 
    3508                                 { 
    3509                                         node = in->GetFront(); 
    3510                                         // cases P1,P2,P3,N5,Z1 
    3511                                         continue; 
    3512                                 } 
    3513                                 else 
    3514                                 { 
    3515                                         node = in->GetFront(); 
    3516                                         farChild = in->GetBack(); 
    3517                                         // case P4 
    3518                                 } 
    3519                         } 
    3520  
    3521                         // $$ modification 3.5.2004 - hints from Kamil Ghais 
    3522                         // case N4 or P4 
    3523                         const float tdist = (position - origin[axis]) / dir[axis]; 
    3524                         tStack.push(LineTraversalData(farChild, extp, maxt)); //TODO 
    3525  
    3526                         extp = origin + dir * tdist; 
    3527                         maxt = tdist; 
    3528                 } 
    3529                 else 
    3530                 { 
    3531                         // compute intersection with all objects in this leaf 
    3532                         VspLeaf *leaf = static_cast<VspLeaf *>(node); 
    3533                         ViewCell *viewCell; 
    3534                         if (0) 
    3535                                 viewCell = mViewCellsTree->GetActiveViewCell(leaf->GetViewCell()); 
    3536                         else 
    3537                                 viewCell = leaf->GetViewCell(); 
    3538  
    3539                         if (viewCell == currentViewCell) 
    3540                                 return true; 
    3541                  
    3542                         // get the next node from the stack 
    3543                         if (tStack.empty()) 
    3544                                 break; 
    3545  
    3546                         entp = extp; 
    3547                         mint = maxt; 
    3548                          
    3549                         LineTraversalData &s  = tStack.top(); 
    3550                         node = s.mNode; 
    3551                         extp = s.mExitPoint; 
    3552                         maxt = s.mMaxT; 
    3553  
    3554                         tStack.pop(); 
    3555                 } 
    3556         } 
    3557 */ 
    3558         return false; 
    3559 } 
    3560  
    3561  
    3562 } 
     3465} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h

    r2015 r2073  
    723723        VspNode *SubdivideAndCopy(SplitQueue &tQueue, SubdivisionCandidate *splitCandidate); 
    724724 
    725         bool LineSegmentIntersects(const Vector3 &origin,  
    726                                                            const Vector3 &termination,  
    727                                                            ViewCell *viewCell); 
     725 
    728726protected: 
    729727 
Note: See TracChangeset for help on using the changeset viewer.