Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6512 in orxonox.OLD for trunk/src/lib/physics


Ignore:
Timestamp:
Jan 17, 2006, 10:01:07 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: loadParams is now virtual.
ALL THE CLASSES HAVE TO CALL

SuperClass::loadParams(root);

isntead of:
static_cast<SuperClass*>(this)→loadParams(root);

which was quite stupid anyways

Location:
trunk/src/lib/physics
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/physics/fields/field.cc

    r5708 r6512  
    5858void Field::loadParams(const TiXmlElement* root)
    5959{
    60   static_cast<PNode*>(this)->loadParams(root);
     60  PNode::loadParams(root);
    6161
    6262  LoadParam(root, "magnitude", this, Field, setMagnitude)
  • trunk/src/lib/physics/fields/field.h

    r5405 r6512  
    3939
    4040  void init();
    41   void loadParams(const TiXmlElement* root);
     41  virtual void loadParams(const TiXmlElement* root);
    4242
    4343  /**
  • trunk/src/lib/physics/fields/gravity.cc

    r5750 r6512  
    4444void Gravity::loadParams(const TiXmlElement* root)
    4545{
    46   static_cast<Field*>(this)->loadParams(root);
     46  Field::loadParams(root);
    4747}
    4848
  • trunk/src/lib/physics/fields/gravity.h

    r5405 r6512  
    2121  virtual ~Gravity();
    2222
    23   void loadParams(const TiXmlElement* root);
     23  virtual void loadParams(const TiXmlElement* root);
    2424
    2525  virtual Vector calcForce(const Vector& data) const;
  • trunk/src/lib/physics/physics_connection.cc

    r5750 r6512  
    5050  this->type = PCON_PhysIField;
    5151
    52   static_cast<BaseObject*>(this)->loadParams(root);
     52  BaseObject::loadParams(root);
    5353
    5454  LoadParam(root, "subject", this, PhysicsConnection, setSubject)
  • trunk/src/lib/physics/physics_engine.h

    r5779 r6512  
    2727  inline static PhysicsEngine* getInstance() { if (!singletonRef) singletonRef = new PhysicsEngine();  return singletonRef; };
    2828
    29   void loadParams(const TiXmlElement* root);
     29  virtual void loadParams(const TiXmlElement* root);
    3030  void loadFields(const TiXmlElement* root);
    3131  void loadConnections(const TiXmlElement* root);
Note: See TracChangeset for help on using the changeset viewer.