Index: code/branches/core/src/orxonox/CMakeLists.txt
===================================================================
--- code/branches/core/src/orxonox/CMakeLists.txt	(revision 858)
+++ code/branches/core/src/orxonox/CMakeLists.txt	(revision 869)
@@ -6,18 +6,18 @@
 #  SpaceshipSteering.cc
 #  hud/HUD.cc
-#  particle/ParticleInterface.cc
-#  tools/BillboardSet.cc
+  particle/ParticleInterface.cc
+  tools/BillboardSet.cc
 #  tools/Light.cc
   tools/Mesh.cc
   tools/Timer.cc
-#  objects/Ambient.cc
+  objects/Ambient.cc
 #  objects/Camera.cc
-#  objects/Explosion.cc
+  objects/Explosion.cc
 #  objects/Fighter.cc
   objects/Model.cc
 #  objects/NPC.cc
-#  objects/Projectile.cc
-#  objects/Skybox.cc
-#  objects/SpaceShip.cc
+  objects/Projectile.cc
+  objects/Skybox.cc
+  objects/SpaceShip.cc
 #  objects/SpaceshipSteeringObject.cc
   objects/test1.cc
Index: code/branches/core/src/orxonox/Orxonox.cc
===================================================================
--- code/branches/core/src/orxonox/Orxonox.cc	(revision 858)
+++ code/branches/core/src/orxonox/Orxonox.cc	(revision 869)
@@ -209,10 +209,10 @@
   {
     //TODO: start modules
-//    ogre_->startRender();
+    ogre_->startRender();
     //TODO: run engine
     Factory::createClassHierarchy();
-//    createScene();
-//    setupScene();
-//    setupInputSystem();
+    createScene();
+    setupScene();
+    setupInputSystem();
     if(mode_!=CLIENT){ // remove this in future ---- presentation hack
     }
@@ -1146,5 +1146,5 @@
         std::cout << "2\n";
 
-//    startRenderLoop();
+    startRenderLoop();
   }
 
Index: code/branches/core/src/orxonox/core/XMLPort.cc
===================================================================
--- code/branches/core/src/orxonox/core/XMLPort.cc	(revision 858)
+++ code/branches/core/src/orxonox/core/XMLPort.cc	(revision 869)
@@ -28,4 +28,5 @@
 #include "XMLPort.h"
 #include "Language.h"
+#include "Loader.h"
 
 namespace orxonox
@@ -82,3 +83,8 @@
         return GetLocalisation(this->description_);
     }
+
+    bool XMLPortObjectContainer::identifierIsIncludedInLoaderMask(const Identifier* identifier)
+    {
+        return Loader::currentMask_s.isIncluded(identifier);
+    }
 }
Index: code/branches/core/src/orxonox/core/XMLPort.h
===================================================================
--- code/branches/core/src/orxonox/core/XMLPort.h	(revision 858)
+++ code/branches/core/src/orxonox/core/XMLPort.h	(revision 869)
@@ -37,5 +37,4 @@
 #include "CoreIncludes.h"
 #include "BaseObject.h"
-#include "Loader.h"
 
 #include "CorePrereqs.h"
