Changeset 2775 for code/branches/tutorial/src/orxonox/objects/controllers
- Timestamp:
- Mar 12, 2009, 11:12:01 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutorial/src/orxonox/objects/controllers/DroneController.cc
r2767 r2775 32 32 #include "util/Math.h" 33 33 34 35 34 namespace orxonox 36 35 { … … 40 39 // - make sure to register the object in the factory 41 40 // - do any kind of initialisation 42 43 44 41 42 43 45 44 // this checks that our creator really is a drone 46 45 // and saves the pointer to the drone for the controlling commands 47 assert(dynamic_cast<Drone*>(creator) !=0);46 assert(dynamic_cast<Drone*>(creator) != 0); 48 47 this->setControllableEntity(dynamic_cast<Drone*>(creator)); 49 48 } … … 57 56 // Place your code here: 58 57 // - steering commands 59 Drone *myDrone = static_cast<Drone*>(this->getControllableEntity());58 Drone* myDrone = static_cast<Drone*>(this->getControllableEntity()); 60 59 // you can use the following commands for steering 61 60 // - moveFrontBack, moveRightLeft, moveUpDown 62 61 // - rotatePitch, rotateYaw, rotateRoll 63 62 // - apply the to myDrone (e.g. myDrone->rotateYaw(..) ) 64 63 65 64 } 66 65 }
Note: See TracChangeset
for help on using the changeset viewer.