Changeset 554
- Timestamp:
- Dec 17, 2007, 1:58:26 AM (17 years ago)
- Location:
- code/branches/FICN/src/orxonox/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/objects/WorldEntity.cc
r513 r554 31 31 #include "WorldEntity.h" 32 32 #include "../core/CoreIncludes.h" 33 #include "../orxonox.h" 33 34 34 35 namespace orxonox … … 36 37 CreateFactory(WorldEntity); 37 38 38 Ogre::SceneManager* WorldEntity::sceneManager_s = 0;39 39 unsigned int WorldEntity::worldEntityCounter_s = 0; 40 int WorldEntity::num_s = 0;41 40 42 41 WorldEntity::WorldEntity() … … 44 43 RegisterObject(WorldEntity); 45 44 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()) 50 46 { 51 47 std::ostringstream name; 52 48 name << (WorldEntity::worldEntityCounter_s++); 53 49 this->setName("WorldEntity" + name.str()); 54 node_ = WorldEntity::sceneManager_s->getRootSceneNode()->createChildSceneNode(this->getName());50 node_ = Orxonox::getSingleton()->getSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName()); 55 51 } 56 52 -
code/branches/FICN/src/orxonox/objects/WorldEntity.h
r533 r554 18 18 void tick(float dt); 19 19 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:32 20 inline Ogre::SceneNode* getNode() 33 21 { return this->node_; } … … 114 102 115 103 116 static Ogre::SceneManager* sceneManager_s; 117 static int num_s; 104 private: 105 Ogre::SceneNode* node_; 106 static unsigned int worldEntityCounter_s; 118 107 108 bool bStatic_; 109 Vector3 velocity_; 110 Vector3 acceleration_; 111 Vector3 rotationAxis_; 112 Radian rotationRate_; 113 Radian momentum_; 119 114 }; 120 115 }
Note: See TracChangeset
for help on using the changeset viewer.