Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 11, 2008, 10:30:49 PM (16 years ago)
Author:
rgrieder
Message:
  • Added first basic construct of object hierarchy with physics.
  • Added a few bullet classes to OrxonoxPrereqs.h
  • Added bullet header files to the msvc projects.

No Implementation at all yet, but the game still compiles and runs. Please update the media repository.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/physics/src/orxonox/objects/Scene.cc

    r2150 r2178  
    6262                this->rootSceneNode_ = 0;
    6363            }
    64         // create bullet world; bullet solver etc.
     64        }
     65        else
     66        {
     67            // create a dummy SceneManager of our own since we don't have Ogre::Root.
     68            this->sceneManager_ = new Ogre::DefaultSceneManager("");
     69            this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
     70        }
     71
     72        /////////////
     73        // Physics //
     74        /////////////
     75
     76        // create bullet world; bullet solver etc.
    6577
    6678        // int maxProxies = 1024;
     
    7082        bt32BitAxisSweep3* broadphase = new bt32BitAxisSweep3(worldAabbMin,worldAabbMax);
    7183
    72         this -> collisionConfiguration_ = new btDefaultCollisionConfiguration();
     84        this -> collisionConfiguration_ = new btDefaultCollisionConfiguration();
    7385        this -> dispatcher_ = new btCollisionDispatcher(collisionConfiguration_);
    7486
     
    7789        this -> dynamicsWorld_ =  new btDiscreteDynamicsWorld(dispatcher_,broadphase,solver_,collisionConfiguration_);
    7890
    79       //  dynamicsWorld->setGravity(btVector3(0,-10,0));
     91        dynamicsWorld_->setGravity(btVector3(0,-10,0));
    8092
    81         }
    82         else
    83         {
    84             // create a dummy SceneManager of our own since we don't have Ogre::Root.
    85             this->sceneManager_ = new Ogre::DefaultSceneManager("");
    86             this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
    87         }
    8893
    8994        // test test test
     
    108113            if (Ogre::Root::getSingletonPtr())
    109114            {
    110 //                this->sceneManager_->destroySceneNode(this->rootSceneNode_->getName()); // TODO: remove getName() for newer versions of Ogre
    111115                Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);
    112116            }
Note: See TracChangeset for help on using the changeset viewer.