Index: code/trunk/src/modules/objects/collisionshapes/AbstractRadiusHeightCollisionShape.cc
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/AbstractRadiusHeightCollisionShape.cc	(revision 10189)
+++ code/trunk/src/modules/objects/collisionshapes/AbstractRadiusHeightCollisionShape.cc	(revision 10189)
@@ -0,0 +1,93 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      Fabian 'x3n' Landau
+ *
+ */
+
+/**
+    @file AbstractRadiusHeightCollisionShape.cc
+    @brief Implementation of the AbstractRadiusHeightCollisionShape class.
+*/
+
+#include "AbstractRadiusHeightCollisionShape.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "tools/BulletConversions.h"
+
+namespace orxonox
+{
+    RegisterAbstractClass(AbstractRadiusHeightCollisionShape).inheritsFrom(Class(CollisionShape));
+
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    */
+    AbstractRadiusHeightCollisionShape::AbstractRadiusHeightCollisionShape(Context* context) : CollisionShape(context)
+    {
+        RegisterObject(AbstractRadiusHeightCollisionShape);
+
+        this->radius_ = 1.0f;
+        this->height_ = 1.0f;
+
+        this->registerVariables();
+    }
+
+    void AbstractRadiusHeightCollisionShape::registerVariables()
+    {
+        registerVariable(this->radius_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+        registerVariable(this->height_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+    }
+
+    void AbstractRadiusHeightCollisionShape::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(AbstractRadiusHeightCollisionShape, XMLPort, xmlelement, mode);
+
+        XMLPortParam(AbstractRadiusHeightCollisionShape, "radius", setRadius, getRadius, xmlelement, mode);
+        XMLPortParam(AbstractRadiusHeightCollisionShape, "height", setHeight, getHeight, xmlelement, mode);
+    }
+
+    /**
+    @brief
+        Is called when the scale of the AbstractRadiusHeightCollisionShape has changed.
+    */
+    void AbstractRadiusHeightCollisionShape::changedScale()
+    {
+        CollisionShape::changedScale();
+
+        // Resize the internal collision shape
+        // TODO: Assuming setLocalScaling works.
+        //this->collisionShape_->setLocalScaling(multi_cast<btVector3>(this->getScale3D()));
+        if(!this->hasUniformScaling())
+        {
+            orxout(internal_error) << "AbstractRadiusHeightCollisionShape: Non-uniform scaling is not yet supported." << endl;
+            return;
+        }
+
+        this->radius_ *= this->getScale();
+        this->height_ *= this->getScale();
+        this->updateShape();
+    }
+}
Index: code/trunk/src/modules/objects/collisionshapes/AbstractRadiusHeightCollisionShape.h
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/AbstractRadiusHeightCollisionShape.h	(revision 10189)
+++ code/trunk/src/modules/objects/collisionshapes/AbstractRadiusHeightCollisionShape.h	(revision 10189)
@@ -0,0 +1,97 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      Fabian 'x3n' Landau
+ *
+ */
+
+/**
+    @file AbstractRadiusHeightCollisionShape.h
+    @brief Definition of the AbstractRadiusHeightCollisionShape class.
+    @ingroup Collisionshapes
+*/
+
+#ifndef _AbstractRadiusHeightCollisionShape_H__
+#define _AbstractRadiusHeightCollisionShape_H__
+
+#include "objects/ObjectsPrereqs.h"
+#include "collisionshapes/CollisionShape.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        Wrapper for the bullet collision shapes with radius and height.
+
+    @ingroup Collisionshapes
+    */
+    class _ObjectsExport AbstractRadiusHeightCollisionShape : public CollisionShape
+    {
+        public:
+            AbstractRadiusHeightCollisionShape(Context* context);
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            /**
+            @brief Set the radius of the AbstractRadiusHeightCollisionShape.
+                   If the radius changes, this causes the internal collision shape to be recreated.
+            @param value The radius to be set.
+            @return Returns true if the radius has changed, false if not.
+            */
+            inline bool setRadius(float value)
+                { if(this->radius_ == value) return false; this->radius_ = value; updateShape(); return true; }
+            /**
+            @brief Get the radius of the AbstractRadiusHeightCollisionShape.
+            @return Returns the radius of the AbstractRadiusHeightCollisionShape.
+            */
+            inline float getRadius() const
+                { return radius_; }
+
+            /**
+            @brief Set the height of the AbstractRadiusHeightCollisionShape.
+                   If the height changes, this causes the internal collision shape to be recreated.
+            @param value The height to be set.
+            @return Returns true if the height has changed, false if not.
+            */
+            inline bool setHeight(float value)
+                { if(this->height_ == value) return false; this->height_ = value; updateShape(); return true; }
+            /**
+            @brief Get the height of the AbstractRadiusHeightCollisionShape.
+            @return Returns the height of the AbstractRadiusHeightCollisionShape.
+            */
+            inline float getHeight() const
+                { return this->height_; }
+
+            virtual void changedScale(); // Is called when the scale of the AbstractRadiusHeightCollisionShape has changed.
+
+        private:
+            void registerVariables();
+
+            float radius_; //!< The radius of the AbstractRadiusHeightCollisionShape.
+            float height_; //!< The height of the AbstractRadiusHeightCollisionShape.
+     };
+}
+
+#endif /* _AbstractRadiusHeightCollisionShape_H__ */
Index: code/trunk/src/modules/objects/collisionshapes/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/CMakeLists.txt	(revision 9667)
+++ code/trunk/src/modules/objects/collisionshapes/CMakeLists.txt	(revision 10189)
@@ -1,5 +1,7 @@
 ADD_SOURCE_FILES(OBJECTS_SRC_FILES
+  AbstractRadiusHeightCollisionShape.cc
   BoxCollisionShape.cc
   ConeCollisionShape.cc
+  CylinderCollisionShape.cc
   PlaneCollisionShape.cc
   SphereCollisionShape.cc
Index: code/trunk/src/modules/objects/collisionshapes/ConeCollisionShape.cc
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/ConeCollisionShape.cc	(revision 9667)
+++ code/trunk/src/modules/objects/collisionshapes/ConeCollisionShape.cc	(revision 10189)
@@ -37,5 +37,4 @@
 
 #include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
 #include "tools/BulletConversions.h"
 
@@ -48,13 +47,9 @@
         Constructor. Registers and initializes the object.
     */
-    ConeCollisionShape::ConeCollisionShape(Context* context) : CollisionShape(context)
+    ConeCollisionShape::ConeCollisionShape(Context* context) : AbstractRadiusHeightCollisionShape(context)
     {
         RegisterObject(ConeCollisionShape);
 
-        this->radius_ = 1.0f;
-        this->height_ = 1.0f;
         updateShape();
-
-        this->registerVariables();
     }
 
@@ -63,40 +58,4 @@
         if (this->isInitialized())
             delete this->collisionShape_;
-    }
-
-    void ConeCollisionShape::registerVariables()
-    {
-        registerVariable(this->radius_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
-        registerVariable(this->height_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
-    }
-
-    void ConeCollisionShape::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(ConeCollisionShape, XMLPort, xmlelement, mode);
-
-        XMLPortParam(ConeCollisionShape, "radius", setRadius, getRadius, xmlelement, mode);
-        XMLPortParam(ConeCollisionShape, "height", setHeight, getHeight, xmlelement, mode);
-    }
-
-    /**
-    @brief
-        Is called when the scale of the ConeCollisionShape has changed.
-    */
-    void ConeCollisionShape::changedScale()
-    {
-        CollisionShape::changedScale();
-
-        // Resize the internal collision shape
-        // TODO: Assuming setLocalScaling works.
-        //this->collisionShape_->setLocalScaling(multi_cast<btVector3>(this->getScale3D()));
-        if(!this->hasUniformScaling())
-        {
-            orxout(internal_error) << "ConeCollisionShape: Non-uniform scaling is not yet supported." << endl;
-            return;
-        }
-
-        this->radius_ *= this->getScale();
-        this->height_ *= this->getScale();
-        this->updateShape();
     }
 
@@ -109,5 +68,5 @@
     btCollisionShape* ConeCollisionShape::createNewShape() const
     {
-        return new btConeShape(this->radius_, this->height_);
+        return new btConeShape(this->getRadius(), this->getHeight());
     }
 }
