Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 2, 2005, 1:34:42 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: PhysicsInterface should now make a usefull cast: PhysicsInterface→BaseObject→PNode()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/physics/physics_interface.cc

    r4597 r4762  
    3636   \brief standard constructor
    3737 */
    38 PhysicsInterface::PhysicsInterface (void* objectPointer)
     38PhysicsInterface::PhysicsInterface ()
    3939{
    4040  this->setClassID(CL_PHYSICS_INTERFACE, "PhysicsInterface");
    41   this->objectPointer = objectPointer;
    4241
    4342  this->mass = 1;
     
    9695void PhysicsInterface::applyField(Field* field)
    9796{
    98   PNode* tmp = (PNode*) objectPointer;
     97  PNode* tmp = dynamic_cast<PNode*>((BaseObject*)this);
    9998  this->forceSum += field->calcForce(tmp->getAbsCoor());
    10099  this->bForceApplied = true;
     
    108107{
    109108  //  Vector acc = this->forceSum / ( this->massChildren + this->mass );
    110   PNode* coorTick =  (PNode*)(this->objectPointer);
     109  PNode* coorTick =  dynamic_cast<PNode*>((BaseObject*)this);
    111110  if (this->bForceApplied && coorTick)
    112111  {
Note: See TracChangeset for help on using the changeset viewer.