- Timestamp:
- Mar 29, 2018, 12:15:19 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/3DPacman_FS18/src/modules/3DPacman/PacmanGhost.cc
r11832 r11834 50 50 this->localLinearAcceleration_.setValue(0, 0, 0); 51 51 this->localAngularAcceleration_.setValue(0, 0, 0); 52 this->primaryThrust_ = 100;53 this->auxiliaryThrust_ = 100;54 this->rotationThrust_ = 10;55 52 56 53 this->setCollisionType(CollisionType::Dynamic); 54 55 Vector3 resetposition = new Vector3(0,0,0); //Set Default start position 56 57 57 } 58 58 … … 78 78 79 79 XMLPortParam(PacmanGhost, "primaryThrust", setPrimaryThrust, getPrimaryThrust, xmlelement, mode); 80 // Make sure you add the variables auxiliaryThrust_ and rotationThrust_ to XMLPort. 81 // Variables can be added by the following command 82 // XMLPortParam(Classname, "xml-attribute-name (i.e. variablename)", setFunctionName, getFunctionName, xmlelement, mode); 83 // Also make sure that you also create the get- and set-functions in AutonomousDrone.h. As you can see, the get- and set-functions for the variable primaryThrust_ has already been specified there, so you can get your inspiration from there. 80 XMLPortParam(PacmanGhost, "auxilliaryThrust", setAuxillaryThrust, getAuxillaryThrust, xmlelement, mode); 81 XMLPortParam(PacmanGhost, "rotationThrust", setRotationThrust, getRotationThrust, xmlelement, mode); 82 XMLPortParam(PacmanGhost, "resetposition", setResetPosition, getResetPosition, xmlelement, mode); 84 83 } 85 84
Note: See TracChangeset
for help on using the changeset viewer.