@@ -142,12 +141,12 @@
                                 {
                                     COUT(5) << tokens.size() << " parameter (using MultiTypeMath)." << std::endl;
-                                    MultiTypeMath param1, param2, param3, param4, param5;
+                                    MultiTypeMath param1 = MT_null, param2 = MT_null, param3 = MT_null, param4 = MT_null, param5 = MT_null;
                                     if (tokens.size() >= 1) param1 = tokens[0];
-                                    if (tokens.size() >= 2) param1 = tokens[1];
-                                    if (tokens.size() >= 3) param1 = tokens[2];
-                                    if (tokens.size() >= 4) param1 = tokens[3];
-                                    if (tokens.size() >= 5) param1 = tokens[4];
+                                    if (tokens.size() >= 2) param2 = tokens[1];
+                                    if (tokens.size() >= 3) param3 = tokens[2];
+                                    if (tokens.size() >= 4) param4 = tokens[3];
+                                    if (tokens.size() >= 5) param5 = tokens[4];
                                     COUT(5) << object->getLoaderIndentation() << "  " << attribute << std::endl;
-                                    COUT(5) << object->getLoaderIndentation() << "  " << tokens[0] << " -> " << param1 << ", " << tokens[1] << " -> " << param2 << ", " << tokens[2] << " -> " << param3 << ", " << tokens[3] << " -> " << param4 << ", " << tokens[4] << " -> " << param5 << std::endl;
+                                    COUT(5) << object->getLoaderIndentation() << "  " << param1 << ", " << param2 << ", " << param3 << ", " << param4 << ", " << param5 << std::endl;
 
                                     (*this->loadfunction_)(object, param1, param2, param3, param4, param5);
@@ -197,4 +196,5 @@
             XMLPortObjectContainer& description(const std::string description);
             const std::string& getDescription();
+            static bool identifierIsIncludedInLoaderMask(const Identifier* identifier);
 
         protected:
@@ -236,5 +236,5 @@
                                     if (identifier->isA(Class(O)))
                                     {
-                                        if (Loader::currentMask_s.isIncluded(identifier))
+                                        if (this->identifierIsIncludedInLoaderMask(identifier))
                                         {
                                             COUT(4) << object->getLoaderIndentation() << "fabricating " << child->Value() << "..." << std::endl;
Index: code/branches/core/src/orxonox/objects/Ambient.cc
===================================================================
--- code/branches/core/src/orxonox/objects/Ambient.cc	(revision 858)
+++ code/branches/core/src/orxonox/objects/Ambient.cc	(revision 869)
@@ -40,4 +40,5 @@
 #include "../core/CoreIncludes.h"
 #include "../Orxonox.h"
+#include "core/XMLPort.h"
 
 #include "Ambient.h"
@@ -58,6 +59,4 @@
     void Ambient::loadParams(TiXmlElement* xmlElem)
     {
-    	Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
-
     	if (xmlElem->Attribute("colourvalue"))
     	{
@@ -69,8 +68,28 @@
 	    	String2Number<float>(b, colourvalues[2]);
 
-	    	mgr->setAmbientLight(ColourValue(r,g,b));
+	    	this->setAmbientLight(ColourValue(r, g, b));
 
 	    	COUT(4) << "Loader: Set ambient light: "<<r<<" " << g << " " << b  << std::endl << std::endl;
     	}
    }
+
+   void Ambient::setAmbientLight(const ColourValue& colour)
+   {
+    	Orxonox::getSingleton()->getSceneManager()->setAmbientLight(colour);
+   }
+
+    /**
+        @brief XML loading and saving.
+        @param xmlelement The XML-element
+        @param loading Loading (true) or saving (false)
+        @return The XML-element
+    */
+    Element& Ambient::XMLPort(Element& xmlelement, bool loading)
+    {
+        BaseObject::XMLPort(xmlelement, loading);
+
+        XMLPortParamLoadOnly(Ambient, "colourvalue", setAmbientLight, xmlelement, loading);
+
+        return xmlelement;
+    }
 }
Index: code/branches/core/src/orxonox/objects/Ambient.h
===================================================================
--- code/branches/core/src/orxonox/objects/Ambient.h	(revision 858)
+++ code/branches/core/src/orxonox/objects/Ambient.h	(revision 869)
@@ -14,6 +14,7 @@
             virtual ~Ambient();
 
-
             void loadParams(TiXmlElement* xmlElem);
+            virtual Element& XMLPort(Element& xmlelement, bool loading);
+            void setAmbientLight(const ColourValue& colour);
 
         private:
Index: code/branches/core/src/orxonox/objects/Model.cc
===================================================================
--- code/branches/core/src/orxonox/objects/Model.cc	(revision 858)
+++ code/branches/core/src/orxonox/objects/Model.cc	(revision 869)
@@ -33,4 +33,5 @@
 #include "../core/CoreIncludes.h"
 #include "../Orxonox.h"
+#include "core/XMLPort.h"
 
 #include "Model.h"
@@ -60,4 +61,26 @@
     }
 
+    /**
+        @brief XML loading and saving.
+        @param xmlelement The XML-element
+        @param loading Loading (true) or saving (false)
+        @return The XML-element
+    */
+    Element& Model::XMLPort(Element& xmlelement, bool loading)
+    {
+        WorldEntity::XMLPort(xmlelement, loading);
+
+        XMLPortParamLoadOnly(Model, "mesh", setMesh, xmlelement, loading);
+
+        create();
+
+        return xmlelement;
+    }
+
+    void Model::setMesh(const std::string& meshname)
+    {
+        this->meshSrc_ = meshname;
+    }
+
     bool Model::create(){
       if(meshSrc_.compare("")!=0){
Index: code/branches/core/src/orxonox/objects/Model.h
===================================================================
--- code/branches/core/src/orxonox/objects/Model.h	(revision 858)
+++ code/branches/core/src/orxonox/objects/Model.h	(revision 869)
@@ -18,4 +18,6 @@
             virtual ~Model();
             virtual void loadParams(TiXmlElement* xmlElem);
+            virtual Element& XMLPort(Element& xmlelement, bool loading);
+            void setMesh(const std::string& meshname);
             bool create();
 
Index: code/branches/core/src/orxonox/objects/Skybox.cc
===================================================================
--- code/branches/core/src/orxonox/objects/Skybox.cc	(revision 858)
+++ code/branches/core/src/orxonox/objects/Skybox.cc	(revision 869)
@@ -38,4 +38,5 @@
 #include "../core/CoreIncludes.h"
 #include "../core/Debug.h"
+#include "core/XMLPort.h"
 
 #include "Skybox.h"
@@ -56,13 +57,31 @@
     void Skybox::loadParams(TiXmlElement* xmlElem)
     {
-    	Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
-
     	if (xmlElem->Attribute("src"))
     	{
     		std::string skyboxSrc = xmlElem->Attribute("src");
-	    	mgr->setSkyBox(true, skyboxSrc);
+	    	this->setSkybox(skyboxSrc);
 
 	    	COUT(4) << "Loader: Set skybox: "<< skyboxSrc << std::endl << std::endl;
     	}
    }
+
+   void Skybox::setSkybox(const std::string& skyboxname)
+   {
+    	Orxonox::getSingleton()->getSceneManager()->setSkyBox(true, skyboxname);
+   }
+
+    /**
+        @brief XML loading and saving.
+        @param xmlelement The XML-element
+        @param loading Loading (true) or saving (false)
+        @return The XML-element
+    */
+    Element& Skybox::XMLPort(Element& xmlelement, bool loading)
+    {
+        BaseObject::XMLPort(xmlelement, loading);
+
+        XMLPortParamLoadOnly(Skybox, "src", setSkybox, xmlelement, loading);
+
+        return xmlelement;
+    }
 }
Index: code/branches/core/src/orxonox/objects/Skybox.h
===================================================================
--- code/branches/core/src/orxonox/objects/Skybox.h	(revision 858)
+++ code/branches/core/src/orxonox/objects/Skybox.h	(revision 869)
@@ -16,6 +16,7 @@
             virtual ~Skybox();
 
-
             void loadParams(TiXmlElement* xmlElem);
+            virtual Element& XMLPort(Element& xmlelement, bool loading);
+            void setSkybox(const std::string& skyboxname);
 
         private:
Index: code/branches/core/src/orxonox/objects/SpaceShip.cc
===================================================================
--- code/branches/core/src/orxonox/objects/SpaceShip.cc	(revision 858)
+++ code/branches/core/src/orxonox/objects/SpaceShip.cc	(revision 869)
@@ -44,4 +44,5 @@
 #include "../particle/ParticleInterface.h"
 #include "Projectile.h"
+#include "core/XMLPort.h"
 
 #include "SpaceShip.h"
@@ -123,4 +124,6 @@
         this->brakeLoop(loop);
 */
+        this->init();
+
         COUT(3) << "Info: SpaceShip was loaded" << std::endl;
     }
@@ -132,16 +135,6 @@
     }
 
