Index: code/branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 3162)
+++ code/branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 3163)
@@ -34,4 +34,5 @@
 #include <OgreSceneManager.h>
 #include "BulletDynamics/Dynamics/btRigidBody.h"
+#include <boost/static_assert.hpp>
 
 #include "util/OrxAssert.h"
@@ -51,4 +52,9 @@
     const Vector3 WorldEntity::DOWN  = Vector3::NEGATIVE_UNIT_Y;
     const Vector3 WorldEntity::UP    = Vector3::UNIT_Y;
+
+    // Be sure we don't do bad conversions
+    BOOST_STATIC_ASSERT((int)Ogre::Node::TS_LOCAL  == (int)WorldEntity::Local);
+    BOOST_STATIC_ASSERT((int)Ogre::Node::TS_PARENT == (int)WorldEntity::Parent);
+    BOOST_STATIC_ASSERT((int)Ogre::Node::TS_WORLD  == (int)WorldEntity::World);
 
     /**
@@ -574,18 +580,18 @@
         Translates this WorldEntity by a vector.
     @param relativeTo
-        @see TransformSpace::Enum
-    */
-    void WorldEntity::translate(const Vector3& distance, TransformSpace::Enum relativeTo)
+        @see WorldEntity::TransformSpace
+    */
+    void WorldEntity::translate(const Vector3& distance, TransformSpace relativeTo)
     {
         switch (relativeTo)
         {
-        case TransformSpace::Local:
+        case WorldEntity::Local:
             // position is relative to parent so transform downwards
             this->setPosition(this->getPosition() + this->getOrientation() * distance);
             break;
-        case TransformSpace::Parent:
+        case WorldEntity::Parent:
             this->setPosition(this->getPosition() + distance);
             break;
-        case TransformSpace::World:
+        case WorldEntity::World:
             // position is relative to parent so transform upwards
             if (this->node_->getParent())
@@ -602,18 +608,18 @@
         Rotates this WorldEntity by a quaternion.
     @param relativeTo
-        @see TransformSpace::Enum
-    */
-    void WorldEntity::rotate(const Quaternion& rotation, TransformSpace::Enum relativeTo)
+        @see WorldEntity::TransformSpace
+    */
+    void WorldEntity::rotate(const Quaternion& rotation, TransformSpace relativeTo)
     {
         switch(relativeTo)
         {
-        case TransformSpace::Local:
+        case WorldEntity::Local:
             this->setOrientation(this->getOrientation() * rotation);
             break;
-        case TransformSpace::Parent:
+        case WorldEntity::Parent:
             // Rotations are normally relative to local axes, transform up
             this->setOrientation(rotation * this->getOrientation());
             break;
-        case TransformSpace::World:
+        case WorldEntity::World:
             // Rotations are normally relative to local axes, transform up
             this->setOrientation(this->getOrientation() * this->getWorldOrientation().Inverse()
@@ -627,20 +633,20 @@
         Makes this WorldEntity look a specific target location.
     @param relativeTo
-        @see TransformSpace::Enum
+        @see WorldEntity::TransformSpace
     @param localDirectionVector
         The vector which normally describes the natural direction of the object, usually -Z.
     */
-    void WorldEntity::lookAt(const Vector3& target, TransformSpace::Enum relativeTo, const Vector3& localDirectionVector)
+    void WorldEntity::lookAt(const Vector3& target, TransformSpace relativeTo, const Vector3& localDirectionVector)
     {
         Vector3 origin(0, 0, 0);
         switch (relativeTo)
         {
-        case TransformSpace::Local:
+        case WorldEntity::Local:
             origin = Vector3::ZERO;
             break;
-        case TransformSpace::Parent:
+        case WorldEntity::Parent:
             origin = this->getPosition();
             break;
-        case TransformSpace::World:
+        case WorldEntity::World:
             origin = this->getWorldPosition();
             break;
@@ -653,23 +659,12 @@
         Makes this WorldEntity look in specific direction.
     @param relativeTo
-        @see TransformSpace::Enum
+        @see WorldEntity::TransformSpace
     @param localDirectionVector
         The vector which normally describes the natural direction of the object, usually -Z.
     */
-    void WorldEntity::setDirection(const Vector3& direction, TransformSpace::Enum relativeTo, const Vector3& localDirectionVector)
+    void WorldEntity::setDirection(const Vector3& direction, TransformSpace relativeTo, const Vector3& localDirectionVector)
     {
         Quaternion savedOrientation(this->getOrientation());
-        Ogre::Node::TransformSpace ogreRelativeTo = Ogre::Node::TS_LOCAL;
-        switch (relativeTo)
-        {
-        case TransformSpace::Local:
-            ogreRelativeTo = Ogre::Node::TS_LOCAL; break;
-        case TransformSpace::Parent:
-            ogreRelativeTo = Ogre::Node::TS_PARENT; break;
-        case TransformSpace::World:
-            ogreRelativeTo = Ogre::Node::TS_WORLD; break;
-        default: OrxAssert(false, "Faulty TransformSpace::Enum assigned.");
-        }
-        this->node_->setDirection(direction, ogreRelativeTo, localDirectionVector);
+        this->node_->setDirection(direction, static_cast<Ogre::Node::TransformSpace>(relativeTo), localDirectionVector);
         Quaternion newOrientation(this->node_->getOrientation());
         this->node_->setOrientation(savedOrientation);
Index: code/branches/pch/src/orxonox/objects/worldentities/WorldEntity.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/WorldEntity.h	(revision 3162)
+++ code/branches/pch/src/orxonox/objects/worldentities/WorldEntity.h	(revision 3163)
@@ -75,4 +75,20 @@
 
         public:
+            // Define our own transform space enum to avoid Ogre includes here
+            /**
+            @brief
+                Enumeration denoting the spaces which a transform can be relative to.
+            */
+            enum TransformSpace
+            {
+                //! Transform is relative to the local space
+                Local,
+                //! Transform is relative to the space of the parent node
+                Parent,
+                //! Transform is relative to world space
+                World
+            };
+
+        public:
             WorldEntity(BaseObject* creator);
             virtual ~WorldEntity();
@@ -97,6 +113,6 @@
             const Vector3& getWorldPosition() const;
 
-            void translate(const Vector3& distance, TransformSpace::Enum relativeTo = TransformSpace::Parent);
-            inline void translate(float x, float y, float z, TransformSpace::Enum relativeTo = TransformSpace::Parent)
+            void translate(const Vector3& distance, TransformSpace relativeTo = WorldEntity::Parent);
+            inline void translate(float x, float y, float z, TransformSpace relativeTo = WorldEntity::Parent)
                 { this->translate(Vector3(x, y, z), relativeTo); }
 
@@ -114,18 +130,18 @@
             const Quaternion& getWorldOrientation() const;
 
-            void rotate(const Quaternion& rotation, TransformSpace::Enum relativeTo = TransformSpace::Local);
-            inline void rotate(const Vector3& axis, const Degree& angle, TransformSpace::Enum relativeTo = TransformSpace::Local)
+            void rotate(const Quaternion& rotation, TransformSpace relativeTo = WorldEntity::Local);
+            inline void rotate(const Vector3& axis, const Degree& angle, TransformSpace relativeTo = WorldEntity::Local)
                 { this->rotate(Quaternion(angle, axis), relativeTo); }
 
-            inline void yaw(const Degree& angle, TransformSpace::Enum relativeTo = TransformSpace::Local)
+            inline void yaw(const Degree& angle, TransformSpace relativeTo = WorldEntity::Local)
                 { this->rotate(Quaternion(angle, Vector3::UNIT_Y), relativeTo); }
-            inline void pitch(const Degree& angle, TransformSpace::Enum relativeTo = TransformSpace::Local)
+            inline void pitch(const Degree& angle, TransformSpace relativeTo = WorldEntity::Local)
                 { this->rotate(Quaternion(angle, Vector3::UNIT_X), relativeTo); }
-            inline void roll(const Degree& angle, TransformSpace::Enum relativeTo = TransformSpace::Local)
+            inline void roll(const Degree& angle, TransformSpace relativeTo = WorldEntity::Local)
                 { this->rotate(Quaternion(angle, Vector3::UNIT_Z), relativeTo); }
 
-            void lookAt(const Vector3& target, TransformSpace::Enum relativeTo = TransformSpace::Parent, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
-            void setDirection(const Vector3& direction, TransformSpace::Enum relativeTo = TransformSpace::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
-            inline void setDirection(float x, float y, float z, TransformSpace::Enum relativeTo = TransformSpace::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z)
+            void lookAt(const Vector3& target, TransformSpace relativeTo = WorldEntity::Parent, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
+            void setDirection(const Vector3& direction, TransformSpace relativeTo = WorldEntity::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
+            inline void setDirection(float x, float y, float z, TransformSpace relativeTo = WorldEntity::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z)
                 { this->setDirection(Vector3(x, y, z), relativeTo, localDirectionVector); }
 
Index: code/branches/pch/src/util/Math.h
===================================================================
--- code/branches/pch/src/util/Math.h	(revision 3162)
+++ code/branches/pch/src/util/Math.h	(revision 3163)
@@ -54,22 +54,4 @@
 namespace orxonox
 {
-    // Also define our own transform space enum
-    namespace TransformSpace
-    {
-        /**
-        @brief
-            Enumeration denoting the spaces which a transform can be relative to.
-        */
-        enum Enum
-        {
-            //! Transform is relative to the local space
-            Local,
-            //! Transform is relative to the space of the parent node
-            Parent,
-            //! Transform is relative to world space
-            World
-        };
-    }
-
     _UtilExport std::ostream& operator<<(std::ostream& out, const orxonox::Radian& radian);
     _UtilExport std::istream& operator>>(std::istream& in, orxonox::Radian& radian);
