Changeset 5833
- Timestamp:
- Sep 29, 2009, 10:24:39 PM (15 years ago)
- Location:
- code/branches/tutorial/src/orxonox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutorial/src/orxonox/controllers/DroneController.cc
r5786 r5833 34 34 namespace orxonox 35 35 { 36 /** 37 @brief 38 Constructor. 39 */ 36 40 DroneController::DroneController(BaseObject* creator) : Controller(creator) 37 41 { … … 51 55 } 52 56 57 /** 58 @brief 59 The controlling happens here. This method defines what the controller has to do each tick. 60 @param dt 61 The duration of the tick. 62 */ 53 63 void DroneController::tick(float dt) 54 64 { -
code/branches/tutorial/src/orxonox/controllers/DroneController.h
r5766 r5833 37 37 namespace orxonox 38 38 { 39 /** 40 @brief 41 Controller for the Drone of the PPS tutorial. 42 @author 43 Oli Scheuss 44 */ 39 45 class _OrxonoxExport DroneController : public Controller, public Tickable 40 46 { … … 43 49 virtual ~DroneController(); 44 50 45 virtual void tick(float dt); 51 virtual void tick(float dt); //!< The controlling happens here. This method defines what the controller has to do each tick. 46 52 47 53 protected: -
code/branches/tutorial/src/orxonox/worldentities/Drone.cc
r5793 r5833 38 38 CreateFactory(Drone); 39 39 40 /** 41 @brief 42 Constructor. Registers the object and initializes some default values. 43 */ 40 44 Drone::Drone(BaseObject* creator) : ControllableEntity(creator) 41 45 { 42 // put your code in here:46 // put your code in here: 43 47 // - register the drone class to the core 44 48 // - create a new controller and pass our this pointer to it as creator … … 58 62 } 59 63 64 /** 65 @brief 66 Destructor. Destroys controller, if present. 67 */ 60 68 Drone::~Drone() 61 69 { … … 64 72 } 65 73 74 /** 75 @brief 76 Method for creating a Drone through XML. 77 */ 66 78 void Drone::XMLPort(Element& xmlelement, XMLPort::Mode mode) 67 79 { … … 74 86 } 75 87 88 /** 89 @brief 90 Defines which actions the Drone has to take in each tick. 91 @param dt 92 The length of the tick. 93 */ 76 94 void Drone::tick(float dt) 77 95 { … … 95 113 } 96 114 97 115 /** 116 @brief 117 Moves the Drone in the negative z-direction (Front/Back) by an amount specified by the first component of the input 2-dim vector. 118 @param value 119 The vector determining the amount of the movement. 120 */ 98 121 void Drone::moveFrontBack(const Vector2& value) 99 122 { … … 102 125 } 103 126 127 /** 128 @brief 129 Moves the Drone in the x-direction (Right/Left) by an amount specified by the first component of the input 2-dim vector. 130 @param value 131 The vector determining the amount of the movement. 132 */ 104 133 void Drone::moveRightLeft(const Vector2& value) 105 134 { … … 108 137 } 109 138 139 /** 140 @brief 141 Moves the Drone in the y-direction (Up/Down) by an amount specified by the first component of the input 2-dim vector. 142 @param value 143 The vector determining the amount of the movement. 144 */ 110 145 void Drone::moveUpDown(const Vector2& value) 111 146 { … … 114 149 } 115 150 151 /** 152 @brief 153 Rotates the Drone around the y-axis by the amount specified by the first component of the input 2-dim vector. 154 @param value 155 The vector determining the amount of the angular movement. 156 */ 116 157 void Drone::rotateYaw(const Vector2& value) 117 158 { … … 119 160 } 120 161 162 /** 163 @brief 164 Rotates the Drone around the x-axis by the amount specified by the first component of the input 2-dim vector. 165 @param value 166 The vector determining the amount of the angular movement. 167 */ 121 168 void Drone::rotatePitch(const Vector2& value) 122 169 { … … 124 171 } 125 172 173 /** 174 @brief 175 Rotates the Drone around the z-axis by the amount specified by the first component of the input 2-dim vector. 176 @param value 177 The vector determining the amount of the angular movement. 178 */ 126 179 void Drone::rotateRoll(const Vector2& value) 127 180 { -
code/branches/tutorial/src/orxonox/worldentities/Drone.h
r5787 r5833 36 36 namespace orxonox 37 37 { 38 39 /** 40 @brief 41 Drone, that is made to move upon a specified pattern. 42 This class was constructed for the PPS tutorial. 43 @author 44 Oli Scheuss 45 */ 38 46 class _OrxonoxExport Drone : public ControllableEntity 39 47 { … … 42 50 virtual ~Drone(); 43 51 44 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 45 virtual void tick(float dt); 52 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a Drone through XML. 53 virtual void tick(float dt); //!< Defines which actions the Drone has to take in each tick. 46 54 47 55 … … 54 62 virtual void rotateRoll(const Vector2& value); 55 63 56 64 /** 65 @brief Moves the Drone in the Front/Back-direction by the specifed amount. 66 @param value The amount by which the drone is to be moved. 67 */ 57 68 inline void moveFrontBack(float value) 58 69 { this->moveFrontBack(Vector2(value, 0)); } 70 /** 71 @brief Moves the Drone in the Right/Left-direction by the specifed amount. 72 @param value The amount by which the drone is to be moved. 73 */ 59 74 inline void moveRightLeft(float value) 60 75 { this->moveRightLeft(Vector2(value, 0)); } 76 /** 77 @brief Moves the Drone in the Up/Down-direction by the specifed amount. 78 @param value The amount by which the drone is to be moved. 79 */ 61 80 inline void moveUpDown(float value) 62 81 { this->moveUpDown(Vector2(value, 0)); } 63 82 83 /** 84 @brief Rotates the Drone around the y-axis by the specifed amount. 85 @param value The amount by which the drone is to be rotated. 86 */ 64 87 inline void rotateYaw(float value) 65 88 { this->rotateYaw(Vector2(value, 0)); } 89 /** 90 @brief Rotates the Drone around the x-axis by the specifed amount. 91 @param value The amount by which the drone is to be rotated. 92 */ 66 93 inline void rotatePitch(float value) 67 94 { this->rotatePitch(Vector2(value, 0)); } 95 /** 96 @brief Rotates the Drone around the z-axis by the specifed amount. 97 @param value The amount by which the drone is to be rotated. 98 */ 68 99 inline void rotateRoll(float value) 69 100 { this->rotateRoll(Vector2(value, 0)); } … … 78 109 79 110 private: 80 DroneController *myController_; 111 DroneController *myController_; //!< The controller of the Drone. 81 112 82 113 Vector3 steering_; 83 btVector3 localLinearAcceleration_; 84 btVector3 localAngularAcceleration_; 114 btVector3 localLinearAcceleration_; //!< The linear acceleration that is used to move the Drone the next tick. 115 btVector3 localAngularAcceleration_; //!< The linear angular acceleration that is used to move the Drone the next tick. 85 116 float primaryThrust_; 86 117 float auxilaryThrust_;
Note: See TracChangeset
for help on using the changeset viewer.