[Orxonox-commit 656] r3188 - in branches/pch/src/orxonox/objects: weaponsystem/projectiles worldentities worldentities/pawns worldentities/triggers
rgrieder at orxonox.net
rgrieder at orxonox.net
Tue Jun 16 14:44:36 CEST 2009
Author: rgrieder
Date: 2009-06-16 14:44:36 +0200 (Tue, 16 Jun 2009)
New Revision: 3188
Modified:
branches/pch/src/orxonox/objects/weaponsystem/projectiles/BillboardProjectile.cc
branches/pch/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.cc
branches/pch/src/orxonox/objects/worldentities/BigExplosion.cc
branches/pch/src/orxonox/objects/worldentities/Billboard.cc
branches/pch/src/orxonox/objects/worldentities/CameraPosition.cc
branches/pch/src/orxonox/objects/worldentities/ExplosionChunk.cc
branches/pch/src/orxonox/objects/worldentities/ParticleEmitter.cc
branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc
branches/pch/src/orxonox/objects/worldentities/WorldEntity.h
branches/pch/src/orxonox/objects/worldentities/pawns/Spectator.cc
branches/pch/src/orxonox/objects/worldentities/triggers/Trigger.cc
Log:
Added attachOgreObject and detachOgreObject overloads for Ogre::Camera, Ogre::Entity, Ogre::BillboardSet and Ogre::ParticleSystem.
This saves about nine Ogre includes ;)
Modified: branches/pch/src/orxonox/objects/weaponsystem/projectiles/BillboardProjectile.cc
===================================================================
--- branches/pch/src/orxonox/objects/weaponsystem/projectiles/BillboardProjectile.cc 2009-06-16 12:26:20 UTC (rev 3187)
+++ branches/pch/src/orxonox/objects/weaponsystem/projectiles/BillboardProjectile.cc 2009-06-16 12:44:36 UTC (rev 3188)
@@ -28,7 +28,6 @@
#include "BillboardProjectile.h"
-#include <OgreBillboardSet.h>
#include "core/CoreIncludes.h"
#include "core/GameMode.h"
#include "objects/Scene.h"
Modified: branches/pch/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.cc
===================================================================
--- branches/pch/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.cc 2009-06-16 12:26:20 UTC (rev 3187)
+++ branches/pch/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.cc 2009-06-16 12:44:36 UTC (rev 3188)
@@ -28,9 +28,7 @@
#include "ParticleProjectile.h"
-#include <OgreParticleSystem.h>
#include <OgreParticleEmitter.h>
-
#include "tools/ParticleInterface.h"
#include "core/CoreIncludes.h"
#include "objects/Scene.h"
Modified: branches/pch/src/orxonox/objects/worldentities/BigExplosion.cc
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/BigExplosion.cc 2009-06-16 12:26:20 UTC (rev 3187)
+++ branches/pch/src/orxonox/objects/worldentities/BigExplosion.cc 2009-06-16 12:44:36 UTC (rev 3188)
@@ -29,7 +29,6 @@
#include "BigExplosion.h"
//#include <sstream>
-#include <OgreParticleSystem.h>
#include "util/Exception.h"
#include "core/CoreIncludes.h"
Modified: branches/pch/src/orxonox/objects/worldentities/Billboard.cc
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/Billboard.cc 2009-06-16 12:26:20 UTC (rev 3187)
+++ branches/pch/src/orxonox/objects/worldentities/Billboard.cc 2009-06-16 12:44:36 UTC (rev 3188)
@@ -28,8 +28,6 @@
#include "Billboard.h"
-#include <OgreBillboardSet.h>
-
#include "core/CoreIncludes.h"
#include "core/GameMode.h"
#include "core/XMLPort.h"
Modified: branches/pch/src/orxonox/objects/worldentities/CameraPosition.cc
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/CameraPosition.cc 2009-06-16 12:26:20 UTC (rev 3187)
+++ branches/pch/src/orxonox/objects/worldentities/CameraPosition.cc 2009-06-16 12:44:36 UTC (rev 3188)
@@ -28,7 +28,6 @@
#include "CameraPosition.h"
-#include <OgreCamera.h>
#include "core/CoreIncludes.h"
#include "core/XMLPort.h"
#include "Camera.h"
Modified: branches/pch/src/orxonox/objects/worldentities/ExplosionChunk.cc
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/ExplosionChunk.cc 2009-06-16 12:26:20 UTC (rev 3187)
+++ branches/pch/src/orxonox/objects/worldentities/ExplosionChunk.cc 2009-06-16 12:44:36 UTC (rev 3188)
@@ -28,8 +28,6 @@
#include "ExplosionChunk.h"
-#include <OgreParticleSystem.h>
-
#include "core/CoreIncludes.h"
#include "core/Executor.h"
#include "core/GameMode.h"
Modified: branches/pch/src/orxonox/objects/worldentities/ParticleEmitter.cc
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/ParticleEmitter.cc 2009-06-16 12:26:20 UTC (rev 3187)
+++ branches/pch/src/orxonox/objects/worldentities/ParticleEmitter.cc 2009-06-16 12:44:36 UTC (rev 3188)
@@ -33,8 +33,6 @@
#include "ParticleEmitter.h"
-#include <OgreParticleSystem.h>
-
#include "util/Exception.h"
#include "core/CoreIncludes.h"
#include "core/GameMode.h"
Modified: branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc 2009-06-16 12:26:20 UTC (rev 3187)
+++ branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc 2009-06-16 12:44:36 UTC (rev 3188)
@@ -29,8 +29,12 @@
#include "WorldEntity.h"
+#include <OgreBillboardSet.h>
+#include <OgreCamera.h>
+#include <OgreEntity.h>
+#include <OgreParticleSystem.h>
+#include <OgreSceneManager.h>
#include <OgreSceneNode.h>
-#include <OgreSceneManager.h>
#include <BulletDynamics/Dynamics/btRigidBody.h>
#include <boost/static_assert.hpp>
@@ -467,15 +471,27 @@
//! Attaches an Ogre::MovableObject to this WorldEntity.
void WorldEntity::attachOgreObject(Ogre::MovableObject* object)
- {
- this->node_->attachObject(object);
- }
+ { this->node_->attachObject(object); }
+ void WorldEntity::attachOgreObject(Ogre::BillboardSet* object)
+ { this->node_->attachObject(object); }
+ void WorldEntity::attachOgreObject(Ogre::Camera* object)
+ { this->node_->attachObject(object); }
+ void WorldEntity::attachOgreObject(Ogre::Entity* object)
+ { this->node_->attachObject(object); }
+ void WorldEntity::attachOgreObject(Ogre::ParticleSystem* object)
+ { this->node_->attachObject(object); }
//! Detaches an Ogre::MovableObject from this WorldEntity.
void WorldEntity::detachOgreObject(Ogre::MovableObject* object)
- {
- this->node_->detachObject(object);
- }
+ { this->node_->detachObject(object); }
+ void WorldEntity::detachOgreObject(Ogre::BillboardSet* object)
+ { this->node_->detachObject(object); }
+ void WorldEntity::detachOgreObject(Ogre::Camera* object)
+ { this->node_->detachObject(object); }
+ void WorldEntity::detachOgreObject(Ogre::Entity* object)
+ { this->node_->detachObject(object); }
+ void WorldEntity::detachOgreObject(Ogre::ParticleSystem* object)
+ { this->node_->detachObject(object); }
//! Detaches an Ogre::MovableObject (by string) from this WorldEntity.
Ogre::MovableObject* WorldEntity::detachOgreObject(const Ogre::String& name)
Modified: branches/pch/src/orxonox/objects/worldentities/WorldEntity.h
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/WorldEntity.h 2009-06-16 12:26:20 UTC (rev 3187)
+++ branches/pch/src/orxonox/objects/worldentities/WorldEntity.h 2009-06-16 12:44:36 UTC (rev 3188)
@@ -172,8 +172,18 @@
inline const std::set<WorldEntity*>& getAttachedObjects() const
{ return this->children_; }
- void attachOgreObject(Ogre::MovableObject* object);
- void detachOgreObject(Ogre::MovableObject* object);
+ void attachOgreObject(Ogre::MovableObject* object);
+ void attachOgreObject(Ogre::BillboardSet* object);
+ void attachOgreObject(Ogre::Camera* object);
+ void attachOgreObject(Ogre::Entity* object);
+ void attachOgreObject(Ogre::ParticleSystem* object);
+
+ void detachOgreObject(Ogre::MovableObject* object);
+ void detachOgreObject(Ogre::BillboardSet* object);
+ void detachOgreObject(Ogre::Camera* object);
+ void detachOgreObject(Ogre::Entity* object);
+ void detachOgreObject(Ogre::ParticleSystem* object);
+
Ogre::MovableObject* detachOgreObject(const Ogre::String& name);
inline void attachToParent(WorldEntity* parent)
Modified: branches/pch/src/orxonox/objects/worldentities/pawns/Spectator.cc
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/pawns/Spectator.cc 2009-06-16 12:26:20 UTC (rev 3187)
+++ branches/pch/src/orxonox/objects/worldentities/pawns/Spectator.cc 2009-06-16 12:44:36 UTC (rev 3188)
@@ -28,8 +28,6 @@
#include "Spectator.h"
-#include <OgreBillboardSet.h>
-
#include "core/CoreIncludes.h"
#include "core/ConfigValueIncludes.h"
#include "core/GameMode.h"
Modified: branches/pch/src/orxonox/objects/worldentities/triggers/Trigger.cc
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/triggers/Trigger.cc 2009-06-16 12:26:20 UTC (rev 3187)
+++ branches/pch/src/orxonox/objects/worldentities/triggers/Trigger.cc 2009-06-16 12:44:36 UTC (rev 3188)
@@ -28,8 +28,6 @@
#include "Trigger.h"
-#include <OgreBillboardSet.h>
-
#include "core/CoreIncludes.h"
#include "core/ConsoleCommand.h"
#include "core/GameMode.h"
More information about the Orxonox-commit
mailing list