[Orxonox-commit 3480] r8166 - in code/branches/spaceboundaries/src/orxonox: infos worldentities
kmaurus at orxonox.net
kmaurus at orxonox.net
Fri Apr 1 21:33:38 CEST 2011
Author: kmaurus
Date: 2011-04-01 21:33:37 +0200 (Fri, 01 Apr 2011)
New Revision: 8166
Modified:
code/branches/spaceboundaries/src/orxonox/infos/GametypeInfo.cc
code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.cc
code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.h
Log:
updated to style guide: underlines at the end of member variables added
Modified: code/branches/spaceboundaries/src/orxonox/infos/GametypeInfo.cc
===================================================================
--- code/branches/spaceboundaries/src/orxonox/infos/GametypeInfo.cc 2011-03-31 22:25:28 UTC (rev 8165)
+++ code/branches/spaceboundaries/src/orxonox/infos/GametypeInfo.cc 2011-04-01 19:33:37 UTC (rev 8166)
@@ -6,7 +6,7 @@
* License notice:
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
+ * modify it under the terms of the GNU General Public Licens
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
Modified: code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.cc
===================================================================
--- code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.cc 2011-03-31 22:25:28 UTC (rev 8165)
+++ code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.cc 2011-04-01 19:33:37 UTC (rev 8166)
@@ -41,9 +41,9 @@
#include <worldentities/pawns/Pawn.h>
#include <infos/PlayerInfo.h>
-#include <OgreTextAreaOverlayElement.h>
+//#include <OgreTextAreaOverlayElement.h>
#include <OgreOverlayManager.h>
-#include <overlays/OverlayText.h>
+//#include <overlays/OverlayText.h>
namespace orxonox
{
@@ -54,38 +54,38 @@
RegisterObject(SpaceBoundaries);
COUT(0) << "Test ob Konstruktor aufgerufen wird." << std::endl; //!< message for debugging
// Show Boundaries on the radar.
- m_pColoredTextAreaOverlayElementFactory = new ColoredTextAreaOverlayElementFactory();
+// m_pColoredTextAreaOverlayElementFactory = new ColoredTextAreaOverlayElementFactory();
}
SpaceBoundaries::~SpaceBoundaries()
{
- delete pColoredTextAreaOverlayElementFactory;
+// delete pColoredTextAreaOverlayElementFactory;
}
void SpaceBoundaries::setCenter(Vector3 r)
{
- this->center = r;
+ this->center_ = r;
}
Vector3 SpaceBoundaries::getCenter()
{
- return this->center;
+ return this->center_;
}
void SpaceBoundaries::setMaxDistance(float r)
{
- this->maxDistance = r;
+ this->maxDistance_ = r;
}
float SpaceBoundaries::getMaxDistance()
{
- return this->maxDistance;
+ return this->maxDistance_;
}
void SpaceBoundaries::setWarnDistance(float r)
{
- this->warnDistance = r;
+ this->warnDistance_ = r;
}
float SpaceBoundaries::getWarnDistance()
{
- return this->warnDistance;
+ return this->warnDistance_;
}
void SpaceBoundaries::XMLPort(Element& xmlelement, XMLPort::Mode mode)
@@ -110,7 +110,7 @@
bool humanItem = this->isHumanPlayer(myItem);
COUT(0) << "Pawn wird erkannt!!!" << std::endl; //!< message for debugging
COUT(0) << "Distanz:" << distance << std::endl; //!< message for debugging
- if(distance > this->warnDistance /*&& distance < this->maxDistance*/)
+ if(distance > this->warnDistance_ /*&& distance < this->maxDistance*/)
{
COUT(0) << "You are leaving the area" << std::endl; //!< message for debugging
if(humanItem)
@@ -120,7 +120,7 @@
} else {
}
- } else if(distance > maxDistance)
+ } else if(distance > maxDistance_)
{
// Decrease Health
if(humanItem)
@@ -137,7 +137,7 @@
float SpaceBoundaries::computeDistance(WorldEntity *item)
{
Vector3 itemPosition = item->getPosition();
- return (itemPosition.distance(this->center));
+ return (itemPosition.distance(this->center_));
}
void SpaceBoundaries::displayWarning(const std::string warnText)
@@ -158,12 +158,12 @@
warning.show();*/
// Register the overlay element
- OverlayManager::getSingleton().addOverlayElementFactory(pColoredTextAreaOverlayElementFactory);
+/* OverlayManager::getSingleton().addOverlayElementFactory(pColoredTextAreaOverlayElementFactory);
Ogre::TextAreaOverlayElement *pTextArea =
(Ogre::TextAreaOverlayElement*)Ogre::OverlayManager.createOverlayElement("TextArea", "MyTextArea");
pTextArea->setCaption("Some plain text");
-
+*/
}
Modified: code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.h
===================================================================
--- code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.h 2011-03-31 22:25:28 UTC (rev 8165)
+++ code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.h 2011-04-01 19:33:37 UTC (rev 8166)
@@ -39,7 +39,7 @@
#include "worldentities/StaticEntity.h"
#include "worldentities/WorldEntity.h"
-#include <ColoredTextAreaOverlayElementFactory.h>
+//#include <ColoredTextAreaOverlayElementFactory.h>
#include <string>
@@ -66,14 +66,14 @@
void tick(float dt);
private:
- Vector3 center;
- float maxDistance;
- float warnDistance;
+ Vector3 center_;
+ float maxDistance_;
+ float warnDistance_;
float computeDistance(WorldEntity *item); //!< Auf den Mittelpunkt 'center' bezogen.
void displayWarning(const std::string warnText);
bool isHumanPlayer(Pawn *item);
- ColoredTextAreaOverlayElementFactory* pColoredTextAreaOverlayElementFactory;
+ // ColoredTextAreaOverlayElementFactory* pColoredTextAreaOverlayElementFactory;
};
}
More information about the Orxonox-commit
mailing list