Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 20, 2009, 9:20:47 AM (15 years ago)
Author:
rgrieder
Message:

Merged pch branch back to trunk.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/Scene.cc

    r3110 r3196  
    3131
    3232#include <OgreRoot.h>
     33#include <OgreSceneManager.h>
    3334#include <OgreSceneManagerEnumerator.h>
    3435#include <OgreSceneNode.h>
    3536
    36 #include "BulletCollision/BroadphaseCollision/btAxisSweep3.h"
    37 #include "BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h"
    38 #include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
    39 #include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h"
     37#include <BulletCollision/BroadphaseCollision/btAxisSweep3.h>
     38#include <BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h>
     39#include <BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h>
     40#include <BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h>
    4041
    4142#include "core/CoreIncludes.h"
     
    5859        if (GameMode::showsGraphics())
    5960        {
    60             if (Ogre::Root::getSingletonPtr())
    61             {
    62                 this->sceneManager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC);
    63                 this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
    64             }
    65             else
    66             {
    67                 this->sceneManager_ = 0;
    68                 this->rootSceneNode_ = 0;
    69             }
     61            assert(Ogre::Root::getSingletonPtr());
     62            this->sceneManager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC);
     63            this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
    7064        }
    7165        else
     
    9488        if (this->isInitialized())
    9589        {
    96             if (Ogre::Root::getSingletonPtr())
    97             {
     90            if (GameMode::showsGraphics())
    9891                Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);
    99             }
    100             else if (!GameMode::showsGraphics())
    101             {
     92            else
    10293                delete this->sceneManager_;
    103             }
    10494
    10595            this->setPhysicalWorld(false);
     
    112102
    113103        XMLPortParam(Scene, "skybox", setSkybox, getSkybox, xmlelement, mode);
    114         XMLPortParam(Scene, "ambientlight", setAmbientLight, getAmbientLight, xmlelement, mode).defaultValues(ColourValue(0.2, 0.2, 0.2, 1));
     104        XMLPortParam(Scene, "ambientlight", setAmbientLight, getAmbientLight, xmlelement, mode).defaultValues(ColourValue(0.2f, 0.2f, 0.2f, 1.0f));
    115105        XMLPortParam(Scene, "shadow", setShadow, getShadow, xmlelement, mode).defaultValues(true);
    116106
     
    139129        {
    140130            CCOUT(2) << "Warning: Setting the negative world range to a very small value: "
    141                      << omni_cast<std::string>(range) << std::endl;
     131                     << multi_cast<std::string>(range) << std::endl;
    142132        }
    143133        if (this->hasPhysics())
     
    158148        {
    159149            CCOUT(2) << "Warning: Setting the positive world range to a very small value: "
    160                      << omni_cast<std::string>(range) << std::endl;
     150                     << multi_cast<std::string>(range) << std::endl;
    161151        }
    162152        if (this->hasPhysics())
     
    176166        this->gravity_ = gravity;
    177167        if (this->hasPhysics())
    178             this->physicalWorld_->setGravity(omni_cast<btVector3>(this->gravity_));
     168            this->physicalWorld_->setGravity(multi_cast<btVector3>(this->gravity_));
    179169    }
    180170
     
    187177            //       It would require further investigation to properly dertermine the right choices.
    188178            this->broadphase_      = new bt32BitAxisSweep3(
    189                 omni_cast<btVector3>(this->negativeWorldRange_), omni_cast<btVector3>(this->positiveWorldRange_));
     179                multi_cast<btVector3>(this->negativeWorldRange_), multi_cast<btVector3>(this->positiveWorldRange_));
    190180            this->collisionConfig_ = new btDefaultCollisionConfiguration();
    191181            this->dispatcher_      = new btCollisionDispatcher(this->collisionConfig_);
     
    193183
    194184            this->physicalWorld_   = new btDiscreteDynamicsWorld(this->dispatcher_, this->broadphase_, this->solver_, this->collisionConfig_);
    195             this->physicalWorld_->setGravity(omni_cast<btVector3>(this->gravity_));
     185            this->physicalWorld_->setGravity(multi_cast<btVector3>(this->gravity_));
    196186
    197187            // also set the collision callback variable.
Note: See TracChangeset for help on using the changeset viewer.