Changeset 7446
- Timestamp:
- Sep 13, 2010, 3:07:04 PM (14 years ago)
- Location:
- code/branches/tutorial2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutorial2/data/levels/tutorial.oxw
r7444 r7446 28 28 29 29 <!-- TODO: Insert drone here. --> 30 <!-- TODO: Remove. -->31 <AutonomousDrone32 primaryThrust = 10033 auxiliaryThrust = 3034 rotationThrust = 2535 mass = 5036 linearDamping = 0.937 angularDamping = 0.738 >39 <attached>40 <Model scale="10" mesh="drone.mesh"/>41 </attached>42 <collisionShapes>43 <BoxCollisionShape position="0,0,0" halfExtents="10, 10, 10" />44 </collisionShapes>45 </AutonomousDrone>46 30 47 31 </Scene> -
code/branches/tutorial2/src/orxonox/controllers/AutonomousDroneController.cc
r7444 r7446 46 46 // Make sure to register the object in the factory. 47 47 // Do some kind of initialisation. 48 //TODO: Remove.49 RegisterObject(AutonomousDroneController);50 48 51 49 // This checks that our creator really is a drone … … 80 78 // - rotatePitch, rotateYaw, rotateRoll 81 79 // Apply the to myDrone (e.g. myDrone->rotateYaw(..) ) 82 //TODO: Remove:83 myDrone->rotateRoll(dt*2);84 myDrone->moveFrontBack(dt*50);85 myDrone->rotateYaw(dt);86 80 87 81 } -
code/branches/tutorial2/src/orxonox/controllers/CMakeLists.txt
r7444 r7446 1 1 ADD_SOURCE_FILES(ORXONOX_SRC_FILES 2 AutonomousDroneController.cc3 2 Controller.cc 4 3 HumanController.cc -
code/branches/tutorial2/src/orxonox/worldentities/AutonomousDrone.cc
r7444 r7446 36 36 //TODO: Put your code in here: 37 37 // Create the factory for the drone. 38 //TODO: Remove.39 CreateFactory(AutonomousDrone);40 38 41 39 /** … … 49 47 //TODO: Put your code in here: 50 48 // Register the drone class to the core. 51 //TODO: Remove.52 RegisterObject(AutonomousDrone);53 49 54 50 this->myController_ = NULL; … … 91 87 // Variables can be added by the following command 92 88 // XMLPortParam(Classname, "xml-attribute-name (i.e. variablename)", setFunction, getFunction, xmlelement, mode) 93 //TODO: Remove.94 XMLPortParam(AutonomousDrone, "auxiliaryThrus", setAuxiliaryThrust, getAuxiliaryThrust, xmlelement, mode);95 XMLPortParam(AutonomousDrone, "rotationThrust", setRotationThrust, getRotationThrust, xmlelement, mode);96 89 97 90 } -
code/branches/tutorial2/src/orxonox/worldentities/AutonomousDrone.h
r7444 r7446 109 109 //TODO: Place your set-functions here. 110 110 // - hint: auxiliary thrust, rotation thrust. 111 //TODO: Remove.112 /**113 @brief Sets the auxiliary thrust to the input amount.114 @param thrust The amount of thrust.115 */116 inline void setAuxiliaryThrust( float thrust )117 { this->auxiliaryThrust_ = thrust; }118 /**119 @brief Sets the rotation thrust to the input amount.120 @param thrust The amount of thrust.121 */122 inline void setRotationThrust( float thrust )123 { this->rotationThrust_ = thrust; }124 111 125 112 /** … … 130 117 { return this->primaryThrust_; } 131 118 //TODO: Place your get-functions here. 132 //TODO: Remove.133 /**134 @brief Gets the auxiliary thrust to the input amount.135 @return The amount of thrust.136 */137 inline float getAuxiliaryThrust()138 { return this->auxiliaryThrust_; }139 /**140 @brief Gets the rotation thrust to the input amount.141 @return The amount of thrust.142 */143 inline float getRotationThrust()144 { return this->rotationThrust_; }145 119 146 120 private: -
code/branches/tutorial2/src/orxonox/worldentities/CMakeLists.txt
r7444 r7446 1 1 ADD_SOURCE_FILES(ORXONOX_SRC_FILES 2 AutonomousDrone.cc3 2 WorldEntity.cc 4 3 StaticEntity.cc
Note: See TracChangeset
for help on using the changeset viewer.