[11274] | 1 | #include "Waypoint.h" |
---|
| 2 | |
---|
| 3 | #include <OgreSceneNode.h> |
---|
| 4 | #include <BulletDynamics/Dynamics/btRigidBody.h> |
---|
| 5 | #include "util/OrxAssert.h" |
---|
| 6 | #include "core/CoreIncludes.h" |
---|
[11287] | 7 | #include "core/XMLPort.h" |
---|
[11274] | 8 | |
---|
[11287] | 9 | |
---|
[11274] | 10 | namespace orxonox |
---|
[11287] | 11 | |
---|
| 12 | |
---|
[11274] | 13 | { |
---|
| 14 | RegisterClass(Waypoint); |
---|
| 15 | |
---|
| 16 | Waypoint::Waypoint(Context* context) : StaticEntity(context) |
---|
| 17 | { |
---|
| 18 | RegisterObject(Waypoint); |
---|
| 19 | model = new Model(this->getContext()); |
---|
| 20 | model->setMeshSource("cube.mesh"); // Name of the arrow file for now bottle |
---|
| 21 | this->attach(model); |
---|
| 22 | model->setScale(3); |
---|
| 23 | //model->setOrientation(Vector3(0,0,-1)); |
---|
| 24 | model->setPosition(Vector3(0.0,0.0,0.0)); // this is wrong, it has to be triggered |
---|
| 25 | waypoint_actived = false; |
---|
| 26 | distancetrigger = new DistanceTrigger(this->getContext()); |
---|
| 27 | distancetrigger->setDistance(100); |
---|
| 28 | this->attach(distancetrigger); |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | Waypoint::~Waypoint() |
---|
| 32 | { |
---|
| 33 | } |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | //WorldEntity::setDirection |
---|
| 37 | //WorldEntity::getPosition() |
---|
| 38 | //setOrientation() |
---|
| 39 | |
---|
| 40 | |
---|
| 41 | void Waypoint::XMLPort(Element& xmlelement, XMLPort::Mode mode){ |
---|
| 42 | SUPER(Waypoint, XMLPort, xmlelement, mode); // From the SpaceShip.cc file |
---|
[11287] | 43 | |
---|
| 44 | XMLPortParam(Waypoint, "order", setOrder, getOrder, xmlelement, mode); |
---|
[11274] | 45 | |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | } |
---|