[Orxonox-commit 2330] r7045 - in code/branches/presentation3/src: modules/objects/triggers orxonox/interfaces orxonox/worldentities/pawns
scheusso at orxonox.net
scheusso at orxonox.net
Mon May 31 14:10:35 CEST 2010
Author: scheusso
Date: 2010-05-31 14:10:35 +0200 (Mon, 31 May 2010)
New Revision: 7045
Modified:
code/branches/presentation3/src/modules/objects/triggers/CheckPoint.cc
code/branches/presentation3/src/orxonox/interfaces/RadarViewable.cc
code/branches/presentation3/src/orxonox/interfaces/RadarViewable.h
code/branches/presentation3/src/orxonox/worldentities/pawns/Pawn.cc
Log:
RadarViewable need a worldentity* when constructing
i really thought i already did this
Modified: code/branches/presentation3/src/modules/objects/triggers/CheckPoint.cc
===================================================================
--- code/branches/presentation3/src/modules/objects/triggers/CheckPoint.cc 2010-05-31 12:07:31 UTC (rev 7044)
+++ code/branches/presentation3/src/modules/objects/triggers/CheckPoint.cc 2010-05-31 12:10:35 UTC (rev 7045)
@@ -39,7 +39,7 @@
CheckPoint::CheckPoint(BaseObject* creator)
: DistanceTrigger(creator)
- , RadarViewable(creator)
+ , RadarViewable(creator, static_cast<WorldEntity*>(this))
{
RegisterObject(CheckPoint);
Modified: code/branches/presentation3/src/orxonox/interfaces/RadarViewable.cc
===================================================================
--- code/branches/presentation3/src/orxonox/interfaces/RadarViewable.cc 2010-05-31 12:07:31 UTC (rev 7044)
+++ code/branches/presentation3/src/orxonox/interfaces/RadarViewable.cc 2010-05-31 12:10:35 UTC (rev 7045)
@@ -40,11 +40,12 @@
/**
@brief Constructor.
*/
- RadarViewable::RadarViewable(BaseObject* creator)
+ RadarViewable::RadarViewable(BaseObject* creator, const WorldEntity* wePtr)
: isHumanShip_(false)
, bVisibility_(true)
, bInitialized_(false)
, creator_(creator)
+ , wePtr_(wePtr)
, radarObjectCamouflage_(0.0f)
, radarObjectShape_(Dot)
, radarObjectDescription_("staticObject")
Modified: code/branches/presentation3/src/orxonox/interfaces/RadarViewable.h
===================================================================
--- code/branches/presentation3/src/orxonox/interfaces/RadarViewable.h 2010-05-31 12:07:31 UTC (rev 7044)
+++ code/branches/presentation3/src/orxonox/interfaces/RadarViewable.h 2010-05-31 12:10:35 UTC (rev 7045)
@@ -57,7 +57,7 @@
public:
- RadarViewable(BaseObject* creator);
+ RadarViewable(BaseObject* creator, const WorldEntity* wePtr);
virtual ~RadarViewable();
inline void setRadarObjectCamouflage(float camouflage)
@@ -97,7 +97,7 @@
inline bool getRadarVisibility() const
{ return this->bVisibility_; }
- virtual const WorldEntity* getWorldEntity() const = 0;
+ virtual const WorldEntity* getWorldEntity() const{ return this->wePtr_; }
const Vector3& getRVWorldPosition() const;
Vector3 getRVOrientedVelocity() const;
@@ -132,6 +132,7 @@
//Radar
+ const WorldEntity* wePtr_;
SmartPtr<Radar> radar_;
float radarObjectCamouflage_;
Shape radarObjectShape_;
Modified: code/branches/presentation3/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/presentation3/src/orxonox/worldentities/pawns/Pawn.cc 2010-05-31 12:07:31 UTC (rev 7044)
+++ code/branches/presentation3/src/orxonox/worldentities/pawns/Pawn.cc 2010-05-31 12:10:35 UTC (rev 7045)
@@ -54,7 +54,7 @@
Pawn::Pawn(BaseObject* creator)
: ControllableEntity(creator)
- , RadarViewable(creator)
+ , RadarViewable(creator, static_cast<WorldEntity*>(this))
{
RegisterObject(Pawn);
More information about the Orxonox-commit
mailing list