Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 11, 2009, 9:40:24 PM (15 years ago)
Author:
rgrieder
Message:

Found another few unnecessary includes in util (and added two others that followed due to this change).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pch/src/util/Math.h

    r3128 r3146  
    3737#include "UtilPrereqs.h"
    3838
    39 #include <ostream>
    4039#include <string>
    4140#include <cmath>
    42 #include <boost/static_assert.hpp>
    4341
    4442#include <OgreMath.h>
     
    4644#include <OgreVector3.h>
    4745#include <OgreVector4.h>
    48 #include <OgreMatrix3.h>
    49 #include <OgreMatrix4.h>
    5046#include <OgreQuaternion.h>
    5147#include <OgreColourValue.h>
     
    207203    template <> inline orxonox::Quaternion  zeroise<orxonox::Quaternion>()  { return orxonox::Quaternion (0, 0, 0, 0); }
    208204
     205    //! Provides zero value symbols that can be returned as reference
     206    template <typename T>
     207    struct NilValue
     208    {
     209        inline operator const T&() const
     210        {
     211            return value;
     212        }
     213        static T value;
     214    };
     215    template <typename T>
     216    T NilValue<T>::value = zeroise<T>();
     217
    209218    /**
    210219        @brief Interpolates between two values for a time between 0 and 1.
     
    215224    */
    216225    template <typename T>
    217     T interpolate(float time, const T& start, const T& end)
     226    inline T interpolate(float time, const T& start, const T& end)
    218227    {
    219228        return time * (end - start) + start;
     
    228237    */
    229238    template <typename T>
    230     T interpolateSmooth(float time, const T& start, const T& end)
     239    inline T interpolateSmooth(float time, const T& start, const T& end)
    231240    {
    232241        return (-2 * (end - start) * cube(time)) + (3 * (end - start) * square(time)) + start;
     
    273282    {
    274283    public:
    275       IntVector2() : x(0), y(0) { }
    276       IntVector2(int _x, int _y) : x(_x), y(_y) { }
    277       int x;
    278       int y;
     284        IntVector2() : x(0), y(0) { }
     285        IntVector2(int _x, int _y) : x(_x), y(_y) { }
     286        int x;
     287        int y;
    279288    };
    280289
     
    282291    {
    283292    public:
    284       IntVector3() : x(0), y(0), z(0) { }
    285       IntVector3(int _x, int _y, int _z) : x(_x), y(_y), z(_z) { }
    286       int x;
    287       int y;
    288       int z;
     293        IntVector3() : x(0), y(0), z(0) { }
     294        IntVector3(int _x, int _y, int _z) : x(_x), y(_y), z(_z) { }
     295        int x;
     296        int y;
     297        int z;
    289298    };
    290299}
Note: See TracChangeset for help on using the changeset viewer.