- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# src/Core/CoreTypes.hpp

Go to the documentation of this file.

    00001 #ifndef CORE_TYPES_HPP
    00002 #define CORE_TYPES_HPP
    00003
    00004 // Détection du système cible...
    00005 #include "usgeDetectSystem.h"
    00006
    00007 namespace USpeedGameEngine
    00008 {
    00009
    00010 class USGE_Float3
    00011 {
    00012     public:
    00013         float x;
    00014         float y;
    00015         float z;
    00016
    00021         inline USGE_Float3()
    00022         {
    00023             this->x = 0.0f;
    00024             this->y = 0.0f;
    00025             this->z = 0.0f;
    00026         };
    00034         inline USGE_Float3(float xValue, float yValue, float zValue)
    00035         {
    00036             this->set(xValue, yValue, zValue);
    00037         };
    00043         inline USGE_Float3(const USGE_Float3 &pFloat3)
    00044         {
    00045             this->set(pFloat3);
    00046         };
    00052         inline void set(const USGE_Float3 &pFloat3)
    00053         {
    00054             this->x = pFloat3.x;
    00055             this->y = pFloat3.y;
    00056             this->z = pFloat3.z;
    00057         };
    00065         inline void set(float xValue, float yValue, float zValue)
    00066         {
    00067             this->x = xValue;
    00068             this->y = yValue;
    00069             this->z = zValue;
    00070         };
    00077         inline USGE_Float3 operator+(const USGE_Float3 &pFloat3) const
    00078         {
    00079             return USGE_Float3(this->x + pFloat3.x, this->y + pFloat3.y, this->z + pFloat3.z);
    00080         };
    00087         inline USGE_Float3 operator+(const float aFloat) const
    00088         {
    00089             return USGE_Float3(this->x + aFloat, this->y + aFloat, this->z + aFloat);
    00090         };
    00097         inline USGE_Float3 operator-(const USGE_Float3 &pFloat3) const
    00098         {
    00099             return USGE_Float3(this->x - pFloat3.x, this->y - pFloat3.y, this->z - pFloat3.z);
    00100         };
    00107         inline USGE_Float3 operator-(const float aFloat) const
    00108         {
    00109             return USGE_Float3(this->x - aFloat, this->y - aFloat, this->z - aFloat);
    00110         };
    00117         inline USGE_Float3 operator*(const USGE_Float3 &pFloat3) const
    00118         {
    00119             return USGE_Float3(this->x * pFloat3.x, this->y * pFloat3.y, this->z * pFloat3.z);
    00120         };
    00127         inline USGE_Float3 operator*(const float aFloat) const
    00128         {
    00129             return USGE_Float3(this->x * aFloat, this->y * aFloat, this->z * aFloat);
    00130         };
    00137         inline USGE_Float3 &operator=(const USGE_Float3 &pFloat3)
    00138         {
    00139             this->set(pFloat3);
    00140             return(*this);
    00141         };
    00148         inline USGE_Float3 &operator=(const float aFloat)
    00149         {
    00150             this->set(aFloat, aFloat, aFloat);
    00151             return(*this);
    00152         };
    00159         inline USGE_Float3 &operator+=(const USGE_Float3 &pFloat3)
    00160         {
    00161             (*this) = (*this) + pFloat3;
    00162             return(*this);
    00163         };
    00170         inline USGE_Float3 &operator+=(const float aFloat)
    00171         {
    00172             (*this) = (*this) + aFloat;
    00173             return(*this);
    00174         };
    00181         inline USGE_Float3 &operator-=(const USGE_Float3 &pFloat3)
    00182         {
    00183             (*this) = (*this) - pFloat3;
    00184             return(*this);
    00185         };
    00192         inline USGE_Float3 &operator-=(const float aFloat)
    00193         {
    00194             (*this) = (*this) - aFloat;
    00195             return(*this);
    00196         };
    00203         inline USGE_Float3 &operator*=(const USGE_Float3 &pFloat3)
    00204         {
    00205             (*this) = (*this) * pFloat3;
    00206             return(*this);
    00207         };
    00214         inline USGE_Float3 &operator*=(const float aFloat)
    00215         {
    00216             (*this) = (*this) * aFloat;
    00217             return(*this);
    00218         };
    00219 };
    00220
    00224 typedef enum EnumUSpeedGameEngineVertexMode
    00225 {
    00226     TRIANGLES,
    00227     TRIANGLE_STRIP
    00228 } USGE_VertexMode;
    00229
    00233 typedef enum EnumUSpeedGameEngineTextureMode
    00234 {
    00235     NEAREST,
    00236     LINEAR,
    00237     MIPMAP
    00238 } USGE_TextureMode;
    00239
    00243 typedef enum EnumUSpeedGameEngineTextureFormat
    00244 {
    00245     GREY,
    00246     COLOR_6666,
    00247     RGB,
    00248     RGBA,
    00249
    00250 } USGE_TextureFormat;
    00251
    00255 typedef struct StructUSpeedGameEngineVertex
    00256 {
    00257     float u;
    00258     float v;
    00259
    00260     float nx;
    00261     float ny;
    00262     float nz;
    00263
    00264     float x;
    00265     float y;
    00266     float z;
    00267 } USGE_Vertex;
    00268
    00272 typedef enum EnumUSpeedGameEngineInputControl
    00273 {
    00274     // POV : Point Of View
    00275     povUP,
    00276     povDOWN,
    00277     povLEFT,
    00278     povRIGHT,
    00279     // Les axes (6 maximum)
    00280     axisX,
    00281     axisY,
    00282     axisZ,
    00283     axisR,
    00284     axisU,
    00285     axisV,
    00286     // Les boutons de la souris
    00287     mouseLeftClick,
    00288     mouseRightClick,
    00289     mouseMiddleClick,
    00290 } USGE_InputControl;
    00291
    00295 typedef enum USpeedGameEngineEnumImageType
    00296 {
    00297     PNG,
    00298     JPG,
    00299     TGA
    00300 } USGE_Image;
    00301
    00302
    00307 typedef enum USpeedGameEngineEnumRenderEngine
    00308 {
    00309     DEFAULT,
    00310     OPENGL,
    00311     DIRECTX,
    00312     SOFTWARE
    00313 } USGE_RenderEngine;
    00314
    00315 class USGE_KeyFrame
    00316 {
    00317     public:
    00318         unsigned long int duration;
    00319         USGE_Float3 position;
    00320         USGE_Float3 rotation;
    00321
    00326         inline USGE_KeyFrame()
    00327         {
    00328             this->clear();
    00329         };
    00334         inline void clear()
    00335         {
    00336             // Durée
    00337             this->duration = 0;
    00338
    00339             // Informations
    00340             this->position = 0.0f;
    00341             this->rotation = 0.0f;
    00342         };
    00349         inline USGE_KeyFrame &operator=(const USGE_KeyFrame &pFrame)
    00350         {
    00351             this->duration = pFrame.duration;
    00352             this->position = pFrame.position;
    00353             this->rotation = pFrame.rotation;
    00354             return(*this);
    00355         };
    00356 };
    00357
    00358 }        // Fin "namespace USpeedGameEngine"
    00359
    00360 #endif