Ignore:
Timestamp:
09/04/06 08:56:26 (18 years ago)
Author:
mattausch
Message:
 
File:
1 moved

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreBvHierarchySceneNode.cpp

    r1319 r1320  
    1818        // TRIVIA: this function is _not_ called for nodes which did not change since the last frame 
    1919        // only exception: the root node ... it's aabb should be null however, so we don't care 
    20         void KdTreeSceneNode::_updateBounds(void) 
     20        void BvHierarchySceneNode::_updateBounds(void) 
    2121        { 
    2222                // Reset bounds first 
     
    3333                if (!mWorldAABB.isNull()) 
    3434                { 
    35                         static_cast<KdTreeSceneManager *>(mCreator)->_updateNode(this); 
     35                        static_cast<BvHierarchySceneManager *>(mCreator)->_updateNode(this); 
    3636                } 
    3737        } 
    3838 
    39         void KdTreeSceneNode::computeScene(PlaneEventList& events, AxisAlignedBox& aabb, int& nObjects, bool includeChildren) 
     39        void BvHierarchySceneNode::computeScene(BvhPlaneEventList& events, AxisAlignedBox& aabb, int& nObjects, bool includeChildren) 
    4040        { 
    4141                /**************************************************************************************/ 
    4242                /* HACK: do not include camera node, FUCKS UP world AABB really BAD, dunno why        */ 
    43                 /* TODO: find a generic solution where MOVABLE nodes are NOT INSERTED into the KDTREE */ 
     43                /* TODO: find a generic solution where MOVABLE nodes are NOT INSERTED into the BvHierarchy */ 
    4444                /**************************************************************************************/ 
    4545                //if (mName == "PlayerCamNode") 
     
    5555                        if (getExcludedMovables().find(i->second->getMovableType()) == getExcludedMovables().end()) 
    5656                        { 
    57                                 //LogManager::getSingleton().getLog(KDTREE_LOGNAME)->logMessage("Adding movable type " + i->second->getMovableType() + " to KdTree"); 
     57                                //LogManager::getSingleton().getLog(BvHierarchy_LOGNAME)->logMessage("Adding movable type " + i->second->getMovableType() + " to BvHierarchy"); 
    5858                                // Merge world bounds of each object 
    5959                                mWorldAABB.merge(i->second->getWorldBoundingBox(true)); 
     
    6161                } 
    6262 
    63                 // create information for KdTree/SAH 
     63                // create information for BvHierarchy/SAH 
    6464                if (!mWorldAABB.isNull()) 
    6565                { 
     
    7171 
    7272                        // generate events 
    73                         PlaneEvent::Dimension axes[] =  
    74                                 {PlaneEvent::PED_X, PlaneEvent::PED_Y, PlaneEvent::PED_Z}; 
     73                        BvhPlaneEvent::Dimension axes[] =  
     74                                {BvhPlaneEvent::PED_X, BvhPlaneEvent::PED_Y, BvhPlaneEvent::PED_Z}; 
    7575                        Vector3 min = mWorldAABB.getMinimum(); 
    7676                        Vector3 max = mWorldAABB.getMaximum(); 
     
    8080                                if (min[i] == max[i]) 
    8181                                {        
    82                                         //e = new PlaneEvent(this, min, axes[i], PlaneEvent::PET_ON); 
     82                                        //e = new BvhPlaneEvent(this, min, axes[i], BvhPlaneEvent::PET_ON); 
    8383                                        //sceneinfo.events.push_back(*e); 
    84                                         events.push_back(PlaneEvent(this, min, axes[i], PlaneEvent::PET_ON)); 
     84                                        events.push_back(BvhPlaneEvent(this, min, axes[i], BvhPlaneEvent::PET_ON)); 
    8585                                } 
    8686                                else 
    8787                                { 
    88                                         //e = new PlaneEvent(this, min, axes[i], PlaneEvent::PET_START); 
     88                                        //e = new BvhPlaneEvent(this, min, axes[i], BvhPlaneEvent::PET_START); 
    8989                                        //sceneinfo.events.push_back(*e); 
    90                                         //e = new PlaneEvent(this, max, axes[i], PlaneEvent::PET_END); 
     90                                        //e = new BvhPlaneEvent(this, max, axes[i], BvhPlaneEvent::PET_END); 
    9191                                        //sceneinfo.events.push_back(*e); 
    92                                         events.push_back(PlaneEvent(this, min, axes[i], PlaneEvent::PET_START)); 
    93                                         events.push_back(PlaneEvent(this, max, axes[i], PlaneEvent::PET_END)); 
     92                                        events.push_back(BvhPlaneEvent(this, min, axes[i], BvhPlaneEvent::PET_START)); 
     93                                        events.push_back(BvhPlaneEvent(this, max, axes[i], BvhPlaneEvent::PET_END)); 
    9494                                } 
    9595                        } 
     
    102102                        for (child = mChildren.begin(); child != mChildren.end(); ++child) 
    103103                        { 
    104                                 KdTreeSceneNode* sceneChild = static_cast<KdTreeSceneNode*>(child->second); 
     104                                BvHierarchySceneNode* sceneChild = static_cast<BvHierarchySceneNode*>(child->second); 
    105105                                sceneChild->computeScene(events, aabb, nObjects); 
    106106                        } 
     
    108108        } 
    109109 
    110         //void KdTreeSceneNode::_findVisibleObjects(Camera* cam, RenderQueue* queue,  
     110        //void BvHierarchySceneNode::_findVisibleObjects(Camera* cam, RenderQueue* queue,  
    111111        //      bool includeChildren, bool displayNodes, bool onlyShadowCasters) 
    112         void KdTreeSceneNode::queueObjects(Camera* cam, RenderQueue* queue, bool onlyShadowCasters) 
     112        void BvHierarchySceneNode::queueObjects(Camera* cam, RenderQueue* queue, bool onlyShadowCasters) 
    113113        { 
    114114                //SceneNode::_findVisibleObjects(cam, queue, includeChildren, displayNodes, onlyShadowCasters); 
     
    136136        } 
    137137 
    138         void KdTreeSceneNode::getGeometryList(GtpVisibility::GeometryVector *geometryList) 
     138        void BvHierarchySceneNode::getGeometryList(GtpVisibility::GeometryVector *geometryList) 
    139139        { 
    140140                SceneNode::ObjectIterator objIt = getAttachedObjectIterator(); 
     
    154154 
    155155        // recalculate the world aabb 
    156         AxisAlignedBox KdTreeSceneNode::getBoundingBox(void) const 
     156        AxisAlignedBox BvHierarchySceneNode::getBoundingBox(void) const 
    157157        { 
    158158                return mWorldAABB; 
    159159        } 
    160160 
    161         KdTreeSceneNode::StringSet& KdTreeSceneNode::getExcludedMovables(void) 
     161        BvHierarchySceneNode::StringSet& BvHierarchySceneNode::getExcludedMovables(void) 
    162162        { 
    163163                static StringSet sExluded; 
     
    175175 
    176176        // DEBUG 
    177         String KdTreeSceneNode::dumpToString(void) 
     177        String BvHierarchySceneNode::dumpToString(void) 
    178178        { 
    179179                String objects; 
Note: See TracChangeset for help on using the changeset viewer.