Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 12, 2008, 4:32:10 AM (16 years ago)
Author:
landauf
Message:
  • Some small changes in XMLPortParam: It's now possible to add functions of another class. an example is setPosition and getPosition that are directly referred to Ogre::Node. Use XMLPortParamExtern if you need this. It takes the object to call the functions on as an additional argument (in our example: this→node_).
  • Removed loadParams functions and reduced the usage of XMLPortParamLoadOnly in several classes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core3/src/orxonox/objects/WorldEntity.cc

    r1559 r1592  
    9595    }
    9696
    97     void WorldEntity::loadParams(TiXmlElement* xmlElem)
    98     {
    99 
    100         BaseObject::loadParams(xmlElem);
    101         create();
    102     }
    103 
    104 
    10597    void WorldEntity::setYawPitchRoll(const Degree& yaw, const Degree& pitch, const Degree& roll)
    10698    {
     
    120112        BaseObject::XMLPort(xmlelement, mode);
    121113
    122         XMLPortParam(WorldEntity, "position", setPositionLoader2, getPosition, xmlelement, mode);
    123         XMLPortParamLoadOnly(WorldEntity, "direction", setDirectionLoader, xmlelement, mode);
     114        XMLPortParamExternTemplate(Ogre::Node, this->node_, "position", setPosition, getPosition, xmlelement, mode, Ogre::Node, const Vector3&);
     115        XMLPortParamLoadOnly(WorldEntity, "direction", setDirectionSimple, xmlelement, mode);
    124116        XMLPortParamLoadOnly(WorldEntity, "yawpitchroll", setYawPitchRoll, xmlelement, mode);
    125         XMLPortParam(WorldEntity, "scale", setTotalScale, getScale, xmlelement, mode);
    126         XMLPortParam(WorldEntity, "rotationAxis", setRotationAxisLoader, getRotationAxis, xmlelement, mode);
     117        XMLPortParam(WorldEntity, "scale", setScale, getScale, xmlelement, mode);
     118        XMLPortParamTemplate(WorldEntity, "rotationAxis", setRotationAxis, getRotationAxis, xmlelement, mode, WorldEntity, const Vector3&);
    127119        XMLPortParam(WorldEntity, "rotationRate", setRotationRate, getRotationRate, xmlelement, mode);
    128120
     
    157149      registerVar( (void*) &(this->getRotationAxis().z), sizeof(this->getRotationAxis().z), network::DATA, 0x3);
    158150      // register scale of node
    159       registerVar( (void*) &(this->getScale().x), sizeof(this->getScale().x), network::DATA, 0x3);
    160       registerVar( (void*) &(this->getScale().y), sizeof(this->getScale().y), network::DATA, 0x3);
    161       registerVar( (void*) &(this->getScale().z), sizeof(this->getScale().z), network::DATA, 0x3);
     151      registerVar( (void*) &(this->getScale3D().x), sizeof(this->getScale3D().x), network::DATA, 0x3);
     152      registerVar( (void*) &(this->getScale3D().y), sizeof(this->getScale3D().y), network::DATA, 0x3);
     153      registerVar( (void*) &(this->getScale3D().z), sizeof(this->getScale3D().z), network::DATA, 0x3);
    162154      //register staticity
    163155      registerVar( (void*) &(this->bStatic_), sizeof(this->bStatic_), network::DATA, 0x3);
Note: See TracChangeset for help on using the changeset viewer.