[Orxonox-commit 6618] r11258 - code/branches/QuestGuide_HS16/src/orxonox/worldentities
ooguz at orxonox.net
ooguz at orxonox.net
Mon Oct 31 16:06:17 CET 2016
Author: ooguz
Date: 2016-10-31 16:06:17 +0100 (Mon, 31 Oct 2016)
New Revision: 11258
Modified:
code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypoint.cc
code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypoint.h
code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypointarrow.cc
code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypointarrow.h
Log:
einige Anderungen
Modified: code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypoint.cc
===================================================================
--- code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypoint.cc 2016-10-31 15:03:16 UTC (rev 11257)
+++ code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypoint.cc 2016-10-31 15:06:17 UTC (rev 11258)
@@ -14,9 +14,14 @@
RegisterObject(Waypoint);
model = new Model(this->getContext());
model->setMeshSource("cube.mesh"); // Name of the arrow file for now bottle
+ this->attach(model);
model->setScale(3);
//model->setOrientation(Vector3(0,0,-1));
- model->setPosition(this->getPosition()); // this is wrong, it has to be triggered
+ model->setPosition(Vector3(0.0,0.0,0.0)); // this is wrong, it has to be triggered
+ waypoint_active = false;
+ distancetrigger = new DistanceTrigger(this->getContext());
+ distancetrigger->setDistance(100);
+ this->attach(distancetrigger);
}
Waypoint::~Waypoint()
@@ -24,15 +29,14 @@
}
- WorldEntity::setDirection
- WorldEntity::getPosition()
- setOrientation()
+ //WorldEntity::setDirection
+ //WorldEntity::getPosition()
+ //setOrientation()
void Waypoint::XMLPort(Element& xmlelement, XMLPort::Mode mode){
SUPER(Waypoint, XMLPort, xmlelement, mode); // From the SpaceShip.cc file
- //XMLPortObject(SpaceShip, Engine, "engines", addEngine, getEngine, xmlelement, mode); // TRY ADDING THE WAYPOINT ARROW LIKE AN ENGINE
-
+ XMLPortParam(Waypoint, "order", getOrder, setOrder, xmlelement, mode);
}
Modified: code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypoint.h
===================================================================
--- code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypoint.h 2016-10-31 15:03:16 UTC (rev 11257)
+++ code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypoint.h 2016-10-31 15:06:17 UTC (rev 11258)
@@ -6,6 +6,7 @@
#include "OrxonoxPrereqs.h"
#include "StaticEntity.h"
#include "graphics/Model.h"
+#include "modules/objects/triggers/DistanceTrigger.h"
#include <map>
#include <string>
@@ -37,12 +38,28 @@
virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+ inline void enable_waypoint(){
+ this->waypoint_active = true;
+ }
+ inline void disable_waypoint(){
+ this->waypoint_active = false;
+ }
+ inline int getOrder(){
+ return order;
+ }
+
+
+
+
private:
//virtual bool isCollisionTypeLegal(CollisionType type) const override;
Model* model;
+ DistanceTrigger* distancetrigger;
+ bool waypoint_active;
+ int order;
// network callbacks
};
Modified: code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypointarrow.cc
===================================================================
--- code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypointarrow.cc 2016-10-31 15:03:16 UTC (rev 11257)
+++ code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypointarrow.cc 2016-10-31 15:06:17 UTC (rev 11258)
@@ -1,4 +1,4 @@
-#include "Waypoint.h"
+#include "Waypointarrow.h"
#include <OgreSceneNode.h>
#include <BulletDynamics/Dynamics/btRigidBody.h>
@@ -13,7 +13,7 @@
{
RegisterObject(Waypointarrow);
model = new Model(this->getContext());
- model->setMeshSource("axes.mesh"); // Name of the arrow file for now bottle
+ model->setMeshSource("cokebottle.mesh"); // Name of the arrow file for now bottle
this->attach(model);
model->setScale(3);
//model->setOrientation(Vector3(0,0,-1));
Modified: code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypointarrow.h
===================================================================
--- code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypointarrow.h 2016-10-31 15:03:16 UTC (rev 11257)
+++ code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypointarrow.h 2016-10-31 15:06:17 UTC (rev 11258)
@@ -28,7 +28,7 @@
A StaticEntity can only have the collisition type WorldEntity::None or WorldEntity::Static. The collsion types WorldEntity::Dynamic and WorldEntity::Kinematic are illegal.
*/
- class _OrxonoxExport Waypoint : public StaticEntity {
+ class _OrxonoxExport Waypointarrow : public StaticEntity {
public:
More information about the Orxonox-commit
mailing list