Index: sandbox_light/src/libraries/util/CMakeLists.txt
===================================================================
--- sandbox_light/src/libraries/util/CMakeLists.txt	(revision 5788)
+++ sandbox_light/src/libraries/util/CMakeLists.txt	(revision 5789)
@@ -19,12 +19,9 @@
 
 SET_SOURCE_FILES(UTIL_SRC_FILES
-  CRC32.cc
   Exception.cc
-  ExprParser.cc
   Math.cc
   MultiType.cc
   OutputBuffer.cc
   OutputHandler.cc
-  Scope.cc
   SignalHandler.cc
   Sleep.cc
@@ -43,6 +40,5 @@
     "UTIL_SHARED_BUILD"
   LINK_LIBRARIES
-    ${CEGUI_LIBRARY}
-    ${OGRE_LIBRARY}
+    ogremath_orxonox
   SOURCE_FILES
     ${UTIL_SRC_FILES}
Index: sandbox_light/src/libraries/util/CRC32.cc
===================================================================
--- sandbox_light/src/libraries/util/CRC32.cc	(revision 5788)
+++ 	(revision )
@@ -1,59 +1,0 @@
-/*
- *   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:
- *      ...
- *   Co-authors:
- *      ...
- *
- */
-
-#include "CRC32.h"
-
-namespace orxonox
-{
-    void calcCRCBit(uint32_t &crc32, int bit)
-    {
-        int hbit = (crc32 & 0x80000000) ? 1 : 0;
-        if (hbit != bit)
-            crc32 = (crc32 << 1) ^ UTIL_CRC32POLY;
-        else
-            crc32 = crc32 << 1;
-      }
-
-    uint32_t calcCRC(unsigned char *data, unsigned int dataLength)
-    {
-        uint32_t crc32 = 0;
-        for(unsigned int i = 0; i < dataLength; i++)
-        {
-            calcCRCBit(crc32, (data[i] & 0x1) >> 0); // 1st bit
-            calcCRCBit(crc32, (data[i] & 0x2) >> 1); // 2nd bit
-            calcCRCBit(crc32, (data[i] & 0x3) >> 2); // 3rd bit
-            calcCRCBit(crc32, (data[i] & 0x4) >> 3); // 4th bit
-            calcCRCBit(crc32, (data[i] & 0x5) >> 4); // 5th bit
-            calcCRCBit(crc32, (data[i] & 0x6) >> 5); // 6th bit
-            calcCRCBit(crc32, (data[i] & 0x7) >> 6); // 7th bit
-            calcCRCBit(crc32, (data[i] & 0x8) >> 7); // 8th bit
-        }
-        return crc32;
-    }
-}
-
Index: sandbox_light/src/libraries/util/CRC32.h
===================================================================
--- sandbox_light/src/libraries/util/CRC32.h	(revision 5788)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
- *   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:
- *      ...
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Util_CRC_H__
-#define _Util_CRC_H__
-
-#include "UtilPrereqs.h"
-
-namespace orxonox
-{
-    const unsigned int UTIL_CRC32POLY = 0x04C11DB7; /* CRC-32 Polynom */
-
-    _UtilExport void calcCRCBit(uint32_t &crc32, int bit);
-
-    _UtilExport uint32_t calcCRC(unsigned char *data, unsigned int dataLength);
-}
-
-#endif /* _Util_CRC_H__ */
Index: sandbox_light/src/libraries/util/ExprParser.cc
===================================================================
--- sandbox_light/src/libraries/util/ExprParser.cc	(revision 5788)
+++ 	(revision )
@@ -1,453 +1,0 @@
-/*
- *   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
-  @brief Declaration of FloatParser
-*/
-
-#include "ExprParser.h"
-#include <cmath>
-#include <cstring>
-#include <cstdlib>
-
-// macros for easier if, else statements
-#define CASE_1(var) if (!strcmp(SWITCH,var))
-#define CASE(var) else if (!strcmp(SWITCH,var))
-#define CASE_ELSE else
-
-//! skip white spaces
-#define PARSE_BLANKS while (*reading_stream == ' ') ++reading_stream
-
-namespace orxonox
-{
-    ExprParser::ExprParser(const std::string& str)
-    {
-        this->failed_ = false;
-        this->reading_stream = str.c_str();
-        if (str.size() == 0 || *reading_stream == '\0')
-        {
-            this->failed_ = true;
-            this->result_ = 0.0;
-        }
-        else
-        {
-            this->result_ = parse_expr_8();
-            this->remains_ = reading_stream;
-        }
-    }
-
-    //Private functions:
-    /******************/
-    double ExprParser::parse_argument()
-    {
-        double value = parse_expr_8();
-        if (*reading_stream == ',')
-        {
-            ++reading_stream;
-            return value;
-        }
-        else
-        {
-            this->failed_ = true;
-            return 0;
-        }
-    }
-
-    double ExprParser::parse_last_argument()
-    {
-        double value = parse_expr_8();
-        if (*reading_stream == ')')
-        {
-            ++reading_stream;
-            return value;
-        }
-        else
-        {
-            this->failed_ = true;
-            return 0;
-        }
-    }
-
-    double ExprParser::parse_expr_8()
-    {
-        double value = parse_expr_7();
-        for(;;)
-        {
-            switch (op)
-            {
-            case oder:
-                value = parse_expr_7() || value;
-                break;
-            default: return value;
-            }
-        };
-    }
-
-
-    double ExprParser::parse_expr_7()
-    {
-        double value = parse_expr_6();
-        for(;;)
-        {
-            switch (op)
-            {
-            case und:
-                value = value && parse_expr_6();
-                break;
-            default: return value;
-            }
-        };
-    }
-
-    double ExprParser::parse_expr_6()
-    {
-        double value = parse_expr_5();
-        for(;;)
-        {
-            switch (op)
-            {
-            case gleich:
-                value = (value == parse_expr_5());
-                break;
-            case ungleich:
-                value = (value != parse_expr_5());
-                break;
-            default:
-                return value;
-            }
-        };
-    }
-
-    double ExprParser::parse_expr_5()
-    {
-        double value = parse_expr_4();
-        for(;;)
-        {
-            switch (op)
-            {
-            case kleiner:
-                value = (value < parse_expr_4());
-                break;
-            case kleinergleich:
-                value = (value <= parse_expr_4());
-                break;
-            case groesser:
-                value = (value > parse_expr_4());
-                break;
-            case groessergleich:
-                value = (value >= parse_expr_4());
-                break;
-            default:
-                return value;
-            }
-        };
-    }
-
-    double ExprParser::parse_expr_4()
-    {
-        double value = parse_expr_3();
-        for(;;)
-        {
-            switch (op)
-            {
-            case b_plus:
-                value += parse_expr_3();
-                break;
-            case b_minus:
-                value -= parse_expr_3();
-                break;
-            default:
-                return value;
-            }
-        };
-    }
-
-    double ExprParser::parse_expr_3()
-    {
-        double value = parse_expr_2();
-        for(;;)
-        {
-            switch (op)
-            {
-            case mal:
-                value *= parse_expr_2();
-                break;
-            case durch:
-                value /= parse_expr_2();
-                break;
-            case modulo:
-                {
-                    double temp = parse_expr_2();
-                    value = value - floor(value/temp)*temp;
-                    break;
-                }
-            default:
-                return value;
-            }
-        };
-    }
-
-    double ExprParser::parse_expr_2()
-    {
-        double value = parse_expr_1();
-        while (*reading_stream != '\0')
-        {
-            op = parse_binary_operator();
-            switch (op)
-            {
-            case hoch:
-                value = pow(value,parse_expr_1());
-                break;
-            default:
-                return value;
-            }
-        };
-        op = undef;
-        return value;
-    }
-
-    double ExprParser::parse_expr_1()
-    {
-        PARSE_BLANKS;
-        double value;
-
-        unary_operator op = parse_unary_operator();
-        PARSE_BLANKS;
-
-        if (*reading_stream == '\0')
-        {
-            // end of string
-            this->failed_ = true;
-            return 0;
-        }
-        else if ((*reading_stream > 47 && *reading_stream < 59) || *reading_stream == 46)
-        {  // number
-            value = strtod(reading_stream, const_cast<char**>(&reading_stream));
-        }
-        else if ((*reading_stream > 64 && *reading_stream < 91) || (*reading_stream > 96 && *reading_stream < 123) || *reading_stream == 46)
-        {  // variable or function
-            char* word = new char[256];
-            parse_word(word);
-            PARSE_BLANKS;
-            if (*reading_stream == '(')
-            {
-                ++reading_stream;
-#define SWITCH word
-                CASE_1("sin")
-                    value = sin(parse_last_argument());
-                CASE("asin")
-                    value = asin(parse_last_argument());
-                CASE("sinh")
-                    value = sinh(parse_last_argument());
-                CASE("asinh")
-                {
-                    value = parse_last_argument();
-                    value = log(sqrt(pow(value, 2) + 1) + value);
-                }
-                CASE("cos")
-                    value = cos(parse_last_argument());
-                CASE("acos")
-                    value = acos(parse_last_argument());
-                CASE("cosh")
-                    value = cosh(parse_last_argument());
-                CASE("acosh")
-                {
-                    value = parse_last_argument();
-                    value = log(sqrt(pow(value, 2) - 1) + value);
-                }
-                CASE("tan")
-                    value = tan(parse_last_argument());
-                CASE("atan")
-                    value = atan(parse_last_argument());
-                CASE("atan2")
-                    value = atan2(parse_argument(),parse_last_argument());
-                CASE("tanh")
-                    value = tanh(parse_last_argument());
-                CASE("atanh")
-                {
-                    value = parse_last_argument();
-                    value = 0.5*log((value + 1)/(value - 1));
-                }
-                CASE("int")
-                    value = floor(parse_last_argument());
-                CASE("floor")
-                    value = floor(parse_last_argument());
-                CASE("ceil")
-                    value = ceil(parse_last_argument());
-                CASE("abs")
-                    value = fabs(parse_last_argument());
-                CASE("exp")
-                    value = exp(parse_last_argument());
-                CASE("log")
-                    value = log10(parse_last_argument());
-                CASE("ln")
-                    value = log(parse_last_argument());
-                CASE("sign")
-                {
-                    value = parse_last_argument();
-                    value = (value>0 ? 1 : (value<0 ? -1 : 0));
-                }
-                CASE("sqrt")
-                    value = sqrt(parse_last_argument());
-                CASE("degrees")
-                    value = parse_last_argument()*180/3.1415926535897932;
-                CASE("radians")
-                    value = parse_last_argument()*3.1415926535897932/180;
-                CASE("mod")
-                {
-                    value = parse_argument();
-                    double value2 = parse_last_argument();
-                    value = value - floor(value/value2)*value2;
-                }
-                CASE("pow")
-                    value = pow(parse_argument(),parse_last_argument());
-                CASE("div")
-                    value = floor(parse_argument()/parse_last_argument());
-                CASE("max")
-                    value = std::max(parse_argument(),parse_last_argument());
-                CASE("min")
-                    value = std::min(parse_argument(),parse_last_argument());
-                CASE_ELSE
-                {
-                    this->failed_ = true;
-                    delete[] word;
-                    return 0;
-                }
-            }
-            else
-            {
-#define SWITCH word
-                CASE_1("pi")
-                    value = 3.1415926535897932;
-                CASE("e")
-                    value = 2.7182818284590452;
-                CASE_ELSE
-                {
-                    this->failed_ = true;
-                    delete[] word;
-                    return 0;
-                }
-            }
-            delete[] word;
-        }
-        else if (*reading_stream == 40)
-        {  // expresion in paranthesis
-            ++reading_stream;
-            value = parse_last_argument();
-        }
-        else
-        {
-            this->failed_ = true;
-            return 0;
-        }
-
-        PARSE_BLANKS;
-        switch (op)
-        {
-        case u_nicht: return !value;
-        case u_plus:  return  value;
-        case u_minus: return -value;
-        default:
-            this->failed_ = true;
-            return 0;
-        }
-    }
-
-    char* ExprParser::parse_word(char* str)
-    {
-        char* word = str;
-        int counter = 0;
-        while ((*reading_stream > 47 && *reading_stream < 58) || (*reading_stream > 64 && *reading_stream < 91) || (*reading_stream > 96 && *reading_stream < 123) || *reading_stream == 46)
-        {
-            *word++ = *reading_stream++;
-            counter++;
-            if (counter > 255)
-            {
-                this->failed_ = true;
-                return '\0';
-            }
-        };
-        *word = '\0';
-        return str;
-    }
-
-    ExprParser::binary_operator ExprParser::parse_binary_operator()
-    {
-        binary_operator op;
-        switch (*reading_stream)
-        {
-        case '+': op = b_plus; break;
-        case '-': op = b_minus; break;
-        case '*': op = mal; break;
-        case '/': op = durch; break;
-        case '^': op = hoch; break;
-        case '%': op = modulo; break;
-        case '&': op = und; break;
-        case '|': op = oder; break;
-        case '=': op = gleich; break;
-        case '!': op = b_nicht; break;
-        case '<': op = kleiner; break;
-        case '>': op = groesser; break;
-        default: return undef;
-        }
-        if (*++reading_stream == '=')
-        {
-            if (op > 9)
-            {
-                ++reading_stream;
-                return (binary_operator)(op + 3);
-            }
-            else
-            {
-                --reading_stream;
-                return undef;
-            }
-        }
-        else
-            return op;
-    }
-
-    ExprParser::unary_operator ExprParser::parse_unary_operator()
-    {
-        switch (*reading_stream)
-        {
-        case '!':
-            ++reading_stream;
-            return u_nicht;
-        case '+':
-            ++reading_stream;
-            return u_plus;
-        case '-':
-            ++reading_stream;
-            return u_minus;
-        default :
-            return u_plus;
-        }
-    }
-}
Index: sandbox_light/src/libraries/util/ExprParser.h
===================================================================
--- sandbox_light/src/libraries/util/ExprParser.h	(revision 5788)
+++ 	(revision )
@@ -1,110 +1,0 @@
-/*
- *   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
-  @brief Declaration of FloatParser
-*/
-
-#ifndef _FloatParser_H__
-#define _FloatParser_H__
-
-#include "UtilPrereqs.h"
-#include <string>
-
-namespace orxonox
-{
-    class _UtilExport ExprParser
-    {
-    public:
-        enum binary_operator
-        {
-            b_plus,
-            b_minus,
-            mal,
-            durch,
-            modulo,
-            hoch,
-            undef,
-            oder,
-            und,
-            gleich,
-            b_nicht,
-            kleiner,
-            groesser,
-            ungleich,
-            kleinergleich,
-            groessergleich
-        };
-
-        enum unary_operator
-        {
-            u_plus,
-            u_minus,
-            u_nicht
-        };
-
-
-        ExprParser(const std::string& str);
-        const std::string& getRemains() { return  this->remains_; }
-        double             getResult()  { return  this->result_; }
-        bool               getSuccess() { return !this->failed_; }
-
-    private:
-        double parse_expr_1();
-        double parse_expr_2();
-        double parse_expr_3();
-        double parse_expr_4();
-        double parse_expr_5();
-        double parse_expr_6();
-        double parse_expr_7();
-        double parse_expr_8();
-        char* parse_word(char* str);
-        binary_operator parse_binary_operator();
-        unary_operator parse_unary_operator();
-
-        double parse_argument();
-        double parse_last_argument();
-
-        binary_operator op;
-        const char* reading_stream;
-        bool failed_;
-        double result_;
-        std::string remains_;
-
-    };
-
-    //Endzeichen für float expression: ')', '}', ']', ',', ';'
-    _UtilExport bool parse_float(char* const, char**, double*);
-    //Endzeichen angegeben
-    _UtilExport bool parse_float(char* const, char**, char, double*);
-    //Letzter Teil-float eines Vektors parsen (keine Vergleichs- und Logikoperationen)
-    _UtilExport bool parse_vector_float(char* const, char**, bool, double*);
-}
-
-#endif /* _FloatParser_H__ */
Index: sandbox_light/src/libraries/util/Math.cc
===================================================================
--- sandbox_light/src/libraries/util/Math.cc	(revision 5788)
+++ sandbox_light/src/libraries/util/Math.cc	(revision 5789)
@@ -34,10 +34,6 @@
 #include "Math.h"
 
-#include <OgrePlane.h>
-
 #include "MathConvert.h"
 #include "SubString.h"
-// Do not remove this include, it avoids linker errors.
-#include "mbool.h"
 
 namespace orxonox
@@ -81,139 +77,4 @@
         degree = temp;
         return in;
-    }
-
-
-    /**
-        @brief Gets the angle between my viewing direction and the direction to the position of the other object.
-        @param myposition My position
-        @param mydirection My viewing direction
-        @param otherposition The position of the other object
-        @return The angle
-
-        @example
-        If the other object is exactly in front of me, the function returns 0.
-        If the other object is exactly behind me, the function returns pi.
-        If the other object is exactly right/left to me (or above/below), the function returns pi/2.
-    */
-    float getAngle(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& otherposition)
-    {
-        orxonox::Vector3 distance = otherposition - myposition;
-        float distancelength = distance.length();
-        if (distancelength == 0)
-            return 0;
-        else
-            return acos(clamp<float>(mydirection.dotProduct(distance) / distancelength, -1, 1));
-    }
-
-    /**
-        @brief Gets the 2D viewing direction (up/down, left/right) to the position of the other object.
-        @param myposition My position
-        @param mydirection My viewing direction
-        @param myorthonormal My orthonormalvector (pointing upwards through my head)
-        @param otherposition The position of the other object
-        @return The viewing direction
-
-        @example
-        If the other object is exactly in front of me, the function returns Vector2(0, 0).
-        If the other object is exactly at my left, the function returns Vector2(-1, 0).
-        If the other object is exactly at my right, the function returns Vector2(1, 0).
-        If the other object is only a bit at my right, the function still returns Vector2(1, 0).
-        If the other object is exactly above me, the function returns Vector2(0, 1).
-    */
-    orxonox::Vector2 get2DViewdirection(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition)
-    {
-        orxonox::Vector3 distance = otherposition - myposition;
-
-        // project difference vector on our plane
-        orxonox::Vector3 projection = Ogre::Plane(mydirection, myposition).projectVector(distance);
-
-        float projectionlength = projection.length();
-        if (projectionlength == 0)
-        {
-            if (myposition.dotProduct(otherposition) >= 0)
-                return orxonox::Vector2(0, 0);
-            else
-                return orxonox::Vector2(0, 1);
-        }
-        
-        float cos_value = clamp<float>(myorthonormal.dotProduct(projection) / projectionlength, -1, 1);
-        float sin_value = sqrt( 1 - cos_value*cos_value );
-        
-        if ((mydirection.crossProduct(myorthonormal)).dotProduct(distance) > 0)
-            return orxonox::Vector2( sin_value, cos_value );
-        else
-            return orxonox::Vector2( -sin_value, cos_value );
-    }
-
-    /**
-        @brief Gets the 2D viewing direction (up/down, left/right) to the position of the other object, multiplied with the viewing distance to the object (0° = 0, 180° = 1).
-        @param myposition My position
-        @param mydirection My viewing direction
-        @param myorthonormal My orthonormalvector (pointing upwards through my head)
-        @param otherposition The position of the other object
-        @return The viewing direction
-
-        @example
-        If the other object is exactly in front of me, the function returns Vector2(0, 0).
-        If the other object is exactly at my left, the function returns Vector2(-0.5, 0).
-        If the other object is exactly at my right, the function returns Vector2(0.5, 0).
-        If the other object is only a bit at my right, the function still returns Vector2(0.01, 0).
-        If the other object is exactly above me, the function returns Vector2(0, 0.5).
-    */
-    orxonox::Vector2 get2DViewcoordinates(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition)
-    {
-        orxonox::Vector3 distance = otherposition - myposition;
-
-        // project difference vector on our plane
-        orxonox::Vector3 projection = Ogre::Plane(mydirection, myposition).projectVector(distance);
-
-        float projectionlength = projection.length();
-        if (projectionlength == 0)
-        {
-            if (myposition.dotProduct(otherposition) >= 0)
-                return orxonox::Vector2(0, 0);
-            else
-                return orxonox::Vector2(0, 1);
-        }
-        //float angle = acos(clamp<float>(myorthonormal.dotProduct(projection) / projectionlength, -1, 1));
-        
-        float cos_value = clamp<float>(myorthonormal.dotProduct(projection) / projectionlength, -1, 1);
-        float sin_value = sqrt( 1 - cos_value*cos_value );
-
-        float distancelength = distance.length();
-        if (distancelength == 0) return orxonox::Vector2(0, 0);
-        float radius = acos(clamp<float>(mydirection.dotProduct(distance) / distancelength, -1, 1)) / Ogre::Math::PI;
-
-        if ((mydirection.crossProduct(myorthonormal)).dotProduct(distance) > 0)
-            return orxonox::Vector2( sin_value * radius, cos_value * radius);
-        else
-            return orxonox::Vector2( -sin_value * radius, cos_value * radius);
-    }
-
-    /**
-        @brief Returns the predicted position I have to aim at, if I want to hit a moving target with a moving projectile.
-        @param myposition My position
-        @param projectilespeed The speed of my projectile
-        @param targetposition The position of my target
-        @param targetvelocity The velocity of my target
-        @return The predicted position
-
-        The function predicts the position based on a linear velocity of the target. If the target changes speed or direction, the projectile will miss.
-    */
-    orxonox::Vector3 getPredictedPosition(const orxonox::Vector3& myposition, float projectilespeed, const orxonox::Vector3& targetposition, const orxonox::Vector3& targetvelocity)
-    {
-        float squaredProjectilespeed = projectilespeed * projectilespeed;
-        orxonox::Vector3 distance = targetposition - myposition;
-        float a = distance.squaredLength();
-        float b = 2 * (distance.x + distance.y + distance.z) * (targetvelocity.x + targetvelocity.y + targetvelocity.z);
-        float c = targetvelocity.squaredLength();
-
-        float temp = 4*squaredProjectilespeed*c + a*a - 4*b*c;
-        if (temp < 0)
-            return orxonox::Vector3::ZERO;
-
-        temp = sqrt(temp);
-        float time = (temp + a) / (2 * (squaredProjectilespeed - b));
-        return (targetposition + targetvelocity * time);
     }
 
