Changeset 11258
- Timestamp:
- Oct 31, 2016, 4:06:17 PM (8 years ago)
- Location:
- code/branches/QuestGuide_HS16/src/orxonox/worldentities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypoint.cc
r11243 r11258 15 15 model = new Model(this->getContext()); 16 16 model->setMeshSource("cube.mesh"); // Name of the arrow file for now bottle 17 this->attach(model); 17 18 model->setScale(3); 18 19 //model->setOrientation(Vector3(0,0,-1)); 19 model->setPosition(this->getPosition()); // this is wrong, it has to be triggered 20 model->setPosition(Vector3(0.0,0.0,0.0)); // this is wrong, it has to be triggered 21 waypoint_active = false; 22 distancetrigger = new DistanceTrigger(this->getContext()); 23 distancetrigger->setDistance(100); 24 this->attach(distancetrigger); 20 25 } 21 26 … … 25 30 26 31 27 WorldEntity::setDirection28 WorldEntity::getPosition()29 setOrientation()32 //WorldEntity::setDirection 33 //WorldEntity::getPosition() 34 //setOrientation() 30 35 31 36 32 37 void Waypoint::XMLPort(Element& xmlelement, XMLPort::Mode mode){ 33 38 SUPER(Waypoint, XMLPort, xmlelement, mode); // From the SpaceShip.cc file 34 //XMLPortObject(SpaceShip, Engine, "engines", addEngine, getEngine, xmlelement, mode); // TRY ADDING THE WAYPOINT ARROW LIKE AN ENGINE 35 39 XMLPortParam(Waypoint, "order", getOrder, setOrder, xmlelement, mode); 36 40 37 41 } -
code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypoint.h
r11243 r11258 7 7 #include "StaticEntity.h" 8 8 #include "graphics/Model.h" 9 #include "modules/objects/triggers/DistanceTrigger.h" 9 10 10 11 #include <map> … … 38 39 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 39 40 41 inline void enable_waypoint(){ 42 this->waypoint_active = true; 43 } 44 45 inline void disable_waypoint(){ 46 this->waypoint_active = false; 47 } 48 49 inline int getOrder(){ 50 return order; 51 } 52 53 40 54 41 55 … … 44 58 //virtual bool isCollisionTypeLegal(CollisionType type) const override; 45 59 Model* model; 60 DistanceTrigger* distancetrigger; 61 bool waypoint_active; 62 int order; 46 63 47 64 // network callbacks -
code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypointarrow.cc
r11243 r11258 1 #include "Waypoint .h"1 #include "Waypointarrow.h" 2 2 3 3 #include <OgreSceneNode.h> … … 14 14 RegisterObject(Waypointarrow); 15 15 model = new Model(this->getContext()); 16 model->setMeshSource(" axes.mesh"); // Name of the arrow file for now bottle16 model->setMeshSource("cokebottle.mesh"); // Name of the arrow file for now bottle 17 17 this->attach(model); 18 18 model->setScale(3); -
code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypointarrow.h
r11243 r11258 29 29 */ 30 30 31 class _OrxonoxExport Waypoint : public StaticEntity {31 class _OrxonoxExport Waypointarrow : public StaticEntity { 32 32 33 33 public:
Note: See TracChangeset
for help on using the changeset viewer.