Changeset 1273


Ignore:
Timestamp:
08/24/06 14:17:44 (18 years ago)
Author:
szydlowski
Message:

Added the KdTerrainSceneManager?, a subclass of the KdTreeSceneManager? capable of rendering terrain like the TerrainSceneManager? from Ogre.
All the *Kd*Terrain* classes are identical to their octree counterparts, save prefixing all classes and structures with Kd to avoid namespace clashes.
This was necessary, since the TerrainSceneManager? was hard coded in these classes, and all references had to be replaced with the KdTerrainSceneManager?.
Also added a comprehensive README for the demo application.

Location:
GTP/trunk
Files:
14 added
8 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/include/TestKdTree.h

    r1220 r1273  
    5656 
    5757        // scene options 
    58         String  mSceneFiles; 
     58        //String  mSceneFiles; 
    5959        Real    mRotationRadius; 
    6060        int             mModelSpacing; 
     
    8787 
    8888        void createMaterials(void); 
     89        void createSimpleScene(void); 
    8990private: 
    9091        std::string cat(std::string name, int x, int z) 
  • GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/include/TestKdTreeAppListener.h

    r1258 r1273  
    4949#define VIZ_VIEWPORT_Z_ORDER 10 
    5050 
     51#define TERRAIN_SCENE "terrain" 
     52 
    5153using namespace Ogre; 
    5254 
     
    8082        { 
    8183                SM_KDT, 
     84                SM_KTE, 
    8285                SM_OCM, 
    8386                SM_OCT, 
     87                SM_TER, 
    8488                SM_GEN, 
    8589                SM_SIZE, 
     
    121125                } 
    122126 
     127                String mSceneFiles; 
    123128                String mDemoInfileName; 
    124129                String mDemoOutfileName; 
     
    272277        Degree mRotScale; 
    273278        Radian mDeathAngle; 
     279        // for terrain 
     280        RaySceneQuery *mRaySceneQuery; 
    274281 
    275282        // just to stop toggles flipping too fast 
  • GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/src/TestKdTree.cpp

    r1258 r1273  
    181181        cfDeath.load("testKdTree.cfg"); 
    182182 
    183         mSceneFiles = cfDeath.getSetting("scene"); 
     183        mOptions.mSceneFiles = cfDeath.getSetting("scene"); 
    184184 
    185185        tmp = cfDeath.getSetting("shadows"); 
     
    236236        createMaterials(); 
    237237 
     238        // load simple scene (planes & robots) 
     239        if (mOptions.mSceneFiles == "") 
     240        { 
     241                createSimpleScene(); 
     242        } 
     243        // load terrain, but only if terrainscenemanager selected 
     244        else if (mOptions.mSceneFiles == TERRAIN_SCENE) 
     245        { 
     246                Plane waterPlane; 
     247 
     248                // Set ambient light 
     249                mSceneMgr->setAmbientLight(ColourValue(0.5, 0.5, 0.5)); 
     250 
     251                // Create a light 
     252                Light* l = mSceneMgr->createLight("MainLight"); 
     253                // Accept default settings: point light, white diffuse, just set position 
     254                // NB I could attach the light to a SceneNode if I wanted it to move automatically with 
     255                //  other objects, but I don't 
     256                l->setPosition(20,80,50); 
     257 
     258                // Fog 
     259                // NB it's VERY important to set this before calling setWorldGeometry  
     260                // because the vertex program picked will be different 
     261                //ColourValue fadeColour(0.93, 0.86, 0.76); 
     262                //mSceneMgr->setFog( FOG_LINEAR, fadeColour, .001, 500, 1000); 
     263                //mWindow->getViewport(0)->setBackgroundColour(fadeColour); 
     264                mWindow->getViewport(0)->setBackgroundColour(ColourValue::Blue); 
     265 
     266                std::string terrain_cfg("terrain.cfg"); 
     267 
     268                mSceneMgr -> setWorldGeometry( terrain_cfg ); 
     269 
     270                // Define the required skyplane 
     271                Plane plane; 
     272                // 5000 world units from the camera 
     273                plane.d = 5000; 
     274                // Above the camera, facing down 
     275                plane.normal = -Vector3::UNIT_Y; 
     276 
     277                // add one robot 
     278                //Entity *robot = mSceneMgr->createEntity("TheRobot","robot.mesh"); 
     279                //SceneNode *node = mSceneMgr->getRootSceneNode()->createChildSceneNode("TheRobotNode"); 
     280                //node->attachObject(robot); 
     281                // add stuff minus gound plane 
     282                mSelectEntities &= ~ENT_PLN; 
     283                createSimpleScene(); 
     284 
     285                // Set a nice viewpoint 
     286                mCamNode->setPosition(707,2500,528); 
     287                mCamNode->setOrientation(Quaternion(-0.3486, 0.0122, 0.9365, 0.0329)); 
     288        } 
     289        // load scene from file 
     290        else 
     291        { 
     292                // don't load the other stuff 
     293                loadScene(mOptions.mSceneFiles); 
     294                // top view 
     295                mTopCam->setPosition(Vector3(1232, 3990, -1477)); 
     296                // walkthrough view 
     297                mCamNode->setPosition(Vector3(827.885, 184.435, -524.984)); 
     298                mCamNode->setOrientation(Quaternion(0.98935, 0.0348082, -0.141246, 0.00496945)); 
     299 
     300                mSceneMgr->setSkyBox(true, "Examples/CloudyNoonSkyBox", 5000, true); 
     301        } 
     302} 
     303 
     304void KdTreeApp::createSimpleScene() 
     305{ 
    238306        Entity *deaths; 
    239307        SceneNode *nodes; 
     
    245313        Real planeSixth = mPlaneDim / 6; 
    246314 
    247         // load scene from file 
    248         if (mSceneFiles != "") 
    249         { 
    250                 // don't load the other stuff 
    251                 loadScene(mSceneFiles); 
    252                 // top view 
    253                 mTopCam->setPosition(Vector3(1232, 3990, -1477)); 
    254                 // walkthrough view 
    255                 mCamNode->setPosition(Vector3(827.885, 184.435, -524.984)); 
    256                 mCamNode->setOrientation(Quaternion(0.98935, 0.0348082, -0.141246, 0.00496945)); 
    257  
    258                 mSceneMgr->setSkyBox(true, "Examples/CloudyNoonSkyBox", 5000, true); 
    259         } 
    260         else 
    261         { 
    262                 mCamNode->setPosition(Vector3(1280,600,1666)); 
    263                 mCamNode->setOrientation(Quaternion(0.936893, -0.124586, 0.323813, 0.04306)); 
    264                 //mCamera->lookAt(Vector3(-20,30,10)); 
    265  
    266                 SceneNode *anchor = mSceneMgr->getRootSceneNode()->createChildSceneNode("AnchorNode"); 
    267                 //SceneNode *grndan = anchor->createChildSceneNode("GroundAnchor"); 
    268                 SceneNode *grndan = mSceneMgr->getRootSceneNode(); 
    269  
    270                 if (mSelectEntities & ENT_GRID) 
     315        mCamNode->setPosition(Vector3(1280,600,1666)); 
     316        mCamNode->setOrientation(Quaternion(0.936893, -0.124586, 0.323813, 0.04306)); 
     317 
     318        SceneNode *anchor = mSceneMgr->getRootSceneNode()->createChildSceneNode("AnchorNode"); 
     319        //SceneNode *grndan = anchor->createChildSceneNode("GroundAnchor"); 
     320        SceneNode *grndan = mSceneMgr->getRootSceneNode(); 
     321 
     322        if (mSelectEntities & ENT_GRID) 
     323        { 
     324                for (j = 0, z =  -(mModelCount / 2 * mModelSpacing); j < mModelCount; j++, z += mModelSpacing) 
    271325                { 
    272                         for (j = 0, z =  -(mModelCount / 2 * mModelSpacing); j < mModelCount; j++, z += mModelSpacing) 
     326                        for (i = 0, x = -(mModelCount / 2 * mModelSpacing); i < mModelCount; i++, x += mModelSpacing)  
    273327                        { 
    274                                 for (i = 0, x = -(mModelCount / 2 * mModelSpacing); i < mModelCount; i++, x += mModelSpacing)  
    275                                 { 
    276                                         deaths = mSceneMgr->createEntity(cat(entName, i, j).c_str(),"robot.mesh"); 
    277                                         if (mShadowsEnabled) 
    278                                                 deaths->setCastShadows(true); 
    279                                         nodes = /*mSceneMgr->getRootSceneNode()*/anchor->createChildSceneNode(cat(nodeName, i, j).c_str(), Vector3(x, 0 , z)); 
    280                                         nodes->attachObject(deaths); 
    281                                 } 
    282                         } 
    283                 } 
    284  
    285                 if (mSelectEntities & ENT_RND) 
    286                 { 
    287                         entName = "randomdeath"; 
    288                         nodeName = "RandomDeathNode"; 
    289                         for (i = 0; i < mRandomCount; i++) 
    290                         { 
    291                                 Vector3 pos( 
    292                                         Math::RangeRandom(-planeHalf,-planeSixth),  
    293                                         0,  
    294                                         Math::RangeRandom(-planeThreeEights, planeThreeEights)); 
    295                                 deaths = mSceneMgr->createEntity(cat(entName,666,i),"robot.mesh"); 
     328                                deaths = mSceneMgr->createEntity(cat(entName, i, j).c_str(),"robot.mesh"); 
    296329                                if (mShadowsEnabled) 
    297330                                        deaths->setCastShadows(true); 
    298                                 nodes = /*mSceneMgr->getRootSceneNode()*/anchor->createChildSceneNode(cat(nodeName,666,i), pos, 
    299                                         Quaternion(Radian(Math::RangeRandom(-Math::PI, Math::PI)), Vector3::UNIT_Y)); 
     331                                nodes = /*mSceneMgr->getRootSceneNode()*/anchor->createChildSceneNode(cat(nodeName, i, j).c_str(), Vector3(x, 0 , z)); 
    300332                                nodes->attachObject(deaths); 
    301333                        } 
    302334                } 
    303  
    304                 if (mSelectEntities & ENT_SPC) 
     335        } 
     336 
     337        if (mSelectEntities & ENT_RND) 
     338        { 
     339                entName = "randomdeath"; 
     340                nodeName = "RandomDeathNode"; 
     341                for (i = 0; i < mRandomCount; i++) 
    305342                { 
    306                         entName = "randomspaceship"; 
    307                         nodeName = "RandomSpaceshipNode"; 
    308                         for (i = 0; i < mRandomCount; i++) 
    309                         { 
    310                                 Vector3 pos( 
    311                                         //Math::RangeRandom(-planeHalf,-planeSixth),  
    312                                         Math::RangeRandom(planeSixth,planeHalf),  
    313                                         Math::RangeRandom(planeHalf * 0.1, planeHalf),  
    314                                         Math::RangeRandom(-planeThreeEights, planeThreeEights)); 
    315                                 deaths = mSceneMgr->createEntity(cat(entName,666,i),"razor.mesh"); 
    316                                 if (mShadowsEnabled) 
    317                                         deaths->setCastShadows(true); 
    318                                 nodes = /*mSceneMgr->getRootSceneNode()*/anchor->createChildSceneNode(cat(nodeName,666,i), pos, 
    319                                         Quaternion(Radian(Math::RangeRandom(-Math::PI, Math::PI)), Vector3::UNIT_Y)); 
    320                                 nodes->attachObject(deaths); 
    321                         } 
     343                        Vector3 pos( 
     344                                Math::RangeRandom(-planeHalf,-planeSixth),  
     345                                0,  
     346                                Math::RangeRandom(-planeThreeEights, planeThreeEights)); 
     347                        deaths = mSceneMgr->createEntity(cat(entName,666,i),"robot.mesh"); 
     348                        if (mShadowsEnabled) 
     349                                deaths->setCastShadows(true); 
     350                        nodes = /*mSceneMgr->getRootSceneNode()*/anchor->createChildSceneNode(cat(nodeName,666,i), pos, 
     351                                Quaternion(Radian(Math::RangeRandom(-Math::PI, Math::PI)), Vector3::UNIT_Y)); 
     352                        nodes->attachObject(deaths); 
    322353                } 
    323  
    324                 if (mSelectEntities & ENT_MOV) 
     354        } 
     355 
     356        if (mSelectEntities & ENT_SPC) 
     357        { 
     358                entName = "randomspaceship"; 
     359                nodeName = "RandomSpaceshipNode"; 
     360                for (i = 0; i < mRandomCount; i++) 
    325361                { 
    326                         Entity *movingDeath = mSceneMgr->createEntity("movingDeath","robot.mesh"); 
     362                        Vector3 pos( 
     363                                //Math::RangeRandom(-planeHalf,-planeSixth),  
     364                                Math::RangeRandom(planeSixth,planeHalf),  
     365                                Math::RangeRandom(planeHalf * 0.1, planeHalf),  
     366                                Math::RangeRandom(-planeThreeEights, planeThreeEights)); 
     367                        deaths = mSceneMgr->createEntity(cat(entName,666,i),"razor.mesh"); 
    327368                        if (mShadowsEnabled) 
    328                                 movingDeath->setCastShadows( true ); 
    329  
    330                         SceneNode *deathPivotNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("deathPivotNode"); 
    331                         mMoveNode = deathPivotNode->createChildSceneNode("movingNode", Vector3(0, 0, mRotationRadius)/*, 
    332                                 Quaternion(Radian(Math::HALF_PI), Vector3::UNIT_Y)*/); 
    333                         mMoveNode->attachObject(movingDeath); 
    334  
    335                         Entity *ent_ball = mSceneMgr->createEntity("ball","sphere.mesh"); 
    336                         SceneNode *node_pivot = mMoveNode->createChildSceneNode("pivotNode"); 
    337                         SceneNode *node_ball = node_pivot->createChildSceneNode("orbitNode", Vector3(120, 40, 0)); 
    338                         node_ball->attachObject(ent_ball); 
    339                         node_ball->scale(0.1, 0.1, 0.1); 
    340                          
    341  
    342                         //mFollowCam->setAutoTracking(true, mMoveNode); 
     369                                deaths->setCastShadows(true); 
     370                        nodes = /*mSceneMgr->getRootSceneNode()*/anchor->createChildSceneNode(cat(nodeName,666,i), pos, 
     371                                Quaternion(Radian(Math::RangeRandom(-Math::PI, Math::PI)), Vector3::UNIT_Y)); 
     372                        nodes->attachObject(deaths); 
    343373                } 
    344                  
    345                 if (mSelectEntities & ENT_PLN) 
    346                 { 
    347                         Plane ground(Vector3::UNIT_Y, 0); 
    348                         MeshManager::getSingleton().createPlane("ground", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,  
    349                                 ground, mPlaneDim * 4 / 3, mPlaneDim, 20, 20, true, 1, 20, 20, Vector3::UNIT_Z); 
    350                         Entity *ent_ground = mSceneMgr->createEntity("GroundEntity", "ground"); 
    351                         ent_ground->setCastShadows(false); 
    352                         ent_ground->setMaterialName("Examples/RustySteel");//("Examples/Rockwall"); 
    353                         SceneNode *node_ground = /*mSceneMgr->getRootSceneNode()*/grndan->createChildSceneNode("GroundNode", Vector3(0, 0, 0)); 
    354                         node_ground->attachObject(ent_ground); 
    355  
    356                         //MeshManager::getSingleton().createPlane("ground2", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,  
    357                         //      ground, mPlaneDim/2, mPlaneDim, 10, 20, true, 1, 10, 20, Vector3::UNIT_Z); 
    358                         //ent_ground = mSceneMgr->createEntity("GroundEntity2", "ground2"); 
    359                         //ent_ground->setCastShadows(false); 
    360                         //ent_ground->setMaterialName("Examples/RustySteel"); 
    361                         //node_ground = /*mSceneMgr->getRootSceneNode()*/grndan->createChildSceneNode("GroundNode2", Vector3(-mPlaneDim/4, 0, 0)); 
    362                         //node_ground->attachObject(ent_ground); 
    363                 } 
    364  
    365                 // Lights 
    366                 mSceneMgr->setAmbientLight(ColourValue(0.1,0.1,0.1)); 
    367                 Light *light = mSceneMgr->createLight("light"); 
     374        } 
     375 
     376        if (mSelectEntities & ENT_MOV) 
     377        { 
     378                Entity *movingDeath = mSceneMgr->createEntity("movingDeath","robot.mesh"); 
    368379                if (mShadowsEnabled) 
    369                 { 
    370                         mSceneMgr->setShadowTechnique(SHADOWTYPE_STENCIL_ADDITIVE); 
    371                         light->setType(Light::LT_POINT); 
    372                         light->setPosition(Vector3(x, 300, z + 200)); 
    373                 } 
    374                 else 
    375                 { 
    376                         light->setType(Light::LT_DIRECTIONAL); 
    377                         light->setDirection(-1,-1,-1); 
    378                 } 
    379                 light->setDiffuseColour(ColourValue::White); 
    380                 light->setSpecularColour(ColourValue(1, 1, 0.2)); 
    381  
    382                 // Skybox 
    383                 mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox", mPlaneDim * 2); 
    384         } 
    385  
    386         /* Some math tests 
    387         Plane planeX(Vector3::UNIT_X, Vector3(10,10,10)); 
    388         Plane planeY(Vector3::UNIT_Y, Vector3(10,10,10)); 
    389         Plane planeZ(Vector3::UNIT_Z, Vector3(10,10,10)); 
    390         Vector3 vect(20,20,20); 
    391         Vector3 interX = planeX.projectVector(vect); 
    392         Vector3 interY = planeY.projectVector(vect); 
    393         Vector3 interZ = planeZ.projectVector(vect); 
    394         std::stringstream ssX, ssY, ssZ; 
    395         ssX << "The intersection of " << planeX << " and " << vect << " is at: " << interX; 
    396         ssY << "The intersection of " << planeY << " and " << vect << " is at: " << interY; 
    397         ssZ << "The intersection of " << planeZ << " and " << vect << " is at: " << interZ; 
    398         LogManager::getSingleton().logMessage(ssX.str()); 
    399         LogManager::getSingleton().logMessage(ssY.str()); 
    400         LogManager::getSingleton().logMessage(ssZ.str()); 
    401         */ 
     380                        movingDeath->setCastShadows( true ); 
     381 
     382                SceneNode *deathPivotNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("deathPivotNode"); 
     383                mMoveNode = deathPivotNode->createChildSceneNode("movingNode", Vector3(0, 0, mRotationRadius)/*, 
     384                                                                                                                                                                                                         Quaternion(Radian(Math::HALF_PI), Vector3::UNIT_Y)*/); 
     385                                                                                                                                                                                                         mMoveNode->attachObject(movingDeath); 
     386 
     387                Entity *ent_ball = mSceneMgr->createEntity("ball","sphere.mesh"); 
     388                SceneNode *node_pivot = mMoveNode->createChildSceneNode("pivotNode"); 
     389                SceneNode *node_ball = node_pivot->createChildSceneNode("orbitNode", Vector3(120, 40, 0)); 
     390                node_ball->attachObject(ent_ball); 
     391                node_ball->scale(0.1, 0.1, 0.1); 
     392 
     393 
     394                //mFollowCam->setAutoTracking(true, mMoveNode); 
     395        } 
     396 
     397        if (mSelectEntities & ENT_PLN) 
     398        { 
     399                Plane ground(Vector3::UNIT_Y, 0); 
     400                MeshManager::getSingleton().createPlane("ground", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,  
     401                        ground, mPlaneDim * 4 / 3, mPlaneDim, 20, 20, true, 1, 20, 20, Vector3::UNIT_Z); 
     402                Entity *ent_ground = mSceneMgr->createEntity("GroundEntity", "ground"); 
     403                ent_ground->setCastShadows(false); 
     404                ent_ground->setMaterialName("Examples/RustySteel");//("Examples/Rockwall"); 
     405                SceneNode *node_ground = /*mSceneMgr->getRootSceneNode()*/grndan->createChildSceneNode("GroundNode", Vector3(0, 0, 0)); 
     406                node_ground->attachObject(ent_ground); 
     407 
     408                //MeshManager::getSingleton().createPlane("ground2", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,  
     409                //      ground, mPlaneDim/2, mPlaneDim, 10, 20, true, 1, 10, 20, Vector3::UNIT_Z); 
     410                //ent_ground = mSceneMgr->createEntity("GroundEntity2", "ground2"); 
     411                //ent_ground->setCastShadows(false); 
     412                //ent_ground->setMaterialName("Examples/RustySteel"); 
     413                //node_ground = /*mSceneMgr->getRootSceneNode()*/grndan->createChildSceneNode("GroundNode2", Vector3(-mPlaneDim/4, 0, 0)); 
     414                //node_ground->attachObject(ent_ground); 
     415        } 
     416 
     417        // Lights 
     418        mSceneMgr->setAmbientLight(ColourValue(0.1,0.1,0.1)); 
     419        Light *light = mSceneMgr->createLight("light"); 
     420        if (mShadowsEnabled) 
     421        { 
     422                mSceneMgr->setShadowTechnique(SHADOWTYPE_STENCIL_ADDITIVE); 
     423                light->setType(Light::LT_POINT); 
     424                light->setPosition(Vector3(x, 300, z + 200)); 
     425        } 
     426        else 
     427        { 
     428                light->setType(Light::LT_DIRECTIONAL); 
     429                light->setDirection(-1,-1,-1); 
     430        } 
     431        light->setDiffuseColour(ColourValue::White); 
     432        light->setSpecularColour(ColourValue(1, 1, 0.2)); 
     433 
     434        // Skybox 
     435        mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox", mPlaneDim * 2); 
    402436} 
    403437 
     
    418452                "MySceneManager"); 
    419453        // set params for kdtree scene manager 
    420         if (mOptions.mSceneManager == KdTreeAppListener::SM_KDT) 
     454        if (mOptions.mSceneManager == KdTreeAppListener::SM_KDT ||  
     455                mOptions.mSceneManager == KdTreeAppListener::SM_KTE) 
    421456        { 
    422457                mSceneMgr->setOption("BuildMethod", &mOptions.mBuildMethod); 
     
    530565 
    531566        // create play button 
    532         mat = MaterialManager::getSingleton().create("KdTree/DemoPlayButton", "General"); 
     567        mat = MaterialManager::getSingleton().getByName("KdTree/DemoPlayButton"); 
     568        if (mat.isNull()) 
     569                mat = MaterialManager::getSingleton().create("KdTree/DemoPlayButton", "General"); 
    533570        mat->setLightingEnabled(false); 
    534571        tech = mat->getTechnique(0); 
     
    540577 
    541578        // create record button 
    542         mat = MaterialManager::getSingleton().create("KdTree/DemoRecordButton", "General"); 
     579        mat = MaterialManager::getSingleton().getByName("KdTree/DemoRecordButton"); 
     580        if (mat.isNull()) 
     581                mat = MaterialManager::getSingleton().create("KdTree/DemoRecordButton", "General"); 
    543582        mat->setLightingEnabled(false); 
    544583        tech = mat->getTechnique(0); 
  • GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/src/TestKdTreeAppListener.cpp

    r1265 r1273  
    1818const String KdTreeAppListener::BUILDMETHOD[] = { "RE", "PQ" }; 
    1919const String KdTreeAppListener::BUILDMETHODCAPTION[] = { "Recursive", "Priority Queue" }; 
    20 const String KdTreeAppListener::SCENEMANAGER[] = { "KDT", "OCM", "OCT", "GEN" }; 
     20const String KdTreeAppListener::SCENEMANAGER[] = { "KDT", "KTE", "OCM", "OCT", "TER", "GEN" }; 
    2121const String KdTreeAppListener::SCENEMANAGERNAME[] = 
    2222{ 
    2323        "KdTreeSceneManager", 
     24        "KdTreeTerrainSceneManager", 
    2425        "OcclusionCullingSceneManager", 
    2526        "OctreeSceneManager", 
     27        "TerrainSceneManager", 
    2628        "DefaultSceneManager" 
    2729}; 
     
    128130mRotScale(0.0f), 
    129131mDeathAngle(0.0f), 
     132mRaySceneQuery(0), 
    130133// just to stop toggles flipping too fast 
    131134mTimeUntilNextToggle(0.0f), 
     
    159162        mTopCam = sm->getCamera("TopCam"); 
    160163        mCamNode = sm->getSceneNode("PlayerCamNode"); 
     164 
     165        mRaySceneQuery = mSceneMgr->createRayQuery(Ray(mCamNode->getPosition(), Vector3::NEGATIVE_UNIT_Y)); 
    161166 
    162167        mDebugOverlay = OverlayManager::getSingleton().getByName("Core/DebugOverlay"); 
     
    404409        if (mSceneMgr->getTypeName() == "OctreeSceneManager") 
    405410                mSceneMgr->setOption("ShowOctree", &show); 
    406         else if (mSceneMgr->getTypeName() == "KdTreeSceneManager") 
     411        else if ( 
     412                mSceneMgr->getTypeName() == "KdTreeSceneManager" || 
     413                mSceneMgr->getTypeName() == "KdTreeTerrainSceneManager") 
    407414                mSceneMgr->setOption("ShowKdTree", &show); 
    408415 
     
    965972        if (!mFreeMove) 
    966973        { 
    967                 Vector3 pos = mCamNode->getPosition(); 
    968                 RaySceneQuery * rsquery = mSceneMgr->createRayQuery(Ray(pos, Vector3::NEGATIVE_UNIT_Y)); 
    969                 RaySceneQueryResult& rsresult = rsquery->execute(); 
    970  
    971                 RaySceneQueryResult::iterator it = rsresult.begin(); 
    972                 RaySceneQueryResult::iterator end = rsresult.end(); 
    973  
    974                 while (it != end && it->movable) 
    975                 { 
    976                         if (it->movable->getName() != "PlayerCam") 
     974                if (mOptions.mSceneFiles == TERRAIN_SCENE) 
     975                { 
     976                        static Vector3 pos; 
     977                        static Ray updateRay; 
     978                        pos = mCamNode->getPosition(); 
     979                        updateRay.setOrigin(pos); 
     980                        updateRay.setDirection(Vector3::NEGATIVE_UNIT_Y); 
     981                        mRaySceneQuery->setRay(updateRay); 
     982                        RaySceneQueryResult& qryResult = mRaySceneQuery->execute(); 
     983                        RaySceneQueryResult::iterator i = qryResult.begin(); 
     984                        if (i != qryResult.end() && i->worldFragment) 
    977985                        { 
    978                                 mCamNode->setPosition(pos.x, it->movable->getWorldBoundingBox().getCenter().y + 2, pos.z); 
    979                                 break; 
     986                                SceneQuery::WorldFragment* wf = i->worldFragment; 
     987                                mCamNode->setPosition(pos.x, wf->singleIntersection.y + 10, pos.z); 
    980988                        } 
    981                         it++; 
    982                 } 
    983                 OGRE_DELETE(rsquery); 
     989                } 
     990                else 
     991                { 
     992                        static Vector3 pos; 
     993                        static Ray updateRay; 
     994                        pos = mCamNode->getPosition(); 
     995                        updateRay.setOrigin(pos); 
     996                        updateRay.setDirection(Vector3::NEGATIVE_UNIT_Y); 
     997                        mRaySceneQuery->setRay(updateRay); 
     998                        RaySceneQueryResult& qryResult = mRaySceneQuery->execute(); 
     999                        RaySceneQueryResult::iterator i = qryResult.begin(); 
     1000                        while (i != qryResult.end() && i->movable) 
     1001                        { 
     1002                                if (i->movable->getName() != "PlayerCam") 
     1003                                { 
     1004                                        MovableObject *mov = i->movable; 
     1005                                        mCamNode->setPosition(pos.x, mov->getWorldBoundingBox().getCenter().y + 2, pos.z); 
     1006                                        break; 
     1007                                } 
     1008                                i++; 
     1009                        } 
     1010                } 
    9841011        } 
    9851012} 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeSceneManager.h

    r1258 r1273  
    1313#include <OgreSceneManager.h> 
    1414#include <VisibilityManager.h> 
    15  
    16 #include <OgreTerrainPrerequisites.h> 
    17 #include <OgreTerrainRenderable.h> 
    18 #include <OgreTerrainPageSource.h> 
    19 #include <OgreIteratorWrappers.h> 
    2015 
    2116#include "OgreKdTree.h" 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneManager.cpp

    r1264 r1273  
    1313#include <OgreLogManager.h> 
    1414#include <OgreStringConverter.h> 
    15  
    16 #include <OgreTerrainPage.h> 
    17 #include <OgreTerrainVertexProgram.h> 
    18 #include <OgreHeightmapTerrainPageSource.h> 
    1915 
    2016#include "OgreKdTreeSceneManager.h" 
     
    293289        } 
    294290        // options for CHC 
    295         if (strKey == "UseDepthPass") 
     291        else if (strKey == "UseDepthPass") 
    296292        { 
    297293                mUseDepthPass = (*static_cast<const bool *>(pValue)); 
    298294                return true; 
    299295        } 
    300         if (strKey == "PrepareVisualization") 
     296        else if (strKey == "PrepareVisualization") 
    301297        { 
    302298                mShowVisualization = (*static_cast<const bool *>(pValue)); 
    303299                return true; 
    304300        } 
    305         if (strKey == "RenderNodesForViz") 
     301        else if (strKey == "RenderNodesForViz") 
    306302        { 
    307303                mRenderNodesForViz = (*static_cast<const bool *>(pValue)); 
    308304                return true; 
    309305        } 
    310         if (strKey == "RenderNodesContentForViz") 
     306        else if (strKey == "RenderNodesContentForViz") 
    311307        { 
    312308                mRenderNodesContentForViz = (*static_cast<const bool *>(pValue)); 
    313309                return true; 
    314310        } 
    315         if (strKey == "SkyBoxEnabled") 
     311        else if (strKey == "SkyBoxEnabled") 
    316312        { 
    317313                mSkyBoxEnabled = (*static_cast<const bool *>(pValue)); 
    318314                return true; 
    319315        } 
    320         if (strKey == "SkyPlaneEnabled") 
     316        else if (strKey == "SkyPlaneEnabled") 
    321317        { 
    322318                mSkyPlaneEnabled = (*static_cast<const bool *>(pValue)); 
    323319                return true; 
    324320        } 
    325         if (strKey == "SkyDomeEnabled") 
     321        else if (strKey == "SkyDomeEnabled") 
    326322        { 
    327323                mSkyDomeEnabled = (*static_cast<const bool *>(pValue)); 
    328324                return true; 
    329325        } 
    330         if (strKey == "VisualizeCulledNodes") 
     326        else if (strKey == "VisualizeCulledNodes") 
    331327        { 
    332328                mVisualizeCulledNodes = (*static_cast<const bool *>(pValue)); 
    333329                return true; 
    334330        } 
    335         if (strKey == "DelayRenderTransparents") 
     331        else if (strKey == "DelayRenderTransparents") 
    336332        { 
    337333                mDelayRenderTransparents = (*static_cast<const bool *>(pValue)); 
     
    339335        } 
    340336 
    341         if (strKey == "DepthWrite") 
     337        else if (strKey == "DepthWrite") 
    342338        { 
    343339                mEnableDepthWrite = (*static_cast<const bool *>(pValue)); 
    344340                return true; 
    345341        } 
    346         if (strKey == "UseItemBuffer") 
     342        else if (strKey == "UseItemBuffer") 
    347343        { 
    348344                mUseItemBuffer = (*static_cast<const bool *>(pValue)); 
    349345                return true; 
    350346        } 
    351         if (strKey == "ExecuteVertexProgramForAllPasses") 
     347        else if (strKey == "ExecuteVertexProgramForAllPasses") 
    352348        {  
    353349                mExecuteVertexProgramForAllPasses  = (*static_cast<const bool *>(pValue)); 
    354350                return true; 
    355351        } 
    356         if (strKey == "RenderTransparentsForItemBuffer") 
     352        else if (strKey == "RenderTransparentsForItemBuffer") 
    357353        {  
    358354                mRenderTransparentsForItemBuffer  = (*static_cast<const bool *>(pValue)); 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilitySceneManagerDll.cpp

    r1264 r1273  
    2424*/ 
    2525 
    26 #include <OgreOcclusionCullingSceneManager.h> 
    27 #include <OgreKdTreeSceneManager.h> 
     26#include "OgreOcclusionCullingSceneManager.h" 
     27#include "OgreKdTreeSceneManager.h" 
     28#include "OgreKdTerrainSceneManager.h" 
    2829#include <OgreRoot.h> 
    2930#include <OgreLogManager.h> 
     
    4041OcclusionCullingSceneManagerFactory *occlusionCullingPlugin; 
    4142KdTreeSceneManagerFactory *kdTreeFactory; 
     43KdTerrainSceneManagerFactory *kdTerrainFactory; 
    4244 
    4345//----------------------------------------------------------------------- 
     
    5153        occlusionCullingPlugin = new OcclusionCullingSceneManagerFactory(visManager); 
    5254        kdTreeFactory = new KdTreeSceneManagerFactory(visManager); 
    53  
     55        kdTerrainFactory = new KdTerrainSceneManagerFactory(visManager); 
    5456        // Construct listener manager singleton 
    5557        new TerrainPageSourceListenerManager(); 
     58        new KdTerrainPageSourceListenerManager(); 
    5659 
    5760        // Register 
    5861        Root::getSingleton().addSceneManagerFactory(occlusionCullingPlugin); 
    5962        Root::getSingleton().addSceneManagerFactory(kdTreeFactory); 
     63        Root::getSingleton().addSceneManagerFactory(kdTerrainFactory); 
    6064} 
    6165//----------------------------------------------------------------------- 
     
    6468        Root::getSingleton().removeSceneManagerFactory(occlusionCullingPlugin); 
    6569        Root::getSingleton().removeSceneManagerFactory(kdTreeFactory); 
    66  
     70        Root::getSingleton().removeSceneManagerFactory(kdTerrainFactory); 
    6771        // destroy listener manager 
    6872        delete TerrainPageSourceListenerManager::getSingletonPtr(); 
     73        delete KdTerrainPageSourceListenerManager::getSingletonPtr(); 
    6974} 
    7075//----------------------------------------------------------------------- 
     
    7580        delete occlusionCullingPlugin; 
    7681        delete kdTreeFactory; 
     82        delete kdTerrainFactory; 
    7783 
    7884        delete visManager; 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj

    r1239 r1273  
    2121                                Optimization="0" 
    2222                                AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include&quot;;..\include;..\..\..\OnlineCullingCHC\include;..\..\..\Preprocessing\src" 
    23                                 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PLUGIN_OCCLUSIONCULLINGSCENEMANAGER_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE" 
     23                                PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PLUGIN_KD_TERRAIN_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE" 
    2424                                MinimalRebuild="TRUE" 
    2525                                BasicRuntimeChecks="3" 
     
    7474                        OutputDirectory="..\lib\$(ConfigurationName)" 
    7575                        IntermediateDirectory="..\obj\$(ConfigurationName)" 
     76                        ConfigurationType="2" 
     77                        CharacterSet="2" 
     78                        WholeProgramOptimization="TRUE"> 
     79                        <Tool 
     80                                Name="VCCLCompilerTool" 
     81                                Optimization="3" 
     82                                GlobalOptimizations="TRUE" 
     83                                InlineFunctionExpansion="2" 
     84                                EnableIntrinsicFunctions="TRUE" 
     85                                ImproveFloatingPointConsistency="TRUE" 
     86                                FavorSizeOrSpeed="1" 
     87                                OmitFramePointers="TRUE" 
     88                                EnableFiberSafeOptimizations="TRUE" 
     89                                OptimizeForProcessor="2" 
     90                                AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include&quot;;..\include;..\..\..\OnlineCullingCHC\include;..\..\..\Preprocessing\src" 
     91                                PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_KD_TERRAIN_EXPORTS;GTP_VISIBILITY_MODIFIED_OGRE" 
     92                                StringPooling="TRUE" 
     93                                RuntimeLibrary="2" 
     94                                BufferSecurityCheck="FALSE" 
     95                                EnableFunctionLevelLinking="TRUE" 
     96                                RuntimeTypeInfo="TRUE" 
     97                                UsePrecompiledHeader="0" 
     98                                WarningLevel="3" 
     99                                Detect64BitPortabilityProblems="TRUE" 
     100                                DebugInformationFormat="3"/> 
     101                        <Tool 
     102                                Name="VCCustomBuildTool"/> 
     103                        <Tool 
     104                                Name="VCLinkerTool" 
     105                                IgnoreImportLibrary="TRUE" 
     106                                AdditionalDependencies="OgreMain.lib CEGUIBase.lib OgreGUIRenderer.lib Plugin_OctreeSceneManager.lib GtpVisibility.lib zdll.lib zziplib.lib Preprocessor.lib xerces-c_2.lib devil.lib glut32.lib OpenGL32.Lib glu32.lib glew32.lib glew32s.lib" 
     107                                OutputFile="$(OutDir)/Plugin_VisibilitySceneManager.dll" 
     108                                Version="0.99" 
     109                                LinkIncremental="1" 
     110                                SuppressStartupBanner="TRUE" 
     111                                AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;&quot;$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)&quot;;&quot;..\..\..\Preprocessing\lib\$(ConfigurationName)&quot;;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\Preprocessing\src\GL;..\..\..\..\..\..\..\NonGTP\Zlib\lib;&quot;..\..\lib\$(ConfigurationName)&quot;" 
     112                                ModuleDefinitionFile="..\misc\OgreVisibilitySceneManager.def" 
     113                                GenerateDebugInformation="TRUE" 
     114                                SubSystem="2" 
     115                                OptimizeReferences="2" 
     116                                EnableCOMDATFolding="2" 
     117                                ImportLibrary="$(OutDir)/Plugin_VisibilitySceneManager.lib" 
     118                                TargetMachine="1"/> 
     119                        <Tool 
     120                                Name="VCMIDLTool"/> 
     121                        <Tool 
     122                                Name="VCPostBuildEventTool" 
     123                                CommandLine="copy $(OutDir)\$(TargetFileName) $(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName)"/> 
     124                        <Tool 
     125                                Name="VCPreBuildEventTool"/> 
     126                        <Tool 
     127                                Name="VCPreLinkEventTool"/> 
     128                        <Tool 
     129                                Name="VCResourceCompilerTool"/> 
     130                        <Tool 
     131                                Name="VCWebServiceProxyGeneratorTool"/> 
     132                        <Tool 
     133                                Name="VCXMLDataGeneratorTool"/> 
     134                        <Tool 
     135                                Name="VCWebDeploymentTool"/> 
     136                        <Tool 
     137                                Name="VCManagedWrapperGeneratorTool"/> 
     138                        <Tool 
     139                                Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
     140                </Configuration> 
     141                <Configuration 
     142                        Name="mlrt|Win32" 
     143                        OutputDirectory="$(ConfigurationName)" 
     144                        IntermediateDirectory="$(ConfigurationName)" 
    76145                        ConfigurationType="2" 
    77146                        CharacterSet="2" 
     
    104173                                Name="VCLinkerTool" 
    105174                                IgnoreImportLibrary="TRUE" 
    106                                 AdditionalDependencies="OgreMain.lib CEGUIBase.lib OgreGUIRenderer.lib Plugin_OctreeSceneManager.lib GtpVisibility.lib zdll.lib zziplib.lib Preprocessor.lib xerces-c_2.lib devil.lib glut32.lib OpenGL32.Lib glu32.lib glew32.lib glew32s.lib" 
     175                                AdditionalDependencies="OgreMain.lib CEGUIBase.lib OgreGUIRenderer.lib Plugin_OctreeSceneManager.lib GtpVisibility.lib zdll.lib zziplib.lib Preprocessor.lib xerces-c_2.lib devil.lib glut32.lib OpenGL32.Lib glu32.lib cg.lib cgGL.lib glew32.lib glew32s.lib" 
    107176                                OutputFile="$(OutDir)/Plugin_VisibilitySceneManager.dll" 
    108177                                Version="0.99" 
    109178                                LinkIncremental="1" 
    110179                                SuppressStartupBanner="TRUE" 
    111                                 AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;&quot;$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)&quot;;&quot;..\..\..\Preprocessing\lib\$(ConfigurationName)&quot;;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\Preprocessing\src\GL;..\..\..\..\..\..\..\NonGTP\Zlib\lib;&quot;..\..\lib\$(ConfigurationName)&quot;" 
     180                                AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;&quot;..\..\GtpVisibility\lib\$(ConfigurationName)&quot;;&quot;..\..\lib\$(ConfigurationName)&quot;;&quot;..\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)&quot;;&quot;..\..\..\Preprocessing\lib\$(ConfigurationName)&quot;;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\Preprocessing\src\GL;&quot;$(CG_LIB_PATH)&quot;;..\..\..\..\..\..\..\NonGTP\Zlib\lib" 
    112181                                ModuleDefinitionFile="..\misc\OgreVisibilitySceneManager.def" 
    113182                                GenerateDebugInformation="TRUE" 
     
    140209                </Configuration> 
    141210                <Configuration 
    142                         Name="mlrt|Win32" 
     211                        Name="Release_Internal|Win32" 
    143212                        OutputDirectory="$(ConfigurationName)" 
    144213                        IntermediateDirectory="$(ConfigurationName)" 
     
    209278                </Configuration> 
    210279                <Configuration 
    211                         Name="Release_Internal|Win32" 
     280                        Name="Release Internal|Win32" 
    212281                        OutputDirectory="$(ConfigurationName)" 
    213282                        IntermediateDirectory="$(ConfigurationName)" 
     
    277346                                Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
    278347                </Configuration> 
    279                 <Configuration 
    280                         Name="Release Internal|Win32" 
    281                         OutputDirectory="$(ConfigurationName)" 
    282                         IntermediateDirectory="$(ConfigurationName)" 
    283                         ConfigurationType="2" 
    284                         CharacterSet="2" 
    285                         WholeProgramOptimization="TRUE"> 
    286                         <Tool 
    287                                 Name="VCCLCompilerTool" 
    288                                 Optimization="3" 
    289                                 GlobalOptimizations="TRUE" 
    290                                 InlineFunctionExpansion="2" 
    291                                 EnableIntrinsicFunctions="TRUE" 
    292                                 ImproveFloatingPointConsistency="TRUE" 
    293                                 FavorSizeOrSpeed="1" 
    294                                 OmitFramePointers="TRUE" 
    295                                 EnableFiberSafeOptimizations="TRUE" 
    296                                 OptimizeForProcessor="2" 
    297                                 AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include&quot;;..\include;..\..\..\OnlineCullingCHC\include;..\..\..\Preprocessing\src" 
    298                                 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GTP_VISIBILITY_MODIFIED_OGRE" 
    299                                 StringPooling="TRUE" 
    300                                 RuntimeLibrary="2" 
    301                                 BufferSecurityCheck="FALSE" 
    302                                 EnableFunctionLevelLinking="TRUE" 
    303                                 RuntimeTypeInfo="TRUE" 
    304                                 UsePrecompiledHeader="0" 
    305                                 WarningLevel="3" 
    306                                 Detect64BitPortabilityProblems="TRUE" 
    307                                 DebugInformationFormat="3"/> 
    308                         <Tool 
    309                                 Name="VCCustomBuildTool"/> 
    310                         <Tool 
    311                                 Name="VCLinkerTool" 
    312                                 IgnoreImportLibrary="TRUE" 
    313                                 AdditionalDependencies="OgreMain.lib CEGUIBase.lib OgreGUIRenderer.lib Plugin_OctreeSceneManager.lib GtpVisibility.lib zdll.lib zziplib.lib Preprocessor.lib xerces-c_2.lib devil.lib glut32.lib OpenGL32.Lib glu32.lib cg.lib cgGL.lib glew32.lib glew32s.lib" 
    314                                 OutputFile="$(OutDir)/Plugin_VisibilitySceneManager.dll" 
    315                                 Version="0.99" 
    316                                 LinkIncremental="1" 
    317                                 SuppressStartupBanner="TRUE" 
    318                                 AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;&quot;..\..\GtpVisibility\lib\$(ConfigurationName)&quot;;&quot;..\..\lib\$(ConfigurationName)&quot;;&quot;..\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Dependencies\lib\$(ConfigurationName)&quot;;&quot;..\..\..\Preprocessing\lib\$(ConfigurationName)&quot;;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\Preprocessing\src\GL;&quot;$(CG_LIB_PATH)&quot;;..\..\..\..\..\..\..\NonGTP\Zlib\lib" 
    319                                 ModuleDefinitionFile="..\misc\OgreVisibilitySceneManager.def" 
    320                                 GenerateDebugInformation="TRUE" 
    321                                 SubSystem="2" 
    322                                 OptimizeReferences="2" 
    323                                 EnableCOMDATFolding="2" 
    324                                 ImportLibrary="$(OutDir)/Plugin_VisibilitySceneManager.lib" 
    325                                 TargetMachine="1"/> 
    326                         <Tool 
    327                                 Name="VCMIDLTool"/> 
    328                         <Tool 
    329                                 Name="VCPostBuildEventTool" 
    330                                 CommandLine="copy $(OutDir)\$(TargetFileName) $(OGRE_PATH)\Samples\Common\bin\$(ConfigurationName)"/> 
    331                         <Tool 
    332                                 Name="VCPreBuildEventTool"/> 
    333                         <Tool 
    334                                 Name="VCPreLinkEventTool"/> 
    335                         <Tool 
    336                                 Name="VCResourceCompilerTool"/> 
    337                         <Tool 
    338                                 Name="VCWebServiceProxyGeneratorTool"/> 
    339                         <Tool 
    340                                 Name="VCXMLDataGeneratorTool"/> 
    341                         <Tool 
    342                                 Name="VCWebDeploymentTool"/> 
    343                         <Tool 
    344                                 Name="VCManagedWrapperGeneratorTool"/> 
    345                         <Tool 
    346                                 Name="VCAuxiliaryManagedWrapperGeneratorTool"/> 
    347                 </Configuration> 
    348348        </Configurations> 
    349349        <References> 
     
    355355                        <Filter 
    356356                                Name="Header Files" 
    357                                 Filter=""> 
     357                                Filter="h;hpp;hxx;hm;inl;inc"> 
    358358                                <File 
    359359                                        RelativePath="..\include\OgreOcclusionCullingSceneManager.h"> 
     
    368368                        <Filter 
    369369                                Name="Source Files" 
    370                                 Filter=""> 
     370                                Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"> 
    371371                                <File 
    372372                                        RelativePath="..\src\OgreOcclusionCullingSceneManager.cpp"> 
     
    472472                        <Filter 
    473473                                Name="Header Files" 
    474                                 Filter=""> 
     474                                Filter="h;hpp;hxx;hm;inl;inc"> 
    475475                                <File 
    476476                                        RelativePath="..\include\OgreKdRenderable.h"> 
     
    494494                        <Filter 
    495495                                Name="Source Files" 
    496                                 Filter=""> 
     496                                Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"> 
    497497                                <File 
    498498                                        RelativePath="..\src\OgreKdTree.cpp"> 
     
    509509                                <File 
    510510                                        RelativePath="..\src\OgreKdTreeSceneNode.cpp"> 
     511                                </File> 
     512                        </Filter> 
     513                </Filter> 
     514                <Filter 
     515                        Name="KdTreeTerrainSceneManager" 
     516                        Filter=""> 
     517                        <Filter 
     518                                Name="Header Files" 
     519                                Filter="h;hpp;hxx;hm;inl;inc"> 
     520                                <File 
     521                                        RelativePath="..\include\OgreKdHeightmapTerrainPageSource.h"> 
     522                                </File> 
     523                                <File 
     524                                        RelativePath="..\include\OgreKdTerrainPage.h"> 
     525                                </File> 
     526                                <File 
     527                                        RelativePath="..\include\OgreKdTerrainPageSource.h"> 
     528                                </File> 
     529                                <File 
     530                                        RelativePath="..\include\OgreKdTerrainPrerequisites.h"> 
     531                                </File> 
     532                                <File 
     533                                        RelativePath="..\include\OgreKdTerrainRenderable.h"> 
     534                                </File> 
     535                                <File 
     536                                        RelativePath="..\include\OgreKdTerrainSceneManager.h"> 
     537                                </File> 
     538                                <File 
     539                                        RelativePath="..\include\OgreKdTerrainVertexProgram.h"> 
     540                                </File> 
     541                        </Filter> 
     542                        <Filter 
     543                                Name="Source Files" 
     544                                Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"> 
     545                                <File 
     546                                        RelativePath=".\OgreKdHeightmapTerrainPageSource.cpp"> 
     547                                </File> 
     548                                <File 
     549                                        RelativePath=".\OgreKdTerrainPage.cpp"> 
     550                                </File> 
     551                                <File 
     552                                        RelativePath=".\OgreKdTerrainPageSource.cpp"> 
     553                                </File> 
     554                                <File 
     555                                        RelativePath=".\OgreKdTerrainRenderable.cpp"> 
     556                                </File> 
     557                                <File 
     558                                        RelativePath=".\OgreKdTerrainSceneManager.cpp"> 
     559                                </File> 
     560                                <File 
     561                                        RelativePath=".\OgreKdTerrainVertexProgram.cpp"> 
    511562                                </File> 
    512563                        </Filter> 
Note: See TracChangeset for help on using the changeset viewer.