Changeset 4762 in orxonox.OLD for orxonox/trunk/src/lib
- Timestamp:
- Jul 2, 2005, 1:34:42 AM (19 years ago)
- Location:
- orxonox/trunk/src/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/particles/particle_system.cc
r4746 r4762 39 39 \param type The Type of the ParticleSystem 40 40 */ 41 ParticleSystem::ParticleSystem (unsigned int maxCount, PARTICLE_TYPE type) : PhysicsInterface(this)41 ParticleSystem::ParticleSystem (unsigned int maxCount, PARTICLE_TYPE type) 42 42 { 43 43 this->init(); … … 51 51 \param root: the XML-element to load from 52 52 */ 53 ParticleSystem::ParticleSystem(const TiXmlElement* root) : PhysicsInterface(this)53 ParticleSystem::ParticleSystem(const TiXmlElement* root) 54 54 { 55 55 this->init(); -
orxonox/trunk/src/lib/physics/physics_interface.cc
r4597 r4762 36 36 \brief standard constructor 37 37 */ 38 PhysicsInterface::PhysicsInterface ( void* objectPointer)38 PhysicsInterface::PhysicsInterface () 39 39 { 40 40 this->setClassID(CL_PHYSICS_INTERFACE, "PhysicsInterface"); 41 this->objectPointer = objectPointer;42 41 43 42 this->mass = 1; … … 96 95 void PhysicsInterface::applyField(Field* field) 97 96 { 98 PNode* tmp = (PNode*) objectPointer;97 PNode* tmp = dynamic_cast<PNode*>((BaseObject*)this); 99 98 this->forceSum += field->calcForce(tmp->getAbsCoor()); 100 99 this->bForceApplied = true; … … 108 107 { 109 108 // Vector acc = this->forceSum / ( this->massChildren + this->mass ); 110 PNode* coorTick = (PNode*)(this->objectPointer);109 PNode* coorTick = dynamic_cast<PNode*>((BaseObject*)this); 111 110 if (this->bForceApplied && coorTick) 112 111 { -
orxonox/trunk/src/lib/physics/physics_interface.h
r4597 r4762 29 29 { 30 30 public: 31 PhysicsInterface( void* objectPointer);31 PhysicsInterface(); 32 32 virtual ~PhysicsInterface(); 33 33 /** \param mass the mass to set for this node. */ … … 46 46 47 47 private: 48 void* objectPointer; //!< A Pointer to the object we handel (actually should be this)49 50 51 48 float mass; //!< Mass of this object 52 49 float massChildren; //!< Sum of the masses of the children nodes
Note: See TracChangeset
for help on using the changeset viewer.