Index: code/trunk/src/modules/objects/collisionshapes/ConeCollisionShape.h
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/ConeCollisionShape.h	(revision 9667)
+++ code/trunk/src/modules/objects/collisionshapes/ConeCollisionShape.h	(revision 10189)
@@ -37,5 +37,5 @@
 
 #include "objects/ObjectsPrereqs.h"
-#include "collisionshapes/CollisionShape.h"
+#include "AbstractRadiusHeightCollisionShape.h"
 
 namespace orxonox
@@ -52,5 +52,5 @@
     @ingroup Collisionshapes
     */
-    class _ObjectsExport ConeCollisionShape : public CollisionShape
+    class _ObjectsExport ConeCollisionShape : public AbstractRadiusHeightCollisionShape
     {
         public:
@@ -58,45 +58,6 @@
             virtual ~ConeCollisionShape();
 
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-
-            /**
-            @brief Set the radius of the ConeCollisionShape.
-                   If the radius changes, this causes the internal collision shape to be recreated.
-            @param value The radius to be set.
-            @return Returns true if the radius has changed, false if not.
-            */
-            inline bool setRadius(float value)
-                { if(this->radius_ == value) return false; this->radius_ = value; updateShape(); return true; }
-            /**
-            @brief Get the radius of the ConeCollisionShape.
-            @return Returns the radius of the ConeCollisionShape.
-            */
-            inline float getRadius() const
-                { return radius_; }
-
-            /**
-            @brief Set the height of the ConeCollisionShape.
-                   If the height changes, this causes the internal collision shape to be recreated.
-            @param value The height to be set.
-            @return Returns true if the height has changed, false if not.
-            */
-            inline bool setHeight(float value)
-                { if(this->height_ == value) return false; this->height_ = value; updateShape(); return true; }
-            /**
-            @brief Get the height of the ConeCollisionShape.
-            @return Returns the height of the ConeCollisionShape.
-            */
-            inline float getHeight() const
-                { return this->height_; }
-
-            virtual void changedScale(); // Is called when the scale of the ConeCollisionShape has changed.
-
         private:
-            void registerVariables();
-
             btCollisionShape* createNewShape() const; // Creates a new internal collision shape for the ConeCollisionShape.
-
-            float radius_; //!< The radius of the ConeCollisionShape.
-            float height_; //!< The height of the ConeCollisionShape.
      };
 }
