Changeset 856 for code/branches/core/src/orxonox/objects
- Timestamp:
- Mar 5, 2008, 11:07:16 PM (17 years ago)
- Location:
- code/branches/core/src/orxonox/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core/src/orxonox/objects/WorldEntity.cc
r853 r856 167 167 Element& WorldEntity::XMLPort(Element& xmlelement, bool loading) 168 168 { 169 std::cout << "2_1: " << this->getPosition() << std::endl;170 169 BaseObject::XMLPort(xmlelement, loading); 171 170 … … 178 177 XMLPortParam(WorldEntity, "rotationAxis", setRotationAxis, getRotationAxis, xmlelement, loading); 179 178 XMLPortParam(WorldEntity, "rotationRate", setRotationRate, getRotationRate, xmlelement, loading); 180 std::cout << "2_2: " << this->getPosition() << std::endl; 179 180 XMLPortObject(WorldEntity, WorldEntity, "attached", attachWorldEntity, getAttachedWorldEntity, xmlelement, loading); 181 181 182 182 return xmlelement; … … 210 210 registerVar( (void*) &(this->getRotationAxis().z), sizeof(this->getRotationAxis().z), network::DATA);*/ 211 211 } 212 213 void WorldEntity::attachWorldEntity(WorldEntity* entity) 214 { 215 this->attachedWorldEntities_.push_back(entity); 216 } 217 218 const WorldEntity* WorldEntity::getAttachedWorldEntity(unsigned int index) 219 { 220 if (index < this->attachedWorldEntities_.size()) 221 return this->attachedWorldEntities_[index]; 222 else 223 return 0; 224 } 212 225 } -
code/branches/core/src/orxonox/objects/WorldEntity.h
r853 r856 27 27 virtual Element& XMLPort(Element& xmlelement, bool loading); 28 28 bool create(); 29 30 void attachWorldEntity(WorldEntity* entity); 31 const WorldEntity* getAttachedWorldEntity(unsigned int index); 29 32 30 33 inline Ogre::SceneNode* getNode() … … 156 159 Ogre::SceneNode* node_; 157 160 bool bStatic_; 161 std::vector<WorldEntity*> attachedWorldEntities_; 158 162 }; 159 163 }
Note: See TracChangeset
for help on using the changeset viewer.