Index: sandbox_light/src/libraries/util/Math.h
===================================================================
--- sandbox_light/src/libraries/util/Math.h	(revision 5788)
+++ sandbox_light/src/libraries/util/Math.h	(revision 5789)
@@ -40,10 +40,10 @@
 #include <cmath>
 
-#include <OgreMath.h>
-#include <OgreVector2.h>
-#include <OgreVector3.h>
-#include <OgreVector4.h>
-#include <OgreQuaternion.h>
-#include <OgreColourValue.h>
+#include <ogremath/OgreMath.h>
+#include <ogremath/OgreVector2.h>
+#include <ogremath/OgreVector3.h>
+#include <ogremath/OgreVector4.h>
+#include <ogremath/OgreQuaternion.h>
+#include <ogremath/OgreColourValue.h>
 
 // Certain headers might define unwanted macros...
@@ -63,9 +63,4 @@
     _UtilExport std::ostream& operator<<(std::ostream& out, const orxonox::Degree& degree);
     _UtilExport std::istream& operator>>(std::istream& in, orxonox::Degree& degree);
-
-    _UtilExport float getAngle(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& otherposition);
-    _UtilExport orxonox::Vector2 get2DViewdirection(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition);
-    _UtilExport orxonox::Vector2 get2DViewcoordinates(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition);
-    _UtilExport orxonox::Vector3 getPredictedPosition(const orxonox::Vector3& myposition, float projectilespeed, const orxonox::Vector3& targetposition, const orxonox::Vector3& targetvelocity);
 
     /**
Index: sandbox_light/src/libraries/util/MultiType.h
===================================================================
--- sandbox_light/src/libraries/util/MultiType.h	(revision 5788)
+++ sandbox_light/src/libraries/util/MultiType.h	(revision 5789)
@@ -71,9 +71,9 @@
 #include <cassert>
 #include <string>
-#include <OgreVector2.h>
-#include <OgreVector3.h>
-#include <OgreVector4.h>
-#include <OgreQuaternion.h>
-#include <OgreColourValue.h>
+#include <ogremath/OgreVector2.h>
+#include <ogremath/OgreVector3.h>
+#include <ogremath/OgreVector4.h>
+#include <ogremath/OgreQuaternion.h>
+#include <ogremath/OgreColourValue.h>
 
 #include "TypeTraits.h"
Index: sandbox_light/src/libraries/util/OrxEnum.h
===================================================================
--- sandbox_light/src/libraries/util/OrxEnum.h	(revision 5788)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
- *   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
-@brief
-    Declaration of the OrxEnum class.
-*/
-
-#ifndef _OrxEnum_H__
-#define _OrxEnum_H__
-
-#include "UtilPrereqs.h"
-
-namespace orxonox
-{
-    template <class T>
-    struct OrxEnum
-    {
-        public:
-            OrxEnum() { }
-            OrxEnum(int type)                  { type_ = type; }
-            OrxEnum(const T& instance)   { type_ = instance.type_; }
-
-            operator int()                     { return type_; }
-            T& operator =(int type)      { type_ = type; return *this; }
-            bool operator <(const T& right) const { return (type_ < right.type_); }
-            bool operator >(const T& right) const { return (type_ > right.type_); }
-
-        private:
-            OrxEnum(const OrxEnum& instance);
-            int type_;
-    };
-}
-
-#define OrxEnumConstructors(enumName)                        \
-enumName() { }                                               \
-enumName(int type) : OrxEnum<enumName>(type)             { } \
-enumName(const enumName& inst) : OrxEnum<enumName>(inst) { } \
-void dummyFunction()
-
-#endif /* _OrxEnum_H__ */
Index: sandbox_light/src/libraries/util/Scope.cc
===================================================================
--- sandbox_light/src/libraries/util/Scope.cc	(revision 5788)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/*
- *   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:
- *      ...
- *
- */
-
-#include "Scope.h"
-
-namespace orxonox
-{
-    std::map<ScopeID::Value, int> ScopeManager::instanceCounts_s;
-    std::map<ScopeID::Value, std::set<ScopeListener*> > ScopeManager::listeners_s;
-}
Index: sandbox_light/src/libraries/util/Scope.h
===================================================================
--- sandbox_light/src/libraries/util/Scope.h	(revision 5788)
+++ 	(revision )
@@ -1,141 +1,0 @@
-/*
- *   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:
- *      ...
- *
- */
-
-#ifndef __Util_Scope_H__
-#define __Util_Scope_H__
-
-#include "UtilPrereqs.h"
-#include <cassert>
-#include <set>
-#include <map>
-#include "Debug.h"
-
-namespace orxonox
-{
-    namespace ScopeID
-    {
-        /**
-            @brief A list of available scopes for the Scope template.
-        */
-        enum Value
-        {
-            GSRoot,
-            GSGraphics,
-            GSLevel
-        };
-    }
-
-    class ScopeListener; // Forward declaration
-
-    /**
-        @brief The ScopeManager stores the variables of the scope templates in a statically linked context.
-    */
-    class _UtilExport ScopeManager
-    {
-        template <ScopeID::Value scope>
-        friend class Scope;
-        friend class ScopeListener;
-
-        private:
-            static std::map<ScopeID::Value, int> instanceCounts_s;                  //!< Counts the number of active instances (>0 means active) for a scope
-            static std::map<ScopeID::Value, std::set<ScopeListener*> > listeners_s; //!< Stores all listeners for a scope
-    };
-
-    /**
-        @brief ScopeListeners register themselves in the corresponding scope and wait for notifications.
-    */
-    class _UtilExport ScopeListener
-    {
-        template <ScopeID::Value scope>
-        friend class Scope;
-
-        protected:
-            //! Constructor: Registers the instance.
-            ScopeListener(ScopeID::Value scope) : scope_(scope)
-                { ScopeManager::listeners_s[this->scope_].insert(this); }
-            //! Destructor: Unregisters the instance.
-            virtual ~ScopeListener()
-                { ScopeManager::listeners_s[this->scope_].erase(this); }
-
-            //! Gets called if the scope is activated
-            virtual void activated() = 0;
-            //! Gets called if the scope is deactivated
-            virtual void deactivated() = 0;
-
-        private:
-            ScopeID::Value scope_; //!< Store the scope to unregister on destruction
-    };
-
-    /**
-        @brief A scope for a given template argument is either active or not.
-
-        Objects inheriting from a ScopeListener are registered in a list (different for each scope).
-        If the scope gets activated or deactivated, all objects in this list are notified.
-    */
-    template <ScopeID::Value scope>
-    class Scope
-    {
-        public:
-            //! Constructor: Increases the instance counter and activates the scope if the count went from 0 to 1. Counts >1 don't change anything.
-            Scope()
-            {
-                ScopeManager::instanceCounts_s[scope]++;
-                assert(ScopeManager::instanceCounts_s[scope] > 0);
-                if (ScopeManager::instanceCounts_s[scope] == 1)
-                {
-                    for (typename std::set<ScopeListener*>::iterator it = ScopeManager::listeners_s[scope].begin(); it != ScopeManager::listeners_s[scope].end(); )
-                        (*(it++))->activated();
-                }
-            }
-
-            //! Destructor: Decreases the instance counter and deactivates the scope if the count went from 1 to 0. Counts >0 don't change anything.
-            ~Scope()
-            {
-                ScopeManager::instanceCounts_s[scope]--;
-
-                // This shouldn't happen but just to be sure: check if the count is positive
-                assert(ScopeManager::instanceCounts_s[scope] >= 0);
-                if (ScopeManager::instanceCounts_s[scope] < 0)
-                    ScopeManager::instanceCounts_s[scope] = 0;
-
-                if (ScopeManager::instanceCounts_s[scope] == 0)
-                {
-                    for (typename std::set<ScopeListener*>::iterator it = ScopeManager::listeners_s[scope].begin(); it != ScopeManager::listeners_s[scope].end(); )
-                        (*(it++))->deactivated();
-                }
-            }
-
-            //! Returns true if the scope is active.
-            static bool isActive()
-            {
-                return (ScopeManager::instanceCounts_s[scope] > 0);
-            }
-    };
-}
-
-#endif /* __Util_Scope_H__ */
Index: sandbox_light/src/libraries/util/ScopedSingleton.h
===================================================================
--- sandbox_light/src/libraries/util/ScopedSingleton.h	(revision 5788)
+++ 	(revision )
@@ -1,102 +1,0 @@
-/*
- *   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:
- *      ...
- *
- */
-
-#ifndef __Util_ScopedSingleton_H__
-#define __Util_ScopedSingleton_H__
-
-#include "UtilPrereqs.h"
-#include <cassert>
-
-#include "Scope.h"
-
-namespace orxonox
-{
-    /**
-    @brief
-        Base for scoped singleton classes.
-        A Scoped singleton creates itself if the scope is active and getInstance() is called.
-        Destroys itself if the scope is deactivated.
-
-        Usage:
-        Inherit publicly from ScopedSingleton<MyClass, scope> and provide access to
-        MyClass::singletonPtr_s.
-        This can easily be done with a friend declaration.
-
-        See @ref UtilPrereqs.h for a list of scopes (ScopeID::Value).
-    */
-    template <class T, ScopeID::Value scope>
-    class ScopedSingleton : public ScopeListener
-    {
-        public:
-            //! Returns a reference to the singleton instance
-            static T& getInstance()
-            {
-                assert(Scope<scope>::isActive());
-
-                if (!T::singletonPtr_s && Scope<scope>::isActive())
-                    T::singletonPtr_s = new T();
-
-                return *T::singletonPtr_s;
-            }
-
-        protected:
-            //! Constructor sets the singleton instance pointer
-            ScopedSingleton() : ScopeListener(scope)
-            {
-                assert(T::singletonPtr_s == 0);
-                T::singletonPtr_s = static_cast<T*>(this);
-            }
-
-            //! Constructor resets the singleton instance pointer
-            ~ScopedSingleton()
-            {
-                assert(T::singletonPtr_s != 0);
-                T::singletonPtr_s = 0;
-            }
-
-        private:
-            //! Called if the Scope of this Singleton gets active (no instance should be active then)
-            void activated()
-            {
-                // The ScopedSingleton shouldn't be active bevor the scope is activated -> always assertion failed
-                assert(T::singletonPtr_s == 0 && false);
-            }
-
-            //! Called if the Scope of this Singleton gets deactivated (destroys the instance)
-            void deactivated()
-            {
-                if (T::singletonPtr_s)
-                {
-                    delete T::singletonPtr_s;
-                    T::singletonPtr_s = 0;
-                }
-            }
-    };
-}
-
-#endif /* __Util_ScopedSingleton_H__ */
Index: sandbox_light/src/libraries/util/mbool.h
===================================================================
--- sandbox_light/src/libraries/util/mbool.h	(revision 5788)
+++ 	(revision )
@@ -1,81 +1,0 @@
-/*
- *   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:
- *      ...
- *
- */
-
-#ifndef _mbool_H__
-#define _mbool_H__
-
-#include "UtilPrereqs.h"
-
-namespace orxonox
-{
-    struct _UtilExport mbool
-    {
-        public:
-            inline mbool(bool value = false)
-                { this->value_.memory_ = 0; this->value_.bool_ = value; }
-            inline mbool(const mbool& value)
-                { this->value_.memory_ = value.value_.memory_; }
-
-            inline const mbool& operator=(bool value)
-                { if (value != this->value_.bool_) { ++this->value_.memory_; } return (*this); }
-            inline const mbool& operator=(const mbool& value)
-                { this->value_.memory_ = value.value_.memory_; return (*this); }
-
-            inline mbool& operator++()
-                { ++this->value_.memory_; return (*this); }
-            inline mbool operator++(int i)
-                { mbool temp = (*this); ++this->value_.memory_; return temp; }
-
-            inline operator bool() const
-                { return this->value_.bool_; }
-
-            inline bool operator==(bool other) const
-                { return this->value_.bool_ == other; }
-            inline bool operator!=(bool other) const
-                { return this->value_.bool_ != other; }
-
-            inline bool operator==(const mbool& other) const
-                { return this->value_.memory_ == other.value_.memory_; }
-            inline bool operator!=(const mbool& other) const
-                { return this->value_.memory_ != other.value_.memory_; }
-
-            inline bool operator!() const
-                { return (!this->value_.bool_); }
-            
-            inline unsigned char& getMemory(){ return value_.memory_; }
-
-        private:
-            union
-            {
-                bool bool_ : 1;
-                unsigned char memory_;
-            } value_;
-    };
-}
-
-#endif /* _mbool_H__ */