Index: code/trunk/src/modules/objects/collisionshapes/CylinderCollisionShape.cc
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/CylinderCollisionShape.cc	(revision 10189)
+++ code/trunk/src/modules/objects/collisionshapes/CylinderCollisionShape.cc	(revision 10189)
@@ -0,0 +1,73 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file CylinderCollisionShape.cc
+    @brief Implementation of the CylinderCollisionShape class.
+*/
+
+#include "CylinderCollisionShape.h"
+
+#include <BulletCollision/CollisionShapes/btCylinderShape.h>
+
+#include "core/CoreIncludes.h"
+#include "tools/BulletConversions.h"
+
+namespace orxonox
+{
+    RegisterClass(CylinderCollisionShape);
+
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    */
+    CylinderCollisionShape::CylinderCollisionShape(Context* context) : AbstractRadiusHeightCollisionShape(context)
+    {
+        RegisterObject(CylinderCollisionShape);
+
+        updateShape();
+    }
+
+    CylinderCollisionShape::~CylinderCollisionShape()
+    {
+        if (this->isInitialized())
+            delete this->collisionShape_;
+    }
+
+    /**
+    @brief
+        Creates a new internal collision shape for the CylinderCollisionShape.
+    @return
+        Returns a pointer to the newly created btCylinderShape.
+    */
+    btCollisionShape* CylinderCollisionShape::createNewShape() const
+    {
+        // divide height by 2 because bullet expects the half extents
+        return new btCylinderShape(btVector3(this->getRadius(), this->getHeight() / 2, 0));
+    }
+}
Index: code/trunk/src/modules/objects/collisionshapes/CylinderCollisionShape.h
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/CylinderCollisionShape.h	(revision 10189)
+++ code/trunk/src/modules/objects/collisionshapes/CylinderCollisionShape.h	(revision 10189)
@@ -0,0 +1,62 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file CylinderCollisionShape.h
+    @brief Definition of the CylinderCollisionShape class.
+    @ingroup Collisionshapes
+*/
+
+#ifndef _CylinderCollisionShape_H__
+#define _CylinderCollisionShape_H__
+
+#include "objects/ObjectsPrereqs.h"
+#include "AbstractRadiusHeightCollisionShape.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        Wrapper for the bullet Cylinder collision shape class btCylinderShape.
+
+    @see btCylinderShape
+    @ingroup Collisionshapes
+    */
+    class _ObjectsExport CylinderCollisionShape : public AbstractRadiusHeightCollisionShape
+    {
+        public:
+            CylinderCollisionShape(Context* context);
+            virtual ~CylinderCollisionShape();
+
+        private:
+            btCollisionShape* createNewShape() const; // Creates a new internal collision shape for the CylinderCollisionShape.
+     };
+}
+
+#endif /* _CylinderCollisionShape_H__ */