-    void SpaceShip::setConfigValues()
-    {
-        SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down).");
-        SetConfigValue(reloadTime_, 0.125).description("The reload time of the weapon in seconds");
-        SetConfigValue(testvector_, Vector3()).description("asdfblah");
-    }
-
-    void SpaceShip::loadParams(TiXmlElement* xmlElem)
-    {
-        Model::loadParams(xmlElem);
-
-
+    void SpaceShip::init()
+    {
         // START CREATING THRUSTER
         this->tt_ = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
@@ -197,5 +190,16 @@
 
         // END of testing crosshair
-
+    }
+
+    void SpaceShip::setConfigValues()
+    {
+        SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down).");
+        SetConfigValue(reloadTime_, 0.125).description("The reload time of the weapon in seconds");
+        SetConfigValue(testvector_, Vector3()).description("asdfblah");
+    }
+
+    void SpaceShip::loadParams(TiXmlElement* xmlElem)
+    {
+        Model::loadParams(xmlElem);
 /*
         if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft"))
@@ -242,21 +246,63 @@
     	if (xmlElem->Attribute("camera"))
     	{
-            Ogre::Camera *cam = Orxonox::getSingleton()->getSceneManager()->createCamera("ShipCam");
-            this->camNode_ = this->getNode()->createChildSceneNode("CamNode");
-/*
-//            node->setInheritOrientation(false);
-            cam->setPosition(Vector3(0,50,-150));
-            cam->lookAt(Vector3(0,20,0));
-            cam->roll(Degree(0));
-*/
-
-            cam->setPosition(Vector3(-200,0,35));
-//            cam->setPosition(Vector3(0,-350,0));
-            cam->lookAt(Vector3(0,0,35));
-            cam->roll(Degree(-90));
-
-            this->camNode_->attachObject(cam);
-            Orxonox::getSingleton()->getOgrePointer()->getRoot()->getAutoCreatedWindow()->addViewport(cam);
+    	    this->setCamera();
     	}
+    }
+
+    void SpaceShip::setCamera(const std::string& camera)
+    {
+        Ogre::Camera *cam = Orxonox::getSingleton()->getSceneManager()->createCamera("ShipCam");
+        this->camNode_ = this->getNode()->createChildSceneNode("CamNode");
+/*
+//        node->setInheritOrientation(false);
+        cam->setPosition(Vector3(0,50,-150));
+        cam->lookAt(Vector3(0,20,0));
+        cam->roll(Degree(0));
+*/
+
+        cam->setPosition(Vector3(-200,0,35));
+//        cam->setPosition(Vector3(0,-350,0));
+        cam->lookAt(Vector3(0,0,35));
+        cam->roll(Degree(-90));
+
+        this->camNode_->attachObject(cam);
+        Orxonox::getSingleton()->getOgrePointer()->getRoot()->getAutoCreatedWindow()->addViewport(cam);
+    }
+
+    void SpaceShip::setMaxSpeed(float value)
+    { this->maxSpeed_ = value; }
+    void SpaceShip::setMaxSideAndBackSpeed(float value)
+    { this->maxSideAndBackSpeed_ = value; }
+    void SpaceShip::setMaxRotation(float value)
+    { this->maxRotation_ = value; this->maxRotationRadian_ = Radian(value); }
+    void SpaceShip::setTransAcc(float value)
+    { this->translationAcceleration_ = value; }
+    void SpaceShip::setRotAcc(float value)
+    { this->rotationAcceleration_ = value; this->rotationAccelerationRadian_ = Radian(value); }
+    void SpaceShip::setTransDamp(float value)
+    { this->translationDamping_ = value; }
+    void SpaceShip::setRotDamp(float value)
+    { this->rotationDamping_ = value; this->rotationDampingRadian_ = Radian(value); }
+
+    /**
+        @brief XML loading and saving.
+        @param xmlelement The XML-element
+        @param loading Loading (true) or saving (false)
+        @return The XML-element
+    */
+    Element& SpaceShip::XMLPort(Element& xmlelement, bool loading)
+    {
+        Model::XMLPort(xmlelement, loading);
+
+        XMLPortParamLoadOnly(SpaceShip, "camera", setCamera, xmlelement, loading);
+        XMLPortParamLoadOnly(SpaceShip, "maxSpeed", setMaxSpeed, xmlelement, loading);
+        XMLPortParamLoadOnly(SpaceShip, "maxSideAndBackSpeed", setMaxSideAndBackSpeed, xmlelement, loading);
+        XMLPortParamLoadOnly(SpaceShip, "maxRotation", setMaxRotation, xmlelement, loading);
+        XMLPortParamLoadOnly(SpaceShip, "transAcc", setTransAcc, xmlelement, loading);
+        XMLPortParamLoadOnly(SpaceShip, "rotAcc", setRotAcc, xmlelement, loading);
+        XMLPortParamLoadOnly(SpaceShip, "transDamp", setTransDamp, xmlelement, loading);
+        XMLPortParamLoadOnly(SpaceShip, "rotDamp", setRotDamp, xmlelement, loading);
+
+        return xmlelement;
     }
 
