Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 554 for code


Ignore:
Timestamp:
Dec 17, 2007, 1:58:26 AM (17 years ago)
Author:
landauf
Message:

removed scenemanager hack and used orxonox.h

Location:
code/branches/FICN/src/orxonox/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/objects/WorldEntity.cc

    r513 r554  
    3131#include "WorldEntity.h"
    3232#include "../core/CoreIncludes.h"
     33#include "../orxonox.h"
    3334
    3435namespace orxonox
     
    3637    CreateFactory(WorldEntity);
    3738
    38     Ogre::SceneManager* WorldEntity::sceneManager_s = 0;
    3939    unsigned int WorldEntity::worldEntityCounter_s = 0;
    40     int WorldEntity::num_s = 0;
    4140
    4241    WorldEntity::WorldEntity()
     
    4443        RegisterObject(WorldEntity);
    4544
    46         if (WorldEntity::sceneManager_s)
    47             WorldEntity::sceneManager_s->setAmbientLight( ColourValue( 1, 1, 1 ) ); // remove this
    48 
    49         if (WorldEntity::sceneManager_s)
     45        if (Orxonox::getSingleton()->getSceneManager())
    5046        {
    5147            std::ostringstream name;
    5248            name << (WorldEntity::worldEntityCounter_s++);
    5349            this->setName("WorldEntity" + name.str());
    54             node_ = WorldEntity::sceneManager_s->getRootSceneNode()->createChildSceneNode(this->getName());
     50            node_ = Orxonox::getSingleton()->getSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName());
    5551        }
    5652
  • code/branches/FICN/src/orxonox/objects/WorldEntity.h

    r533 r554  
    1818            void tick(float dt);
    1919
    20         private:
    21             Ogre::SceneNode* node_;
    22             static unsigned int worldEntityCounter_s;
    23 
    24             bool bStatic_;
    25             Vector3 velocity_;
    26             Vector3 acceleration_;
    27             Vector3 rotationAxis_;
    28             Radian rotationRate_;
    29             Radian momentum_;
    30 
    31         public:
    3220            inline Ogre::SceneNode* getNode()
    3321                { return this->node_; }
     
    114102
    115103
    116             static Ogre::SceneManager* sceneManager_s;
    117             static int num_s;
     104        private:
     105            Ogre::SceneNode* node_;
     106            static unsigned int worldEntityCounter_s;
    118107
     108            bool bStatic_;
     109            Vector3 velocity_;
     110            Vector3 acceleration_;
     111            Vector3 rotationAxis_;
     112            Radian rotationRate_;
     113            Radian momentum_;
    119114    };
    120115}
Note: See TracChangeset for help on using the changeset viewer.