Changeset 3196 for code/trunk/src/orxonox/objects/worldentities
- Timestamp:
- Jun 20, 2009, 9:20:47 AM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 64 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/pch (added) merged: 3114-3118,3124-3125,3127-3131,3133,3138-3194
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/worldentities/Attacher.h
r3078 r3196 33 33 34 34 #include <list> 35 35 #include <string> 36 #include "core/XMLNameListener.h" 36 37 #include "objects/worldentities/StaticEntity.h" 37 #include "core/XMLNameListener.h"38 38 39 39 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/Backlight.cc
r3110 r3196 31 31 #include <OgreRibbonTrail.h> 32 32 #include <OgreSceneManager.h> 33 33 #include <OgreSceneNode.h> 34 35 #include "util/Exception.h" 36 #include "core/CoreIncludes.h" 34 37 #include "core/GameMode.h" 35 #include "core/CoreIncludes.h"36 #include "core/Executor.h"37 38 #include "core/XMLPort.h" 38 39 #include "objects/Scene.h" 39 #include "util/Exception.h"40 40 41 41 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/Backlight.h
r3068 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <string> 35 #include "interfaces/TimeFactorListener.h" 33 36 #include "FadingBillboard.h" 34 #include "tools/TimeFactorListener.h"35 37 36 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/BigExplosion.cc
r3110 r3196 28 28 29 29 #include "BigExplosion.h" 30 #include "MovableEntity.h" 30 31 //#include <sstream> 32 33 #include "util/Exception.h" 34 #include "core/CoreIncludes.h" 35 #include "core/CommandExecutor.h" 36 #include "core/Executor.h" 37 #include "core/GameMode.h" 38 #include "tools/ParticleInterface.h" 39 #include "objects/Scene.h" 40 #include "objects/worldentities/ParticleSpawner.h" 31 41 #include "Model.h" 32 33 #include <OgreParticleSystem.h>34 #include <OgreSceneNode.h>35 #include <sstream>36 37 #include "core/GameMode.h"38 #include "core/CoreIncludes.h"39 #include "core/Executor.h"40 #include "core/CommandExecutor.h"41 #include "objects/Scene.h"42 #include "tools/ParticleInterface.h"43 #include "objects/worldentities/ParticleSpawner.h"44 #include "util/Exception.h"45 42 46 43 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/BigExplosion.h
r3087 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <string> 34 35 35 #include "tools/Timer.h" 36 36 #include "MovableEntity.h" 37 #include "tools/Timer.h"38 37 39 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/Billboard.cc
r3110 r3196 29 29 #include "Billboard.h" 30 30 31 #include <OgreBillboardSet.h>32 33 31 #include "core/CoreIncludes.h" 32 #include "core/GameMode.h" 34 33 #include "core/XMLPort.h" 35 #include "core/GameMode.h"36 34 #include "objects/Scene.h" 37 35 -
code/trunk/src/orxonox/objects/worldentities/Billboard.h
r3053 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 #include "StaticEntity.h" 33 34 34 #include "util/Math.h" 35 35 #include "tools/BillboardSet.h" 36 #include "objects/Teamcolourable.h" 36 #include "interfaces/TeamColourable.h" 37 #include "StaticEntity.h" 37 38 38 39 namespace orxonox 39 40 { 40 class _OrxonoxExport Billboard : public StaticEntity, public Team colourable41 class _OrxonoxExport Billboard : public StaticEntity, public TeamColourable 41 42 { 42 43 public: -
code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.cc
r3110 r3196 29 29 #include "BlinkingBillboard.h" 30 30 31 #include "core/CoreIncludes.h" 31 32 #include "core/GameMode.h" 32 #include "core/CoreIncludes.h"33 33 #include "core/XMLPort.h" 34 #include "util/Math.h"35 34 36 35 namespace orxonox … … 80 79 this->time_ += dt; 81 80 if (this->bQuadratic_) 82 this->setScale(this->amplitude_ * s quare(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_)));81 this->setScale(this->amplitude_ * static_cast<float>(square(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_)))); 83 82 else 84 this->setScale(this->amplitude_ * s in((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_));83 this->setScale(this->amplitude_ * static_cast<float>(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_))); 85 84 } 86 85 } -
code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.h
r2087 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include "util/Math.h" 35 #include "interfaces/Tickable.h" 33 36 #include "Billboard.h" 34 #include "objects/Tickable.h"35 37 36 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/Camera.cc
r3110 r3196 29 29 #include "Camera.h" 30 30 31 #include <string>32 #include <cassert>33 34 31 #include <OgreCamera.h> 35 32 #include <OgreSceneManager.h> … … 37 34 38 35 #include "util/Exception.h" 36 #include "util/String.h" 39 37 #include "core/CoreIncludes.h" 40 38 #include "core/ConfigValueIncludes.h" -
code/trunk/src/orxonox/objects/worldentities/Camera.h
r3068 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <OgrePrerequisites.h> 34 #include "util/OgreForwardRefs.h" 35 #include "interfaces/Tickable.h" 35 36 #include "objects/worldentities/StaticEntity.h" 36 #include "objects/Tickable.h"37 37 38 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/CameraPosition.cc
r3110 r3196 28 28 29 29 #include "CameraPosition.h" 30 31 #include <OgreCamera.h>32 30 33 31 #include "core/CoreIncludes.h" -
code/trunk/src/orxonox/objects/worldentities/CameraPosition.h
r3089 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 33 #include "objects/worldentities/StaticEntity.h" 35 34 -
code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc
r3110 r3196 30 30 31 31 #include <OgreSceneManager.h> 32 #include <OgreSceneNode.h> 32 33 33 34 #include "core/CoreIncludes.h" … … 35 36 #include "core/GameMode.h" 36 37 #include "core/XMLPort.h" 37 #include "core/Template.h"38 38 39 39 #include "objects/Scene.h" -
code/trunk/src/orxonox/objects/worldentities/ControllableEntity.h
r3089 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <list> 35 #include <string> 36 #include "util/Math.h" 33 37 #include "MobileEntity.h" 34 38 -
code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.cc
r3110 r3196 29 29 #include "ExplosionChunk.h" 30 30 31 #include <OgreParticleSystem.h>32 33 #include "core/GameMode.h"34 31 #include "core/CoreIncludes.h" 35 32 #include "core/Executor.h" 33 #include "core/GameMode.h" 34 #include "util/Exception.h" 36 35 #include "objects/Scene.h" 37 36 #include "tools/ParticleInterface.h" 38 #include "util/Exception.h"39 37 40 38 namespace orxonox … … 153 151 Vector3 change(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1)); 154 152 change.normalise(); 155 change *= rnd(0.4 , 0.8);153 change *= rnd(0.4f, 0.8f); 156 154 Vector3 velocity = this->getVelocity(); 157 155 velocity.normalise(); 158 156 velocity += change; 159 157 velocity.normalise(); 160 velocity *= length * rnd(0.8 , 1.0);158 velocity *= length * rnd(0.8f, 1.0f); 161 159 162 160 this->setVelocity(velocity); -
code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.h
r2662 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "tools/Timer.h" 34 35 #include "MovableEntity.h" 35 #include "tools/Timer.h"36 36 37 37 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/FadingBillboard.cc
r3110 r3196 30 30 31 31 #include "core/CoreIncludes.h" 32 #include "core/Executor.h"33 32 #include "core/XMLPort.h" 34 33 -
code/trunk/src/orxonox/objects/worldentities/FadingBillboard.h
r2662 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include "util/Math.h" 35 #include "tools/Timer.h" 36 #include "interfaces/Tickable.h" 33 37 #include "Billboard.h" 34 #include "objects/Tickable.h"35 #include "tools/Timer.h"36 38 37 39 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/ForceField.cc
r3064 r3196 28 28 29 29 #include "ForceField.h" 30 #include "core/XMLPort.h"31 30 32 31 #include "core/CoreIncludes.h" 32 #include "core/XMLPort.h" 33 33 #include "objects/worldentities/MobileEntity.h" 34 34 -
code/trunk/src/orxonox/objects/worldentities/ForceField.h
r3064 r3196 31 31 #define _ForceField_H__ 32 32 33 #include "OrxonoxPrereqs.h" 34 35 #include "interfaces/Tickable.h" 33 36 #include "StaticEntity.h" 34 #include "objects/Tickable.h"35 37 36 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/Light.cc
r3110 r3196 29 29 #include "Light.h" 30 30 31 #include <sstream>32 #include <cassert>33 34 31 #include <OgreSceneManager.h> 32 #include <OgreLight.h> 33 #include <boost/static_assert.hpp> 35 34 36 35 #include "util/String.h" 37 36 #include "util/Exception.h" 37 #include "core/CoreIncludes.h" 38 38 #include "core/GameMode.h" 39 #include "core/CoreIncludes.h"40 39 #include "core/XMLPort.h" 41 40 #include "objects/Scene.h" … … 44 43 { 45 44 CreateFactory(Light); 45 46 // Be sure we don't do bad conversions 47 BOOST_STATIC_ASSERT((int)Ogre::Light::LT_POINT == (int)Light::LT_POINT); 48 BOOST_STATIC_ASSERT((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::LT_DIRECTIONAL); 49 BOOST_STATIC_ASSERT((int)Ogre::Light::LT_SPOTLIGHT == (int)Light::LT_SPOTLIGHT); 46 50 47 51 Light::Light(BaseObject* creator) : StaticEntity(creator) … … 52 56 this->diffuse_ = ColourValue::White; 53 57 this->specular_ = ColourValue::White; 54 this->type_ = Ogre::Light::LT_POINT;58 this->type_ = Light::LT_POINT; 55 59 this->attenuation_ = Vector4(100000, 1, 0, 0); 56 60 this->spotlightRange_ = Vector3(40.0f, 30.0f, 1.0f); … … 136 140 { 137 141 if (type == "point") 138 this->setType( Ogre::Light::LT_POINT);142 this->setType(Light::LT_POINT); 139 143 else if (type == "directional") 140 this->setType( Ogre::Light::LT_DIRECTIONAL);144 this->setType(Light::LT_DIRECTIONAL); 141 145 else if (type == "spotlight") 142 this->setType( Ogre::Light::LT_SPOTLIGHT);146 this->setType(Light::LT_SPOTLIGHT); 143 147 else 144 this->setType( Ogre::Light::LT_POINT);148 this->setType(Light::LT_POINT); 145 149 } 146 150 … … 149 153 switch (this->type_) 150 154 { 151 case Ogre::Light::LT_DIRECTIONAL:155 case Light::LT_DIRECTIONAL: 152 156 return "directional"; 153 case Ogre::Light::LT_SPOTLIGHT:157 case Light::LT_SPOTLIGHT: 154 158 return "spotlight"; 155 case Ogre::Light::LT_POINT:159 case Light::LT_POINT: 156 160 default: 157 161 return "point"; … … 163 167 if (this->light_) 164 168 { 165 this->light_->setType( this->type_);169 this->light_->setType(static_cast<Ogre::Light::LightTypes>(this->type_)); 166 170 167 171 if (this->type_ != Ogre::Light::LT_DIRECTIONAL) -
code/trunk/src/orxonox/objects/worldentities/Light.h
r2826 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 #include "StaticEntity.h"34 33 35 34 #include <string> 36 #include <OgreLight.h>37 38 35 #include "util/Math.h" 39 #include "objects/Teamcolourable.h" 36 #include "interfaces/TeamColourable.h" 37 #include "StaticEntity.h" 40 38 41 39 namespace orxonox 42 40 { 43 class _OrxonoxExport Light : public StaticEntity, public Team colourable41 class _OrxonoxExport Light : public StaticEntity, public TeamColourable 44 42 { 43 public: 44 enum LightTypes // Copy from the Ogre enum 45 { 46 /// Point light sources give off light equally in all directions, so require only position not direction 47 LT_POINT, 48 /// Directional lights simulate parallel light beams from a distant source, hence have direction but no position 49 LT_DIRECTIONAL, 50 /// Spotlights simulate a cone of light from a source so require position and direction, plus extra values for falloff 51 LT_SPOTLIGHT 52 }; 53 45 54 public: 46 55 Light(BaseObject* creator); … … 55 64 { return this->light_; } 56 65 57 inline void setType( Ogre::Light::LightTypes type)66 inline void setType(Light::LightTypes type) 58 67 { this->type_ = type; this->updateType(); } 59 inline Ogre::Light::LightTypes getType() const68 inline Light::LightTypes getType() const 60 69 { return this->type_; } 61 70 … … 133 142 134 143 Ogre::Light* light_; 135 Ogre::Light::LightTypes type_;144 LightTypes type_; 136 145 ColourValue diffuse_; 137 146 ColourValue specular_; -
code/trunk/src/orxonox/objects/worldentities/MobileEntity.cc
r3110 r3196 30 30 31 31 #include <OgreSceneNode.h> 32 #include "BulletDynamics/Dynamics/btRigidBody.h" 33 34 #include "util/Debug.h" 35 #include "util/MathConvert.h" 36 #include "util/Exception.h" 32 #include <BulletDynamics/Dynamics/btRigidBody.h> 33 37 34 #include "core/CoreIncludes.h" 38 35 #include "core/XMLPort.h" 39 40 36 #include "objects/Scene.h" 41 37 … … 96 92 this->angularVelocity_.z += angularAcceleration_.z * dt; 97 93 // Calculate new orientation with quaternion derivative. This is about 30% faster than with angle/axis method. 98 float mult = dt * 0.5 ;94 float mult = dt * 0.5f; 99 95 // TODO: this could be optimized by writing it out. The calls currently create 4 new Quaternions! 100 96 Quaternion newOrientation(0.0f, this->angularVelocity_.x * mult, this->angularVelocity_.y * mult, this->angularVelocity_.z * mult); -
code/trunk/src/orxonox/objects/worldentities/MobileEntity.h
r3084 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "util/Math.h" 35 #include "interfaces/Tickable.h" 34 36 #include "WorldEntity.h" 35 #include "objects/Tickable.h"36 37 37 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/Model.cc
r3110 r3196 27 27 */ 28 28 29 #include "Model.h" 29 30 30 31 #include <OgreEntity.h> 31 #include "Model.h" 32 33 #include "core/CoreIncludes.h" 32 34 #include "core/GameMode.h" 33 #include "core/CoreIncludes.h"34 35 #include "core/XMLPort.h" 35 36 #include "objects/Scene.h" -
code/trunk/src/orxonox/objects/worldentities/Model.h
r2662 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <string> 35 #include "tools/Mesh.h" 33 36 #include "StaticEntity.h" 34 #include "tools/Mesh.h"35 37 36 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/MovableEntity.cc
r3110 r3196 31 31 32 32 #include "core/CoreIncludes.h" 33 #include "core/XMLPort.h"34 33 #include "core/Executor.h" 35 34 #include "core/GameMode.h" 35 #include "core/XMLPort.h" 36 36 #include "objects/worldentities/pawns/Pawn.h" 37 37 -
code/trunk/src/orxonox/objects/worldentities/MovableEntity.h
r3033 r3196 33 33 #include "OrxonoxPrereqs.h" 34 34 35 #include " MobileEntity.h"35 #include "util/Math.h" 36 36 #include "network/ClientConnectionListener.h" 37 37 #include "tools/Timer.h" 38 #include "MobileEntity.h" 38 39 39 40 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.cc
r3110 r3196 34 34 #include "ParticleEmitter.h" 35 35 36 #include <OgreParticleSystem.h> 37 36 #include "util/Exception.h" 37 #include "core/CoreIncludes.h" 38 #include "core/GameMode.h" 39 #include "core/XMLPort.h" 38 40 #include "tools/ParticleInterface.h" 39 #include "util/Exception.h"40 #include "core/GameMode.h"41 #include "core/CoreIncludes.h"42 #include "core/XMLPort.h"43 41 #include "objects/Scene.h" 44 42 -
code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.h
r2662 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <string> 33 35 #include "StaticEntity.h" 34 36 -
code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.cc
r3110 r3196 75 75 SUPER(ParticleSpawner, processEvent, event); 76 76 77 SetEvent(ParticleSpawner, "spawn", spawn, event);77 ORXONOX_SET_EVENT(ParticleSpawner, "spawn", spawn, event); 78 78 } 79 79 -
code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.h
r3068 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "tools/Timer.h" 34 35 #include "ParticleEmitter.h" 35 #include "tools/Timer.h"36 36 37 37 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/Planet.cc
r3110 r3196 29 29 #include "Planet.h" 30 30 31 #include <math.h>32 33 31 #include <OgreEntity.h> 34 32 #include <OgreBillboardSet.h> 35 #include <OgreHardwareVertexBuffer.h> 36 #include <OgreMeshManager.h> 33 #include <OgreProgressiveMesh.h> 37 34 38 35 #include "core/CoreIncludes.h" 36 #include "core/GameMode.h" 39 37 #include "core/XMLPort.h" 40 38 #include "objects/Scene.h" 39 #include "Camera.h" 41 40 #include "CameraManager.h" 42 #include "Camera.h"43 #include "GraphicsManager.h"44 41 45 42 namespace orxonox … … 70 67 return; 71 68 72 Camera* activeCamera = CameraManager::getInstance().getActiveCamera(); 73 if(activeCamera) 69 if (GameMode::showsGraphics()) 74 70 { 75 float distance = this->getPosition().distance( activeCamera->getWorldPosition() ); 76 // COUT(2) << distance << std::endl; 77 float planetRadius = this->getScale(); 71 Camera* activeCamera = CameraManager::getInstance().getActiveCamera(); 72 if(activeCamera) 73 { 74 float distance = this->getPosition().distance( activeCamera->getWorldPosition() ); 75 // COUT(2) << distance << std::endl; 76 float planetRadius = this->getScale(); 78 77 79 float newScale = 2 * distance / sqrt(distance*distance - planetRadius*planetRadius);80 float tempTest = newScale*(1+float(this->atmosphereSize)/float(this->imageSize));81 newScale = tempTest;78 float newScale = 2 * distance / sqrt(distance*distance - planetRadius*planetRadius); 79 float tempTest = newScale*(1+float(this->atmosphereSize)/float(this->imageSize)); 80 newScale = tempTest; 82 81 83 this->billboard_.getBillboardSet()->setDefaultDimensions(newScale, newScale); 82 this->billboard_.getBillboardSet()->setDefaultDimensions(newScale, newScale); 83 } 84 84 } 85 85 … … 91 91 float scaleFactor = this->getScale(); 92 92 93 this->distList.push_back(10.0 *scaleFactor);94 this->distList.push_back(19.0 *scaleFactor);95 this->distList.push_back(27.0 *scaleFactor);96 this->distList.push_back(34.0 *scaleFactor);97 this->distList.push_back(40.0 *scaleFactor);98 this->distList.push_back(45.0 *scaleFactor);99 this->distList.push_back(49.0 *scaleFactor);100 this->distList.push_back(52.0 *scaleFactor);101 this->distList.push_back(54.0 *scaleFactor);102 this->distList.push_back(55.0 *scaleFactor);93 this->distList.push_back(10.0f*scaleFactor); 94 this->distList.push_back(19.0f*scaleFactor); 95 this->distList.push_back(27.0f*scaleFactor); 96 this->distList.push_back(34.0f*scaleFactor); 97 this->distList.push_back(40.0f*scaleFactor); 98 this->distList.push_back(45.0f*scaleFactor); 99 this->distList.push_back(49.0f*scaleFactor); 100 this->distList.push_back(52.0f*scaleFactor); 101 this->distList.push_back(54.0f*scaleFactor); 102 this->distList.push_back(55.0f*scaleFactor); 103 103 104 float reductionValue = 0.2 ;104 float reductionValue = 0.2f; 105 105 106 106 this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue); … … 145 145 SUPER(Planet, XMLPort, xmlelement, mode); 146 146 147 XMLPortParam(Planet, "atmosphere", setAtmosphere, getAtmosphere, xmlelement, mode).defaultValues("planet/Atmosphere"); 148 XMLPortParam(Planet, "atmospheresize", setAtmosphereSize, getAtmosphereSize, xmlelement,mode); 149 XMLPortParam(Planet, "imagesize", setImageSize, getImageSize, xmlelement,mode); 150 XMLPortParam(Planet, "mesh", setMeshSource, getMeshSource, xmlelement, mode); 151 XMLPortParam(Planet, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true); 147 if (GameMode::showsGraphics()) 148 { 149 XMLPortParam(Planet, "atmosphere", setAtmosphere, getAtmosphere, xmlelement, mode).defaultValues("planet/Atmosphere"); 150 XMLPortParam(Planet, "atmospheresize", setAtmosphereSize, getAtmosphereSize, xmlelement,mode); 151 XMLPortParam(Planet, "imagesize", setImageSize, getImageSize, xmlelement,mode); 152 XMLPortParam(Planet, "mesh", setMeshSource, getMeshSource, xmlelement, mode); 153 XMLPortParam(Planet, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true); 154 } 152 155 } 153 156 -
code/trunk/src/orxonox/objects/worldentities/Planet.h
r2710 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <OgreMesh.h> 35 34 #include <string> 36 35 #include "tools/BillboardSet.h" 37 36 #include "tools/Mesh.h" 38 37 #include "MovableEntity.h" 39 #include "objects/Tickable.h"40 38 41 39 namespace orxonox … … 108 106 float atmosphereSize; 109 107 float imageSize; 110 Ogre::Mesh::LodDistanceListdistList;108 std::vector<float> distList; 111 109 BillboardSet billboard_; 112 110 bool bCastShadows_; -
code/trunk/src/orxonox/objects/worldentities/PongBall.cc
r3110 r3196 32 32 #include "core/GameMode.h" 33 33 #include "objects/gametypes/Gametype.h" 34 #include "objects/worldentities/PongBat.h" 34 35 #include "sound/SoundBase.h" 35 36 … … 49 50 this->batID_[0] = OBJECTID_UNKNOWN; 50 51 this->batID_[1] = OBJECTID_UNKNOWN; 51 this->relMercyOffset_ = 0.05 ;52 this->relMercyOffset_ = 0.05f; 52 53 53 54 this->registerVariables(); … … 102 103 if (position.x > this->fieldWidth_ / 2 && this->bat_[1]) 103 104 { 104 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10 ) / 2);105 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2); 105 106 if (fabs(distance) <= 1) 106 107 { … … 122 123 if (position.x < -this->fieldWidth_ / 2 && this->bat_[0]) 123 124 { 124 distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10 ) / 2);125 distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2); 125 126 if (fabs(distance) <= 1) 126 127 { … … 172 173 if (position.x > this->fieldWidth_ / 2 && this->bat_[1]) 173 174 { 174 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10 ) / 2);175 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2); 175 176 if (fabs(distance) <= 1) 176 177 { … … 183 184 if (position.x < -this->fieldWidth_ / 2 && this->bat_[0]) 184 185 { 185 distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10 ) / 2);186 distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2); 186 187 if (fabs(distance) <= 1) 187 188 { … … 217 218 } 218 219 } 220 221 void PongBall::setBats(PongBat** bats) 222 { 223 this->bat_ = bats; 224 this->batID_[0] = this->bat_[0]->getObjectID(); 225 this->batID_[1] = this->bat_[1]->getObjectID(); 226 } 227 228 void PongBall::applyBats() 229 { 230 if (!this->bat_) 231 this->bat_ = new PongBat*[2]; 232 if (this->batID_[0] != OBJECTID_UNKNOWN) 233 this->bat_[0] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[0])); 234 if (this->batID_[1] != OBJECTID_UNKNOWN) 235 this->bat_[1] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[1])); 236 } 219 237 } -
code/trunk/src/orxonox/objects/worldentities/PongBall.h
r3108 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "util/Math.h" 34 35 #include "objects/worldentities/MovableEntity.h" 35 #include "objects/worldentities/PongBat.h"36 36 37 37 namespace orxonox … … 63 63 { return this->batlength_; } 64 64 65 void setBats(PongBat** bats) 66 { this->bat_ = bats; this->batID_[0] = this->bat_[0]->getObjectID(); this->batID_[1] = this->bat_[1]->getObjectID(); } 67 68 void applyBats() 69 { if(!this->bat_) this->bat_ = new PongBat*[2]; if(this->batID_[0] != OBJECTID_UNKNOWN) this->bat_[0] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[0])); if(this->batID_[1] != OBJECTID_UNKNOWN) this->bat_[1] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[1])); } 65 void setBats(PongBat** bats); 66 void applyBats(); 70 67 71 68 static const float MAX_REL_Z_VELOCITY; -
code/trunk/src/orxonox/objects/worldentities/PongBat.h
r2839 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 33 #include "objects/worldentities/ControllableEntity.h" 35 34 -
code/trunk/src/orxonox/objects/worldentities/PongCenterpoint.h
r2826 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <string> 35 #include <util/Math.h> 34 36 #include "objects/worldentities/StaticEntity.h" 35 37 -
code/trunk/src/orxonox/objects/worldentities/SpawnPoint.cc
r3110 r3196 30 30 31 31 #include "core/CoreIncludes.h" 32 #include "core/Template.h" 32 33 #include "core/XMLPort.h" 33 34 #include "objects/gametypes/Gametype.h" 35 #include "objects/worldentities/pawns/Pawn.h" 34 36 35 37 namespace orxonox … … 71 73 } 72 74 75 void SpawnPoint::setTemplate(Template* temp) 76 { 77 this->template_ = temp; 78 this->templatename_ = temp->getName(); 79 } 80 73 81 Pawn* SpawnPoint::spawn() 74 82 { -
code/trunk/src/orxonox/objects/worldentities/SpawnPoint.h
r2662 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include <string> 34 35 #include "core/Identifier.h" 35 #include "core/Template.h"36 #include "objects/worldentities/pawns/Pawn.h"37 36 #include "objects/worldentities/StaticEntity.h" 38 37 … … 52 51 { return this->spawnclass_; } 53 52 54 inline void setTemplate(Template* temp) 55 { this->template_ = temp; this->templatename_ = temp->getName(); } 53 void setTemplate(Template* temp); 56 54 inline Template* getTemplate() const 57 55 { return this->template_; } -
code/trunk/src/orxonox/objects/worldentities/StaticEntity.cc
r3110 r3196 31 31 32 32 #include <OgreSceneNode.h> 33 #include "BulletDynamics/Dynamics/btRigidBody.h" 34 35 #include "util/Exception.h" 33 #include <BulletDynamics/Dynamics/btRigidBody.h> 34 #include "util/OrxAssert.h" 36 35 #include "core/CoreIncludes.h" 37 36 -
code/trunk/src/orxonox/objects/worldentities/TeamSpawnPoint.h
r2826 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "objects/worldentities/pawns/Pawn.h" 34 35 #include "SpawnPoint.h" 35 36 -
code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc
r3110 r3196 30 30 #include "WorldEntity.h" 31 31 32 #include <cassert> 32 #include <OgreBillboardSet.h> 33 #include <OgreCamera.h> 34 #include <OgreEntity.h> 35 #include <OgreParticleSystem.h> 36 #include <OgreSceneManager.h> 33 37 #include <OgreSceneNode.h> 34 #include <OgreSceneManager.h> 35 #include "BulletDynamics/Dynamics/btRigidBody.h" 36 38 #include <BulletDynamics/Dynamics/btRigidBody.h> 39 #include <boost/static_assert.hpp> 40 41 #include "util/OrxAssert.h" 42 #include "util/Convert.h" 37 43 #include "util/Exception.h" 38 #include "util/Convert.h"39 44 #include "core/CoreIncludes.h" 40 45 #include "core/XMLPort.h" 41 42 46 #include "objects/Scene.h" 43 47 #include "objects/collisionshapes/WorldEntityCollisionShape.h" … … 51 55 const Vector3 WorldEntity::DOWN = Vector3::NEGATIVE_UNIT_Y; 52 56 const Vector3 WorldEntity::UP = Vector3::UNIT_Y; 57 58 // Be sure we don't do bad conversions 59 BOOST_STATIC_ASSERT((int)Ogre::Node::TS_LOCAL == (int)WorldEntity::Local); 60 BOOST_STATIC_ASSERT((int)Ogre::Node::TS_PARENT == (int)WorldEntity::Parent); 61 BOOST_STATIC_ASSERT((int)Ogre::Node::TS_WORLD == (int)WorldEntity::World); 53 62 54 63 /** … … 463 472 //! Attaches an Ogre::MovableObject to this WorldEntity. 464 473 void WorldEntity::attachOgreObject(Ogre::MovableObject* object) 465 { 466 this->node_->attachObject(object); 467 } 474 { this->node_->attachObject(object); } 475 void WorldEntity::attachOgreObject(Ogre::BillboardSet* object) 476 { this->node_->attachObject(object); } 477 void WorldEntity::attachOgreObject(Ogre::Camera* object) 478 { this->node_->attachObject(object); } 479 void WorldEntity::attachOgreObject(Ogre::Entity* object) 480 { this->node_->attachObject(object); } 481 void WorldEntity::attachOgreObject(Ogre::ParticleSystem* object) 482 { this->node_->attachObject(object); } 468 483 469 484 //! Detaches an Ogre::MovableObject from this WorldEntity. 470 485 void WorldEntity::detachOgreObject(Ogre::MovableObject* object) 471 { 472 this->node_->detachObject(object); 473 } 486 { this->node_->detachObject(object); } 487 void WorldEntity::detachOgreObject(Ogre::BillboardSet* object) 488 { this->node_->detachObject(object); } 489 void WorldEntity::detachOgreObject(Ogre::Camera* object) 490 { this->node_->detachObject(object); } 491 void WorldEntity::detachOgreObject(Ogre::Entity* object) 492 { this->node_->detachObject(object); } 493 void WorldEntity::detachOgreObject(Ogre::ParticleSystem* object) 494 { this->node_->detachObject(object); } 474 495 475 496 //! Detaches an Ogre::MovableObject (by string) from this WorldEntity. … … 501 522 502 523 // Note: These functions are placed in WorldEntity.h as inline functions for the release build. 503 #ifndef NDEBUG524 #ifndef ORXONOX_RELEASE 504 525 const Vector3& WorldEntity::getPosition() const 505 526 { … … 574 595 Translates this WorldEntity by a vector. 575 596 @param relativeTo 576 @see TransformSpace::Enum577 */ 578 void WorldEntity::translate(const Vector3& distance, TransformSpace ::EnumrelativeTo)597 @see WorldEntity::TransformSpace 598 */ 599 void WorldEntity::translate(const Vector3& distance, TransformSpace relativeTo) 579 600 { 580 601 switch (relativeTo) 581 602 { 582 case TransformSpace::Local:603 case WorldEntity::Local: 583 604 // position is relative to parent so transform downwards 584 605 this->setPosition(this->getPosition() + this->getOrientation() * distance); 585 606 break; 586 case TransformSpace::Parent:607 case WorldEntity::Parent: 587 608 this->setPosition(this->getPosition() + distance); 588 609 break; 589 case TransformSpace::World:610 case WorldEntity::World: 590 611 // position is relative to parent so transform upwards 591 612 if (this->node_->getParent()) … … 602 623 Rotates this WorldEntity by a quaternion. 603 624 @param relativeTo 604 @see TransformSpace::Enum605 */ 606 void WorldEntity::rotate(const Quaternion& rotation, TransformSpace ::EnumrelativeTo)625 @see WorldEntity::TransformSpace 626 */ 627 void WorldEntity::rotate(const Quaternion& rotation, TransformSpace relativeTo) 607 628 { 608 629 switch(relativeTo) 609 630 { 610 case TransformSpace::Local:631 case WorldEntity::Local: 611 632 this->setOrientation(this->getOrientation() * rotation); 612 633 break; 613 case TransformSpace::Parent:634 case WorldEntity::Parent: 614 635 // Rotations are normally relative to local axes, transform up 615 636 this->setOrientation(rotation * this->getOrientation()); 616 637 break; 617 case TransformSpace::World:638 case WorldEntity::World: 618 639 // Rotations are normally relative to local axes, transform up 619 640 this->setOrientation(this->getOrientation() * this->getWorldOrientation().Inverse() … … 627 648 Makes this WorldEntity look a specific target location. 628 649 @param relativeTo 629 @see TransformSpace::Enum650 @see WorldEntity::TransformSpace 630 651 @param localDirectionVector 631 652 The vector which normally describes the natural direction of the object, usually -Z. 632 653 */ 633 void WorldEntity::lookAt(const Vector3& target, TransformSpace ::EnumrelativeTo, const Vector3& localDirectionVector)634 { 635 Vector3 origin ;654 void WorldEntity::lookAt(const Vector3& target, TransformSpace relativeTo, const Vector3& localDirectionVector) 655 { 656 Vector3 origin(0, 0, 0); 636 657 switch (relativeTo) 637 658 { 638 case TransformSpace::Local:659 case WorldEntity::Local: 639 660 origin = Vector3::ZERO; 640 661 break; 641 case TransformSpace::Parent:662 case WorldEntity::Parent: 642 663 origin = this->getPosition(); 643 664 break; 644 case TransformSpace::World:665 case WorldEntity::World: 645 666 origin = this->getWorldPosition(); 646 667 break; … … 653 674 Makes this WorldEntity look in specific direction. 654 675 @param relativeTo 655 @see TransformSpace::Enum676 @see WorldEntity::TransformSpace 656 677 @param localDirectionVector 657 678 The vector which normally describes the natural direction of the object, usually -Z. 658 679 */ 659 void WorldEntity::setDirection(const Vector3& direction, TransformSpace ::EnumrelativeTo, const Vector3& localDirectionVector)680 void WorldEntity::setDirection(const Vector3& direction, TransformSpace relativeTo, const Vector3& localDirectionVector) 660 681 { 661 682 Quaternion savedOrientation(this->getOrientation()); 662 Ogre::Node::TransformSpace ogreRelativeTo; 663 switch (relativeTo) 664 { 665 case TransformSpace::Local: 666 ogreRelativeTo = Ogre::Node::TS_LOCAL; break; 667 case TransformSpace::Parent: 668 ogreRelativeTo = Ogre::Node::TS_PARENT; break; 669 case TransformSpace::World: 670 ogreRelativeTo = Ogre::Node::TS_WORLD; break; 671 default: OrxAssert(false, "Faulty TransformSpace::Enum assigned."); 672 } 673 this->node_->setDirection(direction, ogreRelativeTo, localDirectionVector); 683 this->node_->setDirection(direction, static_cast<Ogre::Node::TransformSpace>(relativeTo), localDirectionVector); 674 684 Quaternion newOrientation(this->node_->getOrientation()); 675 685 this->node_->setOrientation(savedOrientation); … … 772 782 break; 773 783 case Kinematic: 774 this->physicalBody_->setCollisionFlags( this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_STATIC_OBJECT| btCollisionObject::CF_KINEMATIC_OBJECT);784 this->physicalBody_->setCollisionFlags((this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_STATIC_OBJECT) | btCollisionObject::CF_KINEMATIC_OBJECT); 775 785 break; 776 786 case Static: 777 this->physicalBody_->setCollisionFlags( this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_KINEMATIC_OBJECT| btCollisionObject::CF_STATIC_OBJECT);787 this->physicalBody_->setCollisionFlags((this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_KINEMATIC_OBJECT) | btCollisionObject::CF_STATIC_OBJECT); 778 788 break; 779 789 case None: -
code/trunk/src/orxonox/objects/worldentities/WorldEntity.h
r3077 r3196 33 33 #include "OrxonoxPrereqs.h" 34 34 35 #ifdef NDEBUG 36 #include <OgreSceneNode.h> 37 #else 38 #include <OgrePrerequisites.h> 35 #ifdef ORXONOX_RELEASE 36 # include <OgreSceneNode.h> 39 37 #endif 40 #include "LinearMath/btMotionState.h"38 #include <LinearMath/btMotionState.h> 41 39 42 40 #include "util/Math.h" 41 #include "util/OgreForwardRefs.h" 43 42 #include "core/BaseObject.h" 44 43 #include "network/synchronisable/Synchronisable.h" … … 75 74 76 75 public: 76 // Define our own transform space enum to avoid Ogre includes here 77 /** 78 @brief 79 Enumeration denoting the spaces which a transform can be relative to. 80 */ 81 enum TransformSpace 82 { 83 //! Transform is relative to the local space 84 Local, 85 //! Transform is relative to the space of the parent node 86 Parent, 87 //! Transform is relative to world space 88 World 89 }; 90 91 public: 77 92 WorldEntity(BaseObject* creator); 78 93 virtual ~WorldEntity(); … … 97 112 const Vector3& getWorldPosition() const; 98 113 99 void translate(const Vector3& distance, TransformSpace ::Enum relativeTo = TransformSpace::Parent);100 inline void translate(float x, float y, float z, TransformSpace ::Enum relativeTo = TransformSpace::Parent)114 void translate(const Vector3& distance, TransformSpace relativeTo = WorldEntity::Parent); 115 inline void translate(float x, float y, float z, TransformSpace relativeTo = WorldEntity::Parent) 101 116 { this->translate(Vector3(x, y, z), relativeTo); } 102 117 … … 114 129 const Quaternion& getWorldOrientation() const; 115 130 116 void rotate(const Quaternion& rotation, TransformSpace ::Enum relativeTo = TransformSpace::Local);117 inline void rotate(const Vector3& axis, const Degree& angle, TransformSpace ::Enum relativeTo = TransformSpace::Local)131 void rotate(const Quaternion& rotation, TransformSpace relativeTo = WorldEntity::Local); 132 inline void rotate(const Vector3& axis, const Degree& angle, TransformSpace relativeTo = WorldEntity::Local) 118 133 { this->rotate(Quaternion(angle, axis), relativeTo); } 119 134 120 inline void yaw(const Degree& angle, TransformSpace ::Enum relativeTo = TransformSpace::Local)135 inline void yaw(const Degree& angle, TransformSpace relativeTo = WorldEntity::Local) 121 136 { this->rotate(Quaternion(angle, Vector3::UNIT_Y), relativeTo); } 122 inline void pitch(const Degree& angle, TransformSpace ::Enum relativeTo = TransformSpace::Local)137 inline void pitch(const Degree& angle, TransformSpace relativeTo = WorldEntity::Local) 123 138 { this->rotate(Quaternion(angle, Vector3::UNIT_X), relativeTo); } 124 inline void roll(const Degree& angle, TransformSpace ::Enum relativeTo = TransformSpace::Local)139 inline void roll(const Degree& angle, TransformSpace relativeTo = WorldEntity::Local) 125 140 { this->rotate(Quaternion(angle, Vector3::UNIT_Z), relativeTo); } 126 141 127 void lookAt(const Vector3& target, TransformSpace ::Enum relativeTo = TransformSpace::Parent, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);128 void setDirection(const Vector3& direction, TransformSpace ::Enum relativeTo = TransformSpace::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);129 inline void setDirection(float x, float y, float z, TransformSpace ::Enum relativeTo = TransformSpace::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z)142 void lookAt(const Vector3& target, TransformSpace relativeTo = WorldEntity::Parent, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z); 143 void setDirection(const Vector3& direction, TransformSpace relativeTo = WorldEntity::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z); 144 inline void setDirection(float x, float y, float z, TransformSpace relativeTo = WorldEntity::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z) 130 145 { this->setDirection(Vector3(x, y, z), relativeTo, localDirectionVector); } 131 146 … … 157 172 { return this->children_; } 158 173 159 void attachOgreObject(Ogre::MovableObject* object); 160 void detachOgreObject(Ogre::MovableObject* object); 174 void attachOgreObject(Ogre::MovableObject* object); 175 void attachOgreObject(Ogre::BillboardSet* object); 176 void attachOgreObject(Ogre::Camera* object); 177 void attachOgreObject(Ogre::Entity* object); 178 void attachOgreObject(Ogre::ParticleSystem* object); 179 180 void detachOgreObject(Ogre::MovableObject* object); 181 void detachOgreObject(Ogre::BillboardSet* object); 182 void detachOgreObject(Ogre::Camera* object); 183 void detachOgreObject(Ogre::Entity* object); 184 void detachOgreObject(Ogre::ParticleSystem* object); 185 161 186 Ogre::MovableObject* detachOgreObject(const Ogre::String& name); 162 187 … … 427 452 428 453 // Inline heavily used functions for release builds. In debug, we better avoid including OgreSceneNode here. 429 #ifdef NDEBUG454 #ifdef ORXONOX_RELEASE 430 455 inline const Vector3& WorldEntity::getPosition() const 431 456 { return this->node_->getPosition(); } -
code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc
r3110 r3196 29 29 #include "Pawn.h" 30 30 31 #include "core/CoreIncludes.h" 31 32 #include "core/GameMode.h" 32 #include "core/CoreIncludes.h"33 33 #include "core/XMLPort.h" 34 #include "util/Math.h" 34 #include "network/NetworkFunction.h" 35 36 #include "interfaces/PawnListener.h" 35 37 #include "PawnManager.h" 36 38 #include "objects/infos/PlayerInfo.h" … … 39 41 #include "objects/worldentities/ExplosionChunk.h" 40 42 #include "objects/worldentities/BigExplosion.h" 41 42 43 #include "objects/weaponsystem/WeaponSystem.h" 43 44 #include "objects/weaponsystem/WeaponSlot.h" … … 45 46 #include "objects/weaponsystem/WeaponSet.h" 46 47 47 #include "network/NetworkFunction.h"48 48 49 49 namespace orxonox … … 373 373 this->isHumanShip_ = true; 374 374 } 375 376 377 ///////////////////378 // Pawn Listener //379 ///////////////////380 PawnListener::PawnListener()381 {382 RegisterRootObject(PawnListener);383 }384 375 } -
code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h
r3089 r3196 31 31 32 32 #include "OrxonoxPrereqs.h" 33 34 #include <string> 35 #include "interfaces/RadarViewable.h" 33 36 #include "objects/worldentities/ControllableEntity.h" 34 #include "objects/RadarViewable.h"35 37 #include "objects/pickup/PickupCollection.h" 36 38 … … 147 149 { this->weaponSystem_ = weaponsystem; } 148 150 }; 149 150 class _OrxonoxExport PawnListener : virtual public OrxonoxClass151 {152 public:153 PawnListener();154 virtual ~PawnListener() {}155 156 virtual void destroyedPawn(Pawn* pawn) = 0;157 };158 151 } 159 152 -
code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
r3110 r3196 29 29 #include "SpaceShip.h" 30 30 31 #include "BulletDynamics/Dynamics/btRigidBody.h" 32 33 #include "util/Math.h" 34 #include "util/Exception.h" 31 #include <BulletDynamics/Dynamics/btRigidBody.h> 32 35 33 #include "core/CoreIncludes.h" 36 34 #include "core/ConfigValueIncludes.h" -
code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.h
r2662 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "LinearMath/btVector3.h" 35 34 #include <string> 35 #include <LinearMath/btVector3.h> 36 #include "util/Math.h" 36 37 #include "Pawn.h" 37 38 -
code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.cc
r3110 r3196 29 29 #include "Spectator.h" 30 30 31 #include <OgreBillboardSet.h>32 33 31 #include "core/CoreIncludes.h" 34 32 #include "core/ConfigValueIncludes.h" 35 33 #include "core/GameMode.h" 36 #include "objects/worldentities/Model.h" 34 35 #include "tools/BillboardSet.h" 37 36 #include "objects/Scene.h" 38 37 #include "objects/infos/PlayerInfo.h" 39 #include "objects/gametypes/Gametype.h"40 #include "tools/BillboardSet.h"41 #include "overlays/OverlayText.h"42 #include "overlays/OverlayGroup.h"43 #include "util/Convert.h"44 38 45 39 namespace orxonox … … 65 59 { 66 60 this->greetingFlare_ = new BillboardSet(); 67 this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0 , 1.0, 0.8), Vector3(0, 20, 0), 1);61 this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0f, 1.0f, 0.8f), Vector3(0, 20, 0), 1); 68 62 if (this->greetingFlare_->getBillboardSet()) 69 63 this->attachOgreObject(this->greetingFlare_->getBillboardSet()); -
code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.h
r3053 r3196 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "util/Math.h" 34 35 #include "objects/worldentities/ControllableEntity.h" 35 36 -
code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc
r3086 r3196 29 29 30 30 #include "TeamBaseMatchBase.h" 31 31 32 #include "core/CoreIncludes.h" 33 #include "interfaces/PawnListener.h" 34 #include "interfaces/TeamColourable.h" 32 35 #include "objects/gametypes/TeamBaseMatch.h" 33 #include "objects/Teamcolourable.h"34 36 35 37 namespace orxonox … … 80 82 for (std::set<WorldEntity*>::iterator it = attachments.begin(); it != attachments.end(); ++it) 81 83 { 82 if ((*it)->isA(Class(Team colourable)))84 if ((*it)->isA(Class(TeamColourable))) 83 85 { 84 Team colourable* tc = dynamic_cast<Teamcolourable*>(*it);86 TeamColourable* tc = dynamic_cast<TeamColourable*>(*it); 85 87 tc->setTeamColour(colour); 86 88 } -
code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h
r3033 r3196 30 30 #define _TeamBaseMatchBase_H__ 31 31 32 #include "OrxonoxPrereqs.h" 33 32 34 #include "Pawn.h" 33 35 34 36 namespace orxonox 35 37 { 36 37 38 38 namespace BaseState 39 39 { -
code/trunk/src/orxonox/objects/worldentities/triggers/CheckPoint.cc
r3110 r3196 31 31 #include "core/CoreIncludes.h" 32 32 #include "core/XMLPort.h" 33 34 33 #include "objects/gametypes/Asteroids.h" 35 #include "o rxonox/objects/worldentities/pawns/Pawn.h"34 #include "objects/worldentities/pawns/Pawn.h" 36 35 37 36 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/triggers/CheckPoint.h
r3064 r3196 35 35 #define _CheckPoint_H__ 36 36 37 #include "OrxonoxPrereqs.h" 38 39 #include "interfaces/RadarViewable.h" 37 40 #include "DistanceTrigger.h" 38 #include "objects/RadarViewable.h"39 41 40 42 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc
r3110 r3196 29 29 #include "DistanceTrigger.h" 30 30 31 #include <OgreNode.h>32 33 31 #include "core/CoreIncludes.h" 34 32 #include "core/XMLPort.h" 35 36 33 #include "orxonox/objects/worldentities/pawns/Pawn.h" 37 34 -
code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h
r3068 r3196 30 30 #define _DistanceTrigger_H__ 31 31 32 #include " PlayerTrigger.h"32 #include "OrxonoxPrereqs.h" 33 33 34 34 #include <set> 35 36 35 #include "core/ClassTreeMask.h" 37 #include "core/BaseObject.h" 38 39 #include "orxonox/objects/worldentities/ControllableEntity.h" 36 #include "PlayerTrigger.h" 40 37 41 38 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.cc
r3110 r3196 51 51 SUPER(EventTrigger, processEvent, event); 52 52 53 SetEvent(EventTrigger, "trigger", trigger, event);53 ORXONOX_SET_EVENT(EventTrigger, "trigger", trigger, event); 54 54 } 55 55 -
code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.h
r2087 r3196 30 30 #define _EventTrigger_H__ 31 31 32 #include "OrxonoxPrereqs.h" 32 33 #include "Trigger.h" 33 34 #include "core/ClassTreeMask.h"35 #include "core/BaseObject.h"36 34 37 35 namespace orxonox -
code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.cc
r3110 r3196 34 34 35 35 #include "PlayerTrigger.h" 36 37 36 #include "core/CoreIncludes.h" 38 37 -
code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h
r3033 r3196 37 37 38 38 #include "OrxonoxPrereqs.h" 39 40 39 #include "Trigger.h" 41 40 -
code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc
r3110 r3196 29 29 #include "Trigger.h" 30 30 31 #include <OgreBillboard.h>32 #include <OgreBillboardSet.h>33 #include "util/Debug.h"34 31 #include "core/CoreIncludes.h" 35 32 #include "core/ConsoleCommand.h" 33 #include "core/GameMode.h" 36 34 #include "core/XMLPort.h" 37 #include "core/GameMode.h"38 35 #include "objects/Scene.h" 39 36 … … 237 234 { 238 235 if (( (this->latestState_ & 2) && this->bStayActive_ && (this->remainingActivations_ <= 0)) 239 || (!(this->latestState_ & 2) ) && (this->remainingActivations_ == 0))236 || (!(this->latestState_ & 2) && (this->remainingActivations_ == 0))) 240 237 return false; 241 238 else -
code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.h
r3068 r3196 30 30 #define _Trigger_H__ 31 31 32 #include "OrxonoxPrereqs.h" 33 32 34 #include <set> 33 35 #include <queue> 34 36 35 #include "OrxonoxPrereqs.h" 36 37 #include "objects/Tickable.h" 37 #include "tools/BillboardSet.h" 38 #include "interfaces/Tickable.h" 38 39 #include "objects/worldentities/StaticEntity.h" 39 #include "tools/BillboardSet.h"40 40 41 41 namespace orxonox
Note: See TracChangeset
for help on using the changeset viewer.