Index: code/branches/core/src/orxonox/objects/SpaceShip.h
===================================================================
--- code/branches/core/src/orxonox/objects/SpaceShip.h	(revision 858)
+++ code/branches/core/src/orxonox/objects/SpaceShip.h	(revision 869)
@@ -21,7 +21,18 @@
             SpaceShip();
             ~SpaceShip();
+            void init();
             void setConfigValues();
             virtual void loadParams(TiXmlElement* xmlElem);
+            virtual Element& XMLPort(Element& xmlelement, bool loading);
             virtual void tick(float dt);
+
+            void setCamera(const std::string& camera = "");
+            void setMaxSpeed(float value);
+            void setMaxSideAndBackSpeed(float value);
+            void setMaxRotation(float value);
+            void setTransAcc(float value);
+            void setRotAcc(float value);
+            void setTransDamp(float value);
+            void setRotDamp(float value);
 
             bool mouseMoved(const OIS::MouseEvent &e);
Index: code/branches/core/src/orxonox/objects/WorldEntity.cc
===================================================================
--- code/branches/core/src/orxonox/objects/WorldEntity.cc	(revision 858)
+++ code/branches/core/src/orxonox/objects/WorldEntity.cc	(revision 869)
@@ -158,4 +158,10 @@
     }
 
