Changeset 9686 in orxonox.OLD for branches/new_class_id/src/lib/physics/physics_engine.cc
- Timestamp:
- Aug 22, 2006, 2:36:54 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/physics/physics_engine.cc
r9406 r9686 18 18 #include "physics_engine.h" 19 19 20 #include "class_list.h"21 20 #include "parser/tinyxml/tinyxml.h" 22 21 #include "util/loading/factory.h" … … 25 24 26 25 27 28 /** 29 * standard constructor30 */26 NewObjectListDefinition(PhysicsEngine); 27 /** 28 * @brief standard constructor 29 */ 31 30 PhysicsEngine::PhysicsEngine() 32 31 { 33 this-> setClassID(CL_PHYSICS_ENGINE, "PhysicsEngine");32 this->registerObject(this, PhysicsEngine::_objectList); 34 33 this->setName("PhysicsEngine"); 35 34 this->interfaces = NULL; … … 130 129 PhysicsInterface* PhysicsEngine::getPhysicsInterfaceByName(const std::string& physicsInterfaceName) const 131 130 { 132 BaseObject* interface = ClassList::getObject(physicsInterfaceName, CL_PHYSICS_INTERFACE); 133 return (interface != NULL)? dynamic_cast<PhysicsInterface*>(interface) : NULL; 131 return PhysicsInterface::objectList().getObject(physicsInterfaceName); 134 132 } 135 133 … … 223 221 224 222 /* actually tick all the PhysicsInterfaces. Move the objects around */ 225 if (this->interfaces != NULL || (this->interfaces = ClassList::getList(CL_PHYSICS_INTERFACE)) != NULL) 226 {227 std::list<BaseObject*>::const_iterator tickPhys;228 for (tickPhys = this->interfaces->begin(); tickPhys != this->interfaces->end(); tickPhys++)229 dynamic_cast<PhysicsInterface*>(*tickPhys)->tickPhys(dt);230 }223 224 NewObjectList<PhysicsInterface>::const_iterator it; 225 for (it = PhysicsInterface::objectList().begin(); 226 it != PhysicsInterface::objectList().end(); 227 ++it) 228 (*it)->tickPhys(dt); 231 229 } 232 230
Note: See TracChangeset
for help on using the changeset viewer.