[Orxonox-commit 1066] r5787 - code/branches/tutorial/src/orxonox/worldentities
scheusso at orxonox.net
scheusso at orxonox.net
Fri Sep 25 20:43:46 CEST 2009
Author: scheusso
Date: 2009-09-25 20:43:46 +0200 (Fri, 25 Sep 2009)
New Revision: 5787
Modified:
code/branches/tutorial/src/orxonox/worldentities/Drone.cc
code/branches/tutorial/src/orxonox/worldentities/Drone.h
Log:
not using the XMLPortParamVariable hack anymore in the Drone class
Modified: code/branches/tutorial/src/orxonox/worldentities/Drone.cc
===================================================================
--- code/branches/tutorial/src/orxonox/worldentities/Drone.cc 2009-09-25 14:16:38 UTC (rev 5786)
+++ code/branches/tutorial/src/orxonox/worldentities/Drone.cc 2009-09-25 18:43:46 UTC (rev 5787)
@@ -70,9 +70,9 @@
// this calls the XMLPort function of the parent class
SUPER(Drone, XMLPort, xmlelement, mode);
- XMLPortParamVariable(Drone, "primaryThrust", primaryThrust_, xmlelement, mode);
- XMLPortParamVariable(Drone, "auxilaryThrust", auxilaryThrust_, xmlelement, mode);
- XMLPortParamVariable(Drone, "rotationThrust", rotationThrust_, xmlelement, mode);
+ XMLPortParam(Drone, "primaryThrust", setPrimaryThrust, getPrimaryThrust, xmlelement, mode);
+ XMLPortParam(Drone, "auxilaryThrust", setAuxilaryThrust, getAuxilaryThrust, xmlelement, mode);
+ XMLPortParam(Drone, "rotationThrust", setRotationThrust, getRotationThrust, xmlelement, mode);
}
void Drone::tick(float dt)
Modified: code/branches/tutorial/src/orxonox/worldentities/Drone.h
===================================================================
--- code/branches/tutorial/src/orxonox/worldentities/Drone.h 2009-09-25 14:16:38 UTC (rev 5786)
+++ code/branches/tutorial/src/orxonox/worldentities/Drone.h 2009-09-25 18:43:46 UTC (rev 5787)
@@ -68,6 +68,14 @@
inline void rotateRoll(float value)
{ this->rotateRoll(Vector2(value, 0)); }
+ void setPrimaryThrust( float thrust ){ this->primaryThrust_=thrust; }
+ void setAuxilaryThrust( float thrust ){ this->auxilaryThrust_=thrust; }
+ void setRotationThrust( float thrust ){ this->rotationThrust_=thrust; }
+
+ float getPrimaryThrust(){ return this->primaryThrust_; }
+ float getAuxilaryThrust(){ return this->auxilaryThrust_; }
+ float getRotationThrust(){ return this->rotationThrust_; }
+
private:
DroneController *myController_;
More information about the Orxonox-commit
mailing list