Changeset 137 for trunk/VUT


Ignore:
Timestamp:
06/16/05 18:58:29 (20 years ago)
Author:
mattausch
Message:

fixed from camera visibility queries.
deletion of (previously) rendered queue items now before rendering the node (more intuitive)
improved octree implementation (tighter boxes)
added boxes for visibility queries

Location:
trunk/VUT
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/Ogre/src/OgreVisibilityTerrainSceneManager.cpp

    r135 r137  
    128128                        if (mRenderNodesForViz) 
    129129                        { 
    130                                 getRenderQueue()->addRenderable(*it); 
     130                                //getRenderQueue()->addRenderable(*it); 
    131131 
    132132                                // addbounding boxes instead of node itself 
    133                                 //(*it)->_addBoundingBoxToQueue(getRenderQueue()); 
     133                                (*it)->_addBoundingBoxToQueue(getRenderQueue()); 
    134134                        } 
    135135                        if (mRenderNodesContentForViz)  
  • trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.cpp

    r135 r137  
    196196                 // Get results, create a node/entity on the position 
    197197                 mCurrentObject = mTerrainContentGenerator->GenerateSceneObject( 
    198                          mouseRay.getOrigin(), Vector3::ZERO, "robot"); 
     198                         mouseRay.getOrigin()/*queryResult*/, Vector3::ZERO, "robot"); 
    199199                 
    200200         mLMouseDown = true;  
  • trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp

    r135 r137  
    4040        *       because then the camera is displayed correctly in the visualization 
    4141        */ 
    42         mCamNode = mSceneMgr->getRootSceneNode()->createChildSceneNode( 
    43                 "CamNode1", Vector3(707, 5000, 528)); 
     42        mCamNode = mSceneMgr->getRootSceneNode()-> 
     43                createChildSceneNode("CamNode1", Vector3(707, 5000, 528)); 
    4444        //mCamera->setPosition(707, 5000, 528); 
    4545        mCamNode->setOrientation(Quaternion(-0.3486, 0.0122, 0.9365, 0.0329)); 
     
    9595        mSunLight->setCastShadows(true); 
    9696 
     97        // set light angle not too sharp, otherwise shadows textures will be broken 
    9798        Vector3 dir(0.5, 1, 0.5); 
    9899        dir.normalise(); 
     
    103104        mSunLight->setSpecularColour(1, 1, 1); 
    104105 
    105         // --Fog 
     106        // -- Fog 
    106107        // NB it's VERY important to set this before calling setWorldGeometry  
    107108        // because the vertex program picked will be different 
     
    135136        mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(pPlaneEnt); 
    136137        */ 
    137  
    138         if (mRoot->getRenderSystem()->getCapabilities()->hasCapability(RSC_HWRENDER_TO_TEXTURE)) 
    139     { 
    140                 // In D3D, use a 1024x1024 shadow texture 
    141                 mSceneMgr->setShadowTextureSettings(1024, 2); 
    142         } 
    143         else 
    144         { 
     138        mSceneMgr->setShadowTextureSettings(1024, 2); 
     139/*      if (mRoot->getRenderSystem()->getCapabilities()->hasCapability(RSC_HWRENDER_TO_TEXTURE)) 
     140    {   // In D3D, use a 1024x1024 shadow texture 
     141                mSceneMgr->setShadowTextureSettings(1024, 2);   }       else    { 
    145142                // Use 512x512 texture in GL since we can't go higher than the window res 
    146                 mSceneMgr->setShadowTextureSettings(512, 2); 
    147         } 
     143                mSceneMgr->setShadowTextureSettings(512, 2);} 
     144                */ 
     145 
    148146        //mSceneMgr->setShadowColour(ColourValue(0, 0, 0)); 
    149147        mSceneMgr->setShadowColour(ColourValue(0.5, 0.5, 0.5)); 
Note: See TracChangeset for help on using the changeset viewer.