[Orxonox-commit 599] r3131 - in branches/pch/src/orxonox: . tools
rgrieder at orxonox.net
rgrieder at orxonox.net
Tue Jun 9 20:37:43 CEST 2009
Author: rgrieder
Date: 2009-06-09 20:37:42 +0200 (Tue, 09 Jun 2009)
New Revision: 3131
Modified:
branches/pch/src/orxonox/CameraManager.cc
branches/pch/src/orxonox/CameraManager.h
branches/pch/src/orxonox/GraphicsManager.cc
branches/pch/src/orxonox/GraphicsManager.h
branches/pch/src/orxonox/LevelManager.cc
branches/pch/src/orxonox/LevelManager.h
branches/pch/src/orxonox/PawnManager.cc
branches/pch/src/orxonox/PlayerManager.cc
branches/pch/src/orxonox/PlayerManager.h
branches/pch/src/orxonox/tools/BillboardSet.cc
branches/pch/src/orxonox/tools/BillboardSet.h
branches/pch/src/orxonox/tools/CMakeLists.txt
branches/pch/src/orxonox/tools/Mesh.cc
branches/pch/src/orxonox/tools/Mesh.h
branches/pch/src/orxonox/tools/ParticleInterface.cc
branches/pch/src/orxonox/tools/ParticleInterface.h
branches/pch/src/orxonox/tools/Shader.cc
branches/pch/src/orxonox/tools/Shader.h
branches/pch/src/orxonox/tools/TextureGenerator.cc
branches/pch/src/orxonox/tools/TextureGenerator.h
branches/pch/src/orxonox/tools/TimeFactorListener.h
branches/pch/src/orxonox/tools/Timer.cc
branches/pch/src/orxonox/tools/Timer.h
branches/pch/src/orxonox/tools/WindowEventListener.h
Log:
Clean up in files in src/orxonox and src/orxonox/tools.
Modified: branches/pch/src/orxonox/CameraManager.cc
===================================================================
--- branches/pch/src/orxonox/CameraManager.cc 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/CameraManager.cc 2009-06-09 18:37:42 UTC (rev 3131)
@@ -29,16 +29,14 @@
#include <OgreSceneManager.h>
#include <OgreViewport.h>
-#include <OgreCamera.h>
#include <OgreCompositorManager.h>
-#include <OgreResource.h>
+#include "util/String.h"
#include "core/GameMode.h"
#include "core/Iterator.h"
+#include "tools/Shader.h"
#include "objects/worldentities/Camera.h"
#include "objects/Scene.h"
-#include "tools/Shader.h"
-#include "util/String.h"
#include "gui/GUIManager.h"
namespace orxonox
Modified: branches/pch/src/orxonox/CameraManager.h
===================================================================
--- branches/pch/src/orxonox/CameraManager.h 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/CameraManager.h 2009-06-09 18:37:42 UTC (rev 3131)
@@ -54,17 +54,17 @@
void requestFocus(Camera* camera);
void releaseFocus(Camera* camera);
+ void useCamera(Ogre::Camera* camera);
+
static CameraManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
static CameraManager* getInstancePtr() { return singletonRef_s; }
- void useCamera(Ogre::Camera* camera);
-
private:
- CameraManager(const CameraManager&);
+ CameraManager(const CameraManager&); // don't use
- std::list<Camera*> cameraList_;
- Ogre::Viewport* viewport_;
- Ogre::Camera* fallbackCamera_;
+ std::list<Camera*> cameraList_;
+ Ogre::Viewport* viewport_;
+ Ogre::Camera* fallbackCamera_;
static CameraManager* singletonRef_s;
};
Modified: branches/pch/src/orxonox/GraphicsManager.cc
===================================================================
--- branches/pch/src/orxonox/GraphicsManager.cc 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/GraphicsManager.cc 2009-06-09 18:37:42 UTC (rev 3131)
@@ -87,8 +87,6 @@
, renderWindow_(0)
, viewport_(0)
, ogreWindowEventListener_(0)
- , avgTickTime_(0.0f)
- , avgFramesPerSecond_(0.0f)
{
RegisterObject(GraphicsManager);
Modified: branches/pch/src/orxonox/GraphicsManager.h
===================================================================
--- branches/pch/src/orxonox/GraphicsManager.h 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/GraphicsManager.h 2009-06-09 18:37:42 UTC (rev 3131)
@@ -38,10 +38,9 @@
#include "OrxonoxPrereqs.h"
-#include <string>
#include <cassert>
+#include <string>
#include <OgreLog.h>
-
#include "core/OrxonoxClass.h"
namespace orxonox
@@ -65,14 +64,15 @@
inline unsigned int getDetailLevelParticle() const
{ return this->detailLevelParticle_; }
- inline Ogre::Viewport* getViewport() const
+ inline Ogre::Viewport* getViewport()
{ return this->viewport_; }
inline Ogre::RenderWindow* getRenderWindow()
{ return this->renderWindow_; }
void setCamera(Ogre::Camera* camera);
- static GraphicsManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
+ inline static GraphicsManager& getInstance()
+ { assert(singletonRef_s); return *singletonRef_s; }
private:
GraphicsManager(GraphicsManager&); // don't mess with singletons
@@ -100,10 +100,6 @@
Ogre::Viewport* viewport_; //!< default full size viewport
OgreWindowEventListener* ogreWindowEventListener_;
- // stats (Hack)
- float avgTickTime_; //!< time in ms to tick() one frame
- float avgFramesPerSecond_; //!< number of frames processed in one second
-
// config values
unsigned int detailLevelParticle_; //!< Detail level of particle effects (0: off, 1: low, 2: normal, 3: high)
std::string resourceFile_; //!< resources file name
Modified: branches/pch/src/orxonox/LevelManager.cc
===================================================================
--- branches/pch/src/orxonox/LevelManager.cc 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/LevelManager.cc 2009-06-09 18:37:42 UTC (rev 3131)
@@ -28,6 +28,7 @@
#include "LevelManager.h"
+#include <map>
#include "PlayerManager.h"
#include "objects/Level.h"
#include "objects/infos/HumanPlayer.h"
Modified: branches/pch/src/orxonox/LevelManager.h
===================================================================
--- branches/pch/src/orxonox/LevelManager.h 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/LevelManager.h 2009-06-09 18:37:42 UTC (rev 3131)
@@ -31,9 +31,8 @@
#include "OrxonoxPrereqs.h"
+#include <cassert>
#include <list>
-#include <map>
-#include <cassert>
namespace orxonox
{
@@ -56,6 +55,7 @@
void activateNextLevel();
std::list<Level*> levels_s;
+
static LevelManager* singletonRef_s;
};
}
Modified: branches/pch/src/orxonox/PawnManager.cc
===================================================================
--- branches/pch/src/orxonox/PawnManager.cc 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/PawnManager.cc 2009-06-09 18:37:42 UTC (rev 3131)
@@ -31,7 +31,6 @@
#include "core/CoreIncludes.h"
#include "objects/worldentities/pawns/Pawn.h"
-
namespace orxonox
{
PawnManager* PawnManager::singletonRef_s = 0;
Modified: branches/pch/src/orxonox/PlayerManager.cc
===================================================================
--- branches/pch/src/orxonox/PlayerManager.cc 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/PlayerManager.cc 2009-06-09 18:37:42 UTC (rev 3131)
@@ -28,11 +28,11 @@
#include "PlayerManager.h"
-#include "LevelManager.h"
+#include "core/CoreIncludes.h"
#include "core/GameMode.h"
-#include "core/CoreIncludes.h"
#include "objects/Level.h"
#include "objects/infos/HumanPlayer.h"
+#include "LevelManager.h"
namespace orxonox
{
Modified: branches/pch/src/orxonox/PlayerManager.h
===================================================================
--- branches/pch/src/orxonox/PlayerManager.h 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/PlayerManager.h 2009-06-09 18:37:42 UTC (rev 3131)
@@ -43,8 +43,8 @@
PlayerManager();
virtual ~PlayerManager();
- static PlayerManager& getInstance()
- { assert(singletonRef_s); return *singletonRef_s; }
+ inline static PlayerManager& getInstance()
+ { assert(singletonRef_s); return *singletonRef_s; }
PlayerInfo* getClient(unsigned int clientID) const;
inline const std::map<unsigned int, PlayerInfo*>& getClients() const
Modified: branches/pch/src/orxonox/tools/BillboardSet.cc
===================================================================
--- branches/pch/src/orxonox/tools/BillboardSet.cc 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/tools/BillboardSet.cc 2009-06-09 18:37:42 UTC (rev 3131)
@@ -30,14 +30,14 @@
#include <sstream>
#include <cassert>
-
#include <OgreSceneManager.h>
#include <OgreBillboardSet.h>
#include <OgreBillboard.h>
-#include "core/GameMode.h"
#include "util/Convert.h"
+#include "util/Math.h"
#include "util/String.h"
+#include "core/GameMode.h"
namespace orxonox
{
Modified: branches/pch/src/orxonox/tools/BillboardSet.h
===================================================================
--- branches/pch/src/orxonox/tools/BillboardSet.h 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/tools/BillboardSet.h 2009-06-09 18:37:42 UTC (rev 3131)
@@ -33,9 +33,8 @@
#include <string>
#include <OgrePrerequisites.h>
+#include "util/UtilPrereqs.h"
-#include "util/Math.h"
-
namespace orxonox
{
class _OrxonoxExport BillboardSet
@@ -51,7 +50,7 @@
inline Ogre::BillboardSet* getBillboardSet()
{ return this->billboardSet_; }
- inline Ogre::SceneManager* getSceneManager()
+ inline Ogre::SceneManager* getSceneManager() const
{ return this->scenemanager_; }
const std::string& getName() const;
@@ -68,9 +67,10 @@
private:
void destroyBillboardSet();
- static unsigned int billboardSetCounter_s;
Ogre::BillboardSet* billboardSet_;
Ogre::SceneManager* scenemanager_;
+
+ static unsigned int billboardSetCounter_s;
};
}
Modified: branches/pch/src/orxonox/tools/CMakeLists.txt
===================================================================
--- branches/pch/src/orxonox/tools/CMakeLists.txt 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/tools/CMakeLists.txt 2009-06-09 18:37:42 UTC (rev 3131)
@@ -1,5 +1,7 @@
ADD_SOURCE_FILES(ORXONOX_SRC_FILES
BillboardSet.cc
+ DynamicLines.cc
+ DynamicRenderable.cc
Mesh.cc
ParticleInterface.cc
Shader.cc
@@ -7,6 +9,4 @@
TimeFactorListener.cc
Timer.cc
WindowEventListener.cc
- DynamicLines.cpp
- DynamicRenderable.cpp
)
Modified: branches/pch/src/orxonox/tools/Mesh.cc
===================================================================
--- branches/pch/src/orxonox/tools/Mesh.cc 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/tools/Mesh.cc 2009-06-09 18:37:42 UTC (rev 3131)
@@ -28,14 +28,14 @@
#include "Mesh.h"
+#include <cassert>
#include <sstream>
#include <OgreEntity.h>
#include <OgreSceneManager.h>
-#include <cassert>
-#include "core/GameMode.h"
#include "util/Convert.h"
#include "util/String.h"
+#include "core/GameMode.h"
namespace orxonox
{
Modified: branches/pch/src/orxonox/tools/Mesh.h
===================================================================
--- branches/pch/src/orxonox/tools/Mesh.h 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/tools/Mesh.h 2009-06-09 18:37:42 UTC (rev 3131)
@@ -57,10 +57,11 @@
{ return this->bCastShadows_; }
private:
- static unsigned int meshCounter_s;
Ogre::Entity* entity_;
bool bCastShadows_;
Ogre::SceneManager* scenemanager_;
+
+ static unsigned int meshCounter_s;
};
}
Modified: branches/pch/src/orxonox/tools/ParticleInterface.cc
===================================================================
--- branches/pch/src/orxonox/tools/ParticleInterface.cc 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/tools/ParticleInterface.cc 2009-06-09 18:37:42 UTC (rev 3131)
@@ -33,15 +33,16 @@
#include "ParticleInterface.h"
+#include <cassert>
#include <OgreParticleSystem.h>
#include <OgreParticleEmitter.h>
#include <OgreSceneManager.h>
-#include <cassert>
+#include "util/Convert.h"
+#include "util/Math.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
#include "GraphicsManager.h"
-#include "core/GameMode.h"
-#include "core/CoreIncludes.h"
-#include "util/Convert.h"
namespace orxonox
{
@@ -131,7 +132,7 @@
else
return 0;
}
- Ogre::ParticleAffector* ParticleInterface::getAffector(unsigned int affectorNr) const
+ Ogre::ParticleAffector* ParticleInterface::getAffector(unsigned int affectorNr)
{
if (this->particleSystem_ && (affectorNr < this->particleSystem_->getNumAffectors()))
return this->particleSystem_->getAffector(affectorNr);
Modified: branches/pch/src/orxonox/tools/ParticleInterface.h
===================================================================
--- branches/pch/src/orxonox/tools/ParticleInterface.h 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/tools/ParticleInterface.h 2009-06-09 18:37:42 UTC (rev 3131)
@@ -33,9 +33,6 @@
#include <string>
#include <OgrePrerequisites.h>
-
-#include "core/OrxonoxClass.h"
-#include "util/Math.h"
#include "tools/TimeFactorListener.h"
#define getAllEmitters() \
@@ -51,7 +48,7 @@
ParticleInterface(Ogre::SceneManager* scenemanager, const std::string& templateName, LODParticle::LOD detaillevel);
virtual ~ParticleInterface();
- inline Ogre::ParticleSystem* getParticleSystem() const
+ inline Ogre::ParticleSystem* getParticleSystem()
{ return this->particleSystem_; }
Ogre::ParticleEmitter* createNewEmitter();
@@ -61,7 +58,7 @@
unsigned int getNumEmitters() const;
Ogre::ParticleAffector* addAffector(const std::string& name);
- Ogre::ParticleAffector* getAffector(unsigned int affectorNr) const;
+ Ogre::ParticleAffector* getAffector(unsigned int affectorNr);
void removeAffector(unsigned int affectorNr);
void removeAllAffectors();
unsigned int getNumAffectors() const;
@@ -94,16 +91,16 @@
private:
void updateVisibility();
- static ParticleInterface* currentParticleInterface_s;
- static unsigned int counter_s;
-
Ogre::ParticleSystem* particleSystem_;
+ Ogre::SceneManager* scenemanager_;
bool bVisible_;
bool bEnabled_;
bool bAllowedByLOD_;
unsigned int detaillevel_; //!< Detail level of this particle effect (0: off, 1: low, 2: normal, 3: high)
float speedFactor_;
- Ogre::SceneManager* scenemanager_;
+
+ static ParticleInterface* currentParticleInterface_s;
+ static unsigned int counter_s;
};
}
Modified: branches/pch/src/orxonox/tools/Shader.cc
===================================================================
--- branches/pch/src/orxonox/tools/Shader.cc 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/tools/Shader.cc 2009-06-09 18:37:42 UTC (rev 3131)
@@ -33,18 +33,15 @@
#include <OgreSceneManager.h>
#include <OgreRoot.h>
#include <OgrePlugin.h>
-
-#include "core/GameMode.h"
-#include "core/CoreIncludes.h"
-#include "core/Executor.h"
-#include "GraphicsManager.h"
-#include "util/Exception.h"
-
#include <OgreMaterial.h>
#include <OgreTechnique.h>
#include <OgrePass.h>
#include <OgreMaterialManager.h>
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "GraphicsManager.h"
+
namespace orxonox
{
bool Shader::bLoadedCgPlugin_s = false;
Modified: branches/pch/src/orxonox/tools/Shader.h
===================================================================
--- branches/pch/src/orxonox/tools/Shader.h 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/tools/Shader.h 2009-06-09 18:37:42 UTC (rev 3131)
@@ -30,9 +30,11 @@
#define _Shader_H__
#include "OrxonoxPrereqs.h"
+
+#include <map>
+#include <string>
+#include <vector>
#include <OgrePrerequisites.h>
-#include <vector>
-#include <map>
#include "objects/Tickable.h"
Modified: branches/pch/src/orxonox/tools/TextureGenerator.cc
===================================================================
--- branches/pch/src/orxonox/tools/TextureGenerator.cc 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/tools/TextureGenerator.cc 2009-06-09 18:37:42 UTC (rev 3131)
@@ -32,9 +32,11 @@
*/
#include "TextureGenerator.h"
+
#include <OgreMaterialManager.h>
#include <OgreTechnique.h>
#include "util/Convert.h"
+#include "util/Math.h"
namespace std
{
Modified: branches/pch/src/orxonox/tools/TextureGenerator.h
===================================================================
--- branches/pch/src/orxonox/tools/TextureGenerator.h 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/tools/TextureGenerator.h 2009-06-09 18:37:42 UTC (rev 3131)
@@ -35,9 +35,10 @@
#define _TextureGenerator_H__
#include "OrxonoxPrereqs.h"
+
+#include <map>
#include <string>
-#include <map>
-#include "util/Math.h"
+#include "util/UtilPrereqs.h"
namespace orxonox
{
Modified: branches/pch/src/orxonox/tools/TimeFactorListener.h
===================================================================
--- branches/pch/src/orxonox/tools/TimeFactorListener.h 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/tools/TimeFactorListener.h 2009-06-09 18:37:42 UTC (rev 3131)
@@ -32,7 +32,6 @@
#include "OrxonoxPrereqs.h"
#include "core/OrxonoxClass.h"
-
namespace orxonox
{
class _OrxonoxExport TimeFactorListener : virtual public OrxonoxClass
Modified: branches/pch/src/orxonox/tools/Timer.cc
===================================================================
--- branches/pch/src/orxonox/tools/Timer.cc 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/tools/Timer.cc 2009-06-09 18:37:42 UTC (rev 3131)
@@ -26,15 +26,15 @@
*
*/
+#include "Timer.h"
+
#include <set>
-#include "Timer.h"
-
-#include "core/Executor.h"
#include "core/CoreIncludes.h"
#include "core/ConsoleCommand.h"
#include "core/CommandExecutor.h"
#include "core/Clock.h"
+#include "core/Functor.h"
namespace orxonox
{
Modified: branches/pch/src/orxonox/tools/Timer.h
===================================================================
--- branches/pch/src/orxonox/tools/Timer.h 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/tools/Timer.h 2009-06-09 18:37:42 UTC (rev 3131)
@@ -61,6 +61,7 @@
#define _Timer_H__
#include "OrxonoxPrereqs.h"
+
#include "core/Executor.h"
#include "core/OrxonoxClass.h"
#include "tools/TimeFactorListener.h"
Modified: branches/pch/src/orxonox/tools/WindowEventListener.h
===================================================================
--- branches/pch/src/orxonox/tools/WindowEventListener.h 2009-06-09 17:51:00 UTC (rev 3130)
+++ branches/pch/src/orxonox/tools/WindowEventListener.h 2009-06-09 18:37:42 UTC (rev 3131)
@@ -32,7 +32,6 @@
#include "OrxonoxPrereqs.h"
#include "core/OrxonoxClass.h"
-
namespace orxonox
{
/**
More information about the Orxonox-commit
mailing list