Ignore:
Timestamp:
12/02/05 20:38:01 (19 years ago)
Author:
mattausch
Message:

Added VspBspTree? functionality:
This is a view space partitioning specialised BSPtree.
There are no polygon splits, but we split the sample rays.
The candidates for the next split plane are evaluated only
by checking the sampled visibility information.
The polygons are employed merely as candidates for the next split planes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp

    r444 r445  
    77#include "Environment.h" 
    88#include "ViewCellsManager.h" 
     9#include "ViewCellBsp.h" 
     10#include "VspBspTree.h" 
     11#include "VspKdTree.h" 
    912 
    1013Preprocessor::Preprocessor(): 
     
    1215mBspTree(NULL), 
    1316mVspKdTree(NULL), 
     17mVspBspTree(NULL), 
    1418mViewCellsManager(NULL) 
    1519{ 
     
    2226        DEL_PTR(mKdTree); 
    2327        DEL_PTR(mVspKdTree); 
     28        DEL_PTR(mVspBspTree); 
    2429        DEL_PTR(mViewCellsManager); 
    2530} 
     
    167172        environment->GetStringValue("ViewCells.type", viewCellsStr); 
    168173 
     174        int constructionSamples = 0; 
     175 
    169176        if (strcmp(viewCellsStr, "kdTree") == 0) 
    170177        { 
     
    173180        if (strcmp(viewCellsStr, "bspTree") == 0) 
    174181        { 
    175                 int bspConstructionSamples = 0; 
    176  
    177182                mBspTree = new BspTree(); 
    178183 
    179                 environment->GetIntValue("BspTree.Construction.samples", bspConstructionSamples); 
    180                 mViewCellsManager = new BspViewCellsManager(mBspTree, bspConstructionSamples); 
    181         } 
    182         else if (strcmp(viewCellsStr, "vspTree") == 0) 
    183         { 
    184                 int vspKdConstructionSamples = 0; 
    185                  
    186                 environment->GetIntValue("VspKdTree.Construction.samples", vspKdConstructionSamples); 
    187         mViewCellsManager = new VspKdViewCellsManager(mVspKdTree, vspKdConstructionSamples); 
     184                environment->GetIntValue("BspTree.Construction.samples", constructionSamples); 
     185                mViewCellsManager = new BspViewCellsManager(mBspTree, constructionSamples); 
     186        } 
     187        if (strcmp(viewCellsStr, "vspBspTree") == 0) 
     188        { 
     189                mVspBspTree = new VspBspTree(); 
     190 
     191                environment->GetIntValue("VspBspTree.Construction.samples", constructionSamples); 
     192                mViewCellsManager = new VspBspViewCellsManager(mVspBspTree, constructionSamples); 
     193        } 
     194        else if (strcmp(viewCellsStr, "vspKdTree") == 0) 
     195        { 
     196                mVspKdTree = new VspKdTree();            
     197         
     198                environment->GetIntValue("VspKdTree.Construction.samples", constructionSamples); 
     199        mViewCellsManager = new VspKdViewCellsManager(mVspKdTree, constructionSamples); 
    188200        } 
    189201        else if (strcmp(viewCellsStr, "sceneDependent") == 0) 
    190202        { 
    191203                //TODO 
    192                 int bspConstructionSamples = 0; 
    193  
    194                 environment->GetIntValue("BspTree.Construction.samples", bspConstructionSamples); 
    195                 mViewCellsManager = new BspViewCellsManager(mBspTree, bspConstructionSamples); 
     204                mBspTree = new BspTree(); 
     205 
     206                environment->GetIntValue("BspTree.Construction.samples", constructionSamples); 
     207                mViewCellsManager = new BspViewCellsManager(mBspTree, constructionSamples); 
    196208        } 
    197209        else 
     
    205217 
    206218        environment->GetIntValue("ViewCells.PostProcessing.samples", postProcessSamples); 
    207         environment->GetIntValue("BspTree.Visualization.samples", visSamples); 
     219        environment->GetIntValue("ViewCells.Visualization.samples", visSamples); 
    208220 
    209221        mViewCellsManager->SetPostProcessSamples(postProcessSamples); 
Note: See TracChangeset for help on using the changeset viewer.