Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Nov 20, 2005, 6:32:39 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: new LoadParam procedure with all NON-cycling load-options, and it works perfectly (on first sight :))

now going to make the same for cycling LoadOptions

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

Legend:

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

    r5357 r5652  
    6060  static_cast<PNode*>(this)->loadParams(root);
    6161
    62   LoadParam<Field>(root, "magnitude", this, &Field::setMagnitude)
    63       .describe("sets the magnitude of this Field");
     62  LoadParamNEW(root, "magnitude", this, Field, setMagnitude)
     63      .describe("sets the magnitude of this Field")
     64      ->defaultValues(1, 1);
    6465
    65   LoadParam<Field>(root, "attenuation", this, &Field::setAttenuation)
     66  LoadParamNEW(root, "attenuation", this, Field, setAttenuation)
    6667      .describe("sets the attenuation of this Field.");
    6768
  • trunk/src/lib/physics/physics_connection.cc

    r5357 r5652  
    5252  static_cast<BaseObject*>(this)->loadParams(root);
    5353
    54   LoadParam<PhysicsConnection>(root, "subject", this, &PhysicsConnection::setSubject)
     54  LoadParamNEW(root, "subject", this, PhysicsConnection, setSubject)
    5555      .describe("set the subject by a name");
    5656
    57   LoadParam<PhysicsConnection>(root, "field", this, &PhysicsConnection::setField)
     57  LoadParamNEW(root, "field", this, PhysicsConnection, setField)
    5858      .describe("set the field by name");
    5959
  • trunk/src/lib/physics/physics_engine.cc

    r5217 r5652  
    9393void PhysicsEngine::loadParams(const TiXmlElement* root)
    9494{
    95   LoadParam<PhysicsEngine>(root, "Fields", this, &PhysicsEngine::loadFields)
     95  LoadParamXML(root, "Fields", this, PhysicsEngine, loadFields)
    9696      .describe("loads a list of fields");
    9797
    98   LoadParam<PhysicsEngine>(root, "Connections", this, &PhysicsEngine::loadConnections)
     98  LoadParamXML(root, "Connections", this, PhysicsEngine, loadConnections)
    9999      .describe("loads a list of fields");
    100100}
Note: See TracChangeset for help on using the changeset viewer.