+    void WorldEntity::setYawPitchRoll(const Degree& yaw, const Degree& pitch, const Degree& roll)
+    {
+        this->yaw(yaw);
+        this->pitch(pitch);
+        this->roll(roll);
+    }
 
     /**
@@ -169,11 +175,9 @@
         BaseObject::XMLPort(xmlelement, loading);
 
-        XMLPortParam(WorldEntity, "position", setPosition, getPosition, xmlelement, loading);
-//        XMLPortParam(WorldEntity, "direction", setDirection, getDirection, xmlelement, loading);
-        XMLPortParamLoadOnly(WorldEntity, "yaw", setYaw, xmlelement, loading);
-        XMLPortParamLoadOnly(WorldEntity, "pitch", setPitch, xmlelement, loading);
-        XMLPortParamLoadOnly(WorldEntity, "roll", setRoll, xmlelement, loading);
+        XMLPortParam(WorldEntity, "position", setPositionLoader2, getPosition, xmlelement, loading);
+        XMLPortParamLoadOnly(WorldEntity, "direction", setDirectionLoader, xmlelement, loading);
+        XMLPortParamLoadOnly(WorldEntity, "yawpitchroll", setYawPitchRoll, xmlelement, loading);
         XMLPortParam(WorldEntity, "scale", setTotalScale, getScale, xmlelement, loading);
-        XMLPortParam(WorldEntity, "rotationAxis", setRotationAxis, getRotationAxis, xmlelement, loading);
+        XMLPortParam(WorldEntity, "rotationAxis", setRotationAxisLoader, getRotationAxis, xmlelement, loading);
         XMLPortParam(WorldEntity, "rotationRate", setRotationRate, getRotationRate, xmlelement, loading);
 
Index: code/branches/core/src/orxonox/objects/WorldEntity.h
===================================================================
--- code/branches/core/src/orxonox/objects/WorldEntity.h	(revision 858)
+++ code/branches/core/src/orxonox/objects/WorldEntity.h	(revision 869)
@@ -39,6 +39,10 @@
             inline void setPosition(const Vector3& pos)
                 { this->node_->setPosition(pos); }
-//            inline void setPosition(Real x, Real y, Real z)
-//                { this->node_->setPosition(x, y, z); }
+            inline void setPositionLoader1(const Vector3& pos)
+                { this->node_->setPosition(pos); }
+            inline void setPositionLoader2(Real x, Real y, Real z)
+                { this->node_->setPosition(x, y, z); }
+            inline void setPosition(Real x, Real y, Real z)
+                { this->node_->setPosition(x, y, z); }
             inline const Vector3& getPosition() const
                 { return this->node_->getPosition(); }
@@ -59,4 +63,5 @@
             inline void roll(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
                 { this->node_->roll(angle, relativeTo); }
+            void setYawPitchRoll(const Degree& yaw, const Degree& pitch, const Degree& roll);
 
             inline void setYaw(const Degree &angle)
@@ -73,4 +78,6 @@
             inline void rotate(const Vector3 &axis, const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
               { this->node_->rotate(axis, angle, relativeTo); }
+            inline void setDirectionLoader(Real x, Real y, Real z)
+              { this->setDirection(x, y, z); }
             inline void setDirection(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
               { this->node_->setDirection(x, y, z, relativeTo, localDirectionVector); }
@@ -120,8 +127,10 @@
                 { return this->acceleration_; }
 
+            inline void setRotationAxisLoader(const Vector3& axis)
+                { this->rotationAxis_ = axis; }
             inline void setRotationAxis(const Vector3& axis)
                 { this->rotationAxis_ = axis; }
-//            inline void setRotationAxis(Real x, Real y, Real z)
-//                { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; }
+            inline void setRotationAxis(Real x, Real y, Real z)
+                { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; }
             inline const Vector3& getRotationAxis() const
                 { return this->rotationAxis_; }
@@ -130,5 +139,5 @@
 //                { this->rotationRate_ = angle; }
             inline void setRotationRate(const Degree& angle)
-                { this->rotationRate_ = angle; }
+                { this->rotationRate_ = angle; this->setStatic(angle == Degree(0)); }
             inline const Radian& getRotationRate() const
                 { return this->rotationRate_; }
Index: code/branches/core/src/util/MultiTypeMath.cc
===================================================================
--- code/branches/core/src/util/MultiTypeMath.cc	(revision 858)
+++ code/branches/core/src/util/MultiTypeMath.cc	(revision 869)
@@ -88,33 +88,44 @@
 }
 
+MultiTypeMath::operator int() const
+{ return (this->type_ == MT_int) ? this->value_.int_ : ConvertValueAndReturn<MultiTypeMath, int>(*this); }
+MultiTypeMath::operator unsigned int() const
+{ return (this->type_ == MT_uint) ? this->value_.uint_ : ConvertValueAndReturn<MultiTypeMath, unsigned int>(*this); }
+MultiTypeMath::operator char() const
+{ return (this->type_ == MT_char) ? this->value_.char_ : ConvertValueAndReturn<MultiTypeMath, char>(*this); }
+MultiTypeMath::operator unsigned char() const
+{ return (this->type_ == MT_uchar) ? this->value_.uchar_ : ConvertValueAndReturn<MultiTypeMath, unsigned char>(*this); }
+MultiTypeMath::operator short() const
+{ return (this->type_ == MT_short) ? this->value_.short_ : ConvertValueAndReturn<MultiTypeMath, short>(*this); }
+MultiTypeMath::operator unsigned short() const
+{ return (this->type_ == MT_ushort) ? this->value_.ushort_ : ConvertValueAndReturn<MultiTypeMath, unsigned short>(*this); }
+MultiTypeMath::operator long() const
+{ return (this->type_ == MT_long) ? this->value_.long_ : ConvertValueAndReturn<MultiTypeMath, long>(*this); }
+MultiTypeMath::operator unsigned long() const
+{ return (this->type_ == MT_ulong) ? this->value_.ulong_ : ConvertValueAndReturn<MultiTypeMath, unsigned long>(*this); }
+MultiTypeMath::operator float() const
+{ return (this->type_ == MT_float) ? this->value_.float_ : ConvertValueAndReturn<MultiTypeMath, float>(*this); }
+MultiTypeMath::operator double() const
+{ return (this->type_ == MT_double) ? this->value_.double_ : ConvertValueAndReturn<MultiTypeMath, double>(*this); }
+MultiTypeMath::operator long double() const
+{ return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : ConvertValueAndReturn<MultiTypeMath, long double>(*this); }
+MultiTypeMath::operator bool() const
+{ return (this->type_ == MT_bool) ? this->value_.bool_ : ConvertValueAndReturn<MultiTypeMath, bool>(*this); }
+MultiTypeMath::operator std::string() const
+{ return (this->type_ == MT_string) ? this->string_ : ConvertValueAndReturn<MultiTypeMath, std::string>(*this); }
+MultiTypeMath::operator const char*() const
+{ return ((this->type_ == MT_constchar) ? this->string_ : ConvertValueAndReturn<MultiTypeMath, std::string>(*this)).c_str(); }
 MultiTypeMath::operator orxonox::Vector2() const
-{
-    return (this->type_ == MT_vector2) ? this->vector2_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Vector2>(*this);
-}
-
+{ return (this->type_ == MT_vector2) ? this->vector2_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Vector2>(*this); }
 MultiTypeMath::operator orxonox::Vector3() const
-{
-    return (this->type_ == MT_vector3) ? this->vector3_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Vector3>(*this);
-}
-
+{ return (this->type_ == MT_vector3) ? this->vector3_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Vector3>(*this); }
 MultiTypeMath::operator orxonox::Quaternion() const
-{
-    return (this->type_ == MT_quaternion) ? this->quaternion_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Quaternion>(*this);
-}
-
+{ return (this->type_ == MT_quaternion) ? this->quaternion_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Quaternion>(*this); }
 MultiTypeMath::operator orxonox::ColourValue() const
-{
-    return (this->type_ == MT_colourvalue) ? this->colourvalue_ : ConvertValueAndReturn<MultiTypeMath, orxonox::ColourValue>(*this);
-}
-
+{ return (this->type_ == MT_colourvalue) ? this->colourvalue_ : ConvertValueAndReturn<MultiTypeMath, orxonox::ColourValue>(*this); }
 MultiTypeMath::operator orxonox::Radian() const
-{
-    return (this->type_ == MT_radian) ? this->radian_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Radian>(*this);
-}
-
+{ return (this->type_ == MT_radian) ? this->radian_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Radian>(*this); }
 MultiTypeMath::operator orxonox::Degree() const
-{
-    return (this->type_ == MT_degree) ? this->degree_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Degree>(*this);
-}
+{ return (this->type_ == MT_degree) ? this->degree_ : ConvertValueAndReturn<MultiTypeMath, orxonox::Degree>(*this); }
 
 void MultiTypeMath::setValue(const MultiTypeMath& mtm)
@@ -171,19 +182,5 @@
 std::ostream& operator<<(std::ostream& out, MultiTypeMath& mtm)
 {
-    if (mtm.isA(MT_vector2))
-        out << mtm.getVector2();
-    else if (mtm.isA(MT_vector3))
-        out << mtm.getVector3();
-    else if (mtm.isA(MT_colourvalue))
-        out << mtm.getColourValue();
-    else if (mtm.isA(MT_quaternion))
-        out << mtm.getQuaternion();
-    else if (mtm.isA(MT_radian))
-        out << mtm.getRadian();
-    else if (mtm.isA(MT_degree))
-        out << mtm.getDegree();
-    else
-        out << ((MultiTypeString)mtm);
-
+    out << mtm.toString();
     return out;
 }
Index: code/branches/core/src/util/MultiTypeMath.h
===================================================================
--- code/branches/core/src/util/MultiTypeMath.h	(revision 858)
+++ code/branches/core/src/util/MultiTypeMath.h	(revision 869)
@@ -60,4 +60,5 @@
         inline MultiTypeMath(const orxonox::Degree&      value) { this->setValue(value); }
         inline MultiTypeMath(const MultiTypeMath& mtm)          { this->setValue(mtm);   }
+        virtual inline ~MultiTypeMath() {}
 
         using MultiTypeString::operator=;
@@ -88,10 +89,24 @@
         bool operator!=(const MultiTypeMath& mtm) const;
 
-        operator orxonox::Vector2()     const;
-        operator orxonox::Vector3()     const;
-        operator orxonox::ColourValue() const;
-        operator orxonox::Quaternion()  const;
-        operator orxonox::Radian()      const;
-        operator orxonox::Degree()      const;
+        virtual operator int()                  const;
+        virtual operator unsigned int()         const;
+        virtual operator char()                 const;
+        virtual operator unsigned char()        const;
+        virtual operator short()                const;
+        virtual operator unsigned short()       const;
+        virtual operator long()                 const;
+        virtual operator unsigned long()        const;
+        virtual operator float ()               const;
+        virtual operator double ()              const;
+        virtual operator long double()          const;
+        virtual operator bool()                 const;
+        virtual operator std::string()          const;
+        virtual operator const char*()          const;
+        virtual operator orxonox::Vector2()     const;
+        virtual operator orxonox::Vector3()     const;
+        virtual operator orxonox::ColourValue() const;
+        virtual operator orxonox::Quaternion()  const;
+        virtual operator orxonox::Radian()      const;
+        virtual operator orxonox::Degree()      const;
 
         using MultiTypeString::setValue;
@@ -126,6 +141,6 @@
         inline void getValue(orxonox::Degree*      variable) const { (*variable) = orxonox::Degree      (this->degree_);      }
 
-        std::string toString() const;
-        bool fromString(const std::string value);
+        virtual std::string toString() const;
+        virtual bool fromString(const std::string value);
 
     protected:
Index: code/branches/core/src/util/MultiTypePrimitive.cc
===================================================================
--- code/branches/core/src/util/MultiTypePrimitive.cc	(revision 858)
+++ code/branches/core/src/util/MultiTypePrimitive.cc	(revision 869)
@@ -129,62 +129,27 @@
 
 MultiTypePrimitive::operator int() const
-{
-    return (this->type_ == MT_int) ? this->value_.int_ : ConvertValueAndReturn<MultiTypePrimitive, int>(*this);
-}
-
+{ return (this->type_ == MT_int) ? this->value_.int_ : ConvertValueAndReturn<MultiTypePrimitive, int>(*this); }
 MultiTypePrimitive::operator unsigned int() const
-{
-    return (this->type_ == MT_uint) ? this->value_.uint_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned int>(*this);
-}
-
+{ return (this->type_ == MT_uint) ? this->value_.uint_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned int>(*this); }
 MultiTypePrimitive::operator char() const
-{
-    return (this->type_ == MT_char) ? this->value_.char_ : ConvertValueAndReturn<MultiTypePrimitive, char>(*this);
-}
-
+{ return (this->type_ == MT_char) ? this->value_.char_ : ConvertValueAndReturn<MultiTypePrimitive, char>(*this); }
 MultiTypePrimitive::operator unsigned char() const
-{
-    return (this->type_ == MT_uchar) ? this->value_.uchar_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned char>(*this);
-}
-
+{ return (this->type_ == MT_uchar) ? this->value_.uchar_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned char>(*this); }
 MultiTypePrimitive::operator short() const
-{
-    return (this->type_ == MT_short) ? this->value_.short_ : ConvertValueAndReturn<MultiTypePrimitive, short>(*this);
-}
-
+{ return (this->type_ == MT_short) ? this->value_.short_ : ConvertValueAndReturn<MultiTypePrimitive, short>(*this); }
 MultiTypePrimitive::operator unsigned short() const
-{
-    return (this->type_ == MT_ushort) ? this->value_.ushort_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned short>(*this);
-}
-
+{ return (this->type_ == MT_ushort) ? this->value_.ushort_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned short>(*this); }
 MultiTypePrimitive::operator long() const
-{
-    return (this->type_ == MT_long) ? this->value_.long_ : ConvertValueAndReturn<MultiTypePrimitive, long>(*this);
-}
-
+{ return (this->type_ == MT_long) ? this->value_.long_ : ConvertValueAndReturn<MultiTypePrimitive, long>(*this); }
 MultiTypePrimitive::operator unsigned long() const
-{
-    return (this->type_ == MT_ulong) ? this->value_.ulong_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned long>(*this);
-}
-
+{ return (this->type_ == MT_ulong) ? this->value_.ulong_ : ConvertValueAndReturn<MultiTypePrimitive, unsigned long>(*this); }
 MultiTypePrimitive::operator float() const
-{
-    return (this->type_ == MT_float) ? this->value_.float_ : ConvertValueAndReturn<MultiTypePrimitive, float>(*this);
-}
-
+{ return (this->type_ == MT_float) ? this->value_.float_ : ConvertValueAndReturn<MultiTypePrimitive, float>(*this); }
 MultiTypePrimitive::operator double() const
-{
-    return (this->type_ == MT_double) ? this->value_.double_ : ConvertValueAndReturn<MultiTypePrimitive, double>(*this);
-}
-
+{ return (this->type_ == MT_double) ? this->value_.double_ : ConvertValueAndReturn<MultiTypePrimitive, double>(*this); }
 MultiTypePrimitive::operator long double() const
-{
-    return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : ConvertValueAndReturn<MultiTypePrimitive, long double>(*this);
-}
-
+{ return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : ConvertValueAndReturn<MultiTypePrimitive, long double>(*this); }
 MultiTypePrimitive::operator bool() const
-{
-    return (this->type_ == MT_bool) ? this->value_.bool_ : ConvertValueAndReturn<MultiTypePrimitive, bool>(*this);
-}
+{ return (this->type_ == MT_bool) ? this->value_.bool_ : ConvertValueAndReturn<MultiTypePrimitive, bool>(*this); }
 
 void MultiTypePrimitive::setValue(const MultiTypePrimitive& mtp)
@@ -258,29 +223,5 @@
 std::ostream& operator<<(std::ostream& out, const MultiTypePrimitive& mtp)
 {
-    if (mtp.isA(MT_int))
-        out << mtp.getInt();
-    else if (mtp.isA(MT_uint))
-        out << mtp.getUnsignedInt();
-    else if (mtp.isA(MT_char))
-        out << mtp.getChar();
-    else if (mtp.isA(MT_uchar))
-        out << mtp.getUnsignedChar();
-    else if (mtp.isA(MT_short))
-        out << mtp.getShort();
-    else if (mtp.isA(MT_ushort))
-        out << mtp.getUnsignedShort();
-    else if (mtp.isA(MT_long))
-        out << mtp.getLong();
-    else if (mtp.isA(MT_ulong))
-        out << mtp.getUnsignedLong();
-    else if (mtp.isA(MT_float))
-        out << mtp.getFloat();
-    else if (mtp.isA(MT_double))
-        out << mtp.getDouble();
-    else if (mtp.isA(MT_longdouble))
-        out << mtp.getLongDouble();
-    else if (mtp.isA(MT_bool))
-        out << mtp.getBool();
-
+    out << mtp.toString();
     return out;
 }
Index: code/branches/core/src/util/MultiTypePrimitive.h
===================================================================
--- code/branches/core/src/util/MultiTypePrimitive.h	(revision 858)
+++ code/branches/core/src/util/MultiTypePrimitive.h	(revision 869)
@@ -53,4 +53,5 @@
         inline MultiTypePrimitive(bool           value) { this->setValue(value); }
         inline MultiTypePrimitive(const MultiTypePrimitive& mtp) { this->setValue(mtp); }
+        virtual inline ~MultiTypePrimitive() {}
 
         inline MultiTypePrimitive& operator=(MultiType      value) { this->type_ = MT_null; return *this; }
@@ -97,16 +98,16 @@
         bool operator!=(const MultiTypePrimitive& mtp) const;
 
-        operator int()            const;
-        operator unsigned int()   const;
-        operator char()           const;
-        operator unsigned char()  const;
-        operator short()          const;
-        operator unsigned short() const;
-        operator long()           const;
-        operator unsigned long()  const;
-        operator float ()         const;
-        operator double ()        const;
-        operator long double()    const;
-        operator bool()           const;
+        virtual operator int()            const;
+        virtual operator unsigned int()   const;
+        virtual operator char()           const;
+        virtual operator unsigned char()  const;
+        virtual operator short()          const;
+        virtual operator unsigned short() const;
+        virtual operator long()           const;
+        virtual operator unsigned long()  const;
+        virtual operator float ()         const;
+        virtual operator double ()        const;
+        virtual operator long double()    const;
+        virtual operator bool()           const;
 
         inline void setValue(int            value) { this->type_ = MT_int;        this->value_.int_        = value; }
@@ -166,6 +167,6 @@
         inline bool      isA(MultiType type) const { return (this->type_ == type); }
 
-        std::string toString() const;
-        bool fromString(const std::string value);
+        virtual std::string toString() const;
+        virtual bool fromString(const std::string value);
 
     protected:
Index: code/branches/core/src/util/MultiTypeString.cc
===================================================================
--- code/branches/core/src/util/MultiTypeString.cc	(revision 858)
+++ code/branches/core/src/util/MultiTypeString.cc	(revision 869)
@@ -64,13 +64,32 @@
 }
 
+MultiTypeString::operator int() const
+{ return (this->type_ == MT_int) ? this->value_.int_ : ConvertValueAndReturn<MultiTypeString, int>(*this); }
+MultiTypeString::operator unsigned int() const
+{ return (this->type_ == MT_uint) ? this->value_.uint_ : ConvertValueAndReturn<MultiTypeString, unsigned int>(*this); }
+MultiTypeString::operator char() const
+{ return (this->type_ == MT_char) ? this->value_.char_ : ConvertValueAndReturn<MultiTypeString, char>(*this); }
+MultiTypeString::operator unsigned char() const
+{ return (this->type_ == MT_uchar) ? this->value_.uchar_ : ConvertValueAndReturn<MultiTypeString, unsigned char>(*this); }
+MultiTypeString::operator short() const
+{ return (this->type_ == MT_short) ? this->value_.short_ : ConvertValueAndReturn<MultiTypeString, short>(*this); }
+MultiTypeString::operator unsigned short() const
+{ return (this->type_ == MT_ushort) ? this->value_.ushort_ : ConvertValueAndReturn<MultiTypeString, unsigned short>(*this); }
+MultiTypeString::operator long() const
+{ return (this->type_ == MT_long) ? this->value_.long_ : ConvertValueAndReturn<MultiTypeString, long>(*this); }
+MultiTypeString::operator unsigned long() const
+{ return (this->type_ == MT_ulong) ? this->value_.ulong_ : ConvertValueAndReturn<MultiTypeString, unsigned long>(*this); }
+MultiTypeString::operator float() const
+{ return (this->type_ == MT_float) ? this->value_.float_ : ConvertValueAndReturn<MultiTypeString, float>(*this); }
+MultiTypeString::operator double() const
+{ return (this->type_ == MT_double) ? this->value_.double_ : ConvertValueAndReturn<MultiTypeString, double>(*this); }
+MultiTypeString::operator long double() const
+{ return (this->type_ == MT_longdouble) ? this->value_.longdouble_ : ConvertValueAndReturn<MultiTypeString, long double>(*this); }
+MultiTypeString::operator bool() const
+{ return (this->type_ == MT_bool) ? this->value_.bool_ : ConvertValueAndReturn<MultiTypeString, bool>(*this); }
 MultiTypeString::operator std::string() const
-{
-    return (this->type_ == MT_string) ? this->string_ : ConvertValueAndReturn<MultiTypeString, std::string>(*this);
-}
-
+{ return (this->type_ == MT_string) ? this->string_ : ConvertValueAndReturn<MultiTypeString, std::string>(*this); }
 MultiTypeString::operator const char*() const
-{
-    return ((this->type_ == MT_constchar) ? this->string_ : ConvertValueAndReturn<MultiTypeString, std::string>(*this)).c_str();
-}
+{ return ((this->type_ == MT_constchar) ? this->string_ : ConvertValueAndReturn<MultiTypeString, std::string>(*this)).c_str(); }
 
 void MultiTypeString::setValue(const MultiTypeString& mts)
@@ -104,11 +123,5 @@
 std::ostream& operator<<(std::ostream& out, MultiTypeString& mts)
 {
-    if (mts.isA(MT_constchar))
-        out << mts.getConstChar();
-    else if (mts.isA(MT_string))
-        out << mts.getString();
-    else
-        out << ((MultiTypePrimitive)mts);
-
+    out << mts.toString();
     return out;
 }
Index: code/branches/core/src/util/MultiTypeString.h
===================================================================
--- code/branches/core/src/util/MultiTypeString.h	(revision 858)
+++ code/branches/core/src/util/MultiTypeString.h	(revision 869)
@@ -55,4 +55,5 @@
         inline MultiTypeString(const std::string& value)   { this->setValue(value); }
         inline MultiTypeString(const MultiTypeString& mts) { this->setValue(mts);   }
+        virtual inline ~MultiTypeString() {}
 
         using MultiTypePrimitive::operator=;
@@ -71,6 +72,18 @@
         bool operator!=(const MultiTypeString& mts) const;
 
-        operator std::string() const;
-        operator const char*() const;
+        virtual operator int()            const;
+        virtual operator unsigned int()   const;
+        virtual operator char()           const;
+        virtual operator unsigned char()  const;
+        virtual operator short()          const;
+        virtual operator unsigned short() const;
+        virtual operator long()           const;
+        virtual operator unsigned long()  const;
+        virtual operator float ()         const;
+        virtual operator double ()        const;
+        virtual operator long double()    const;
+        virtual operator bool()           const;
+        virtual operator std::string()    const;
+        virtual operator const char*()    const;
 
         using MultiTypePrimitive::setValue;
@@ -89,6 +102,6 @@
         inline void getValue(const char** variable) const { (*variable) = this->string_.c_str(); }
 
-        std::string toString() const;
-        bool fromString(const std::string value);
+        virtual std::string toString() const;
+        virtual bool fromString(const std::string value);
 
     protected:
