type_precision.hpp Source File

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List

# type_precision.hpp

    00001
    00002 // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
    00004 // Created : 2009-06-04
    00005 // Updated : 2009-06-04
    00006 // Licence : This source is under MIT License
    00007 // File    : glm/gtc/type_precision.hpp
    00009 // Dependency:
    00010 // - GLM core
    00011 // - GLM_GTC_half
    00012 // - GLM_GTC_quaternion
    00014
    00015 #ifndef glm_gtc_type_precision
    00016 #define glm_gtc_type_precision
    00017
    00018 // Dependency:
    00019 #include "../glm.hpp"
    00020 #include "../gtc/half_float.hpp"
    00021 #include "../gtc/quaternion.hpp"
    00022
    00023 #if(defined(GLM_MESSAGES) && !defined(glm_ext))
    00024 #       pragma message("GLM: GLM_GTC_type_precision extension included")
    00025 #endif
    00026
    00027 namespace glm
    00028 {
    00029         namespace test{
    00030                 bool main_gtc_type_precision();
    00031         }//namespace test
    00032
    00033         namespace gtc{
    00035         namespace type_precision
    00036         {
    00038                 // Dependences
    00039
    00040                 using namespace gtc::half_float;
    00041                 using namespace gtc::quaternion;
    00042
    00044                 // Signed int vector types
    00045
    00048
    00049                 typedef detail::int8                                            int8;
    00050                 typedef detail::int16                                           int16;
    00051                 typedef detail::int32                                           int32;
    00052                 typedef detail::int64                                           int64;
    00053
    00054                 typedef int8                                                            i8;
    00055                 typedef int16                                                           i16;
    00056                 typedef int32                                                           i32;
    00057                 typedef int64                                                           i64;
    00058
    00059                 //typedef i8                                                                    i8vec1;         //!< \brief 8bit signed integer scalar. (from GLM_GTC_type_precision extension)
    00060                 typedef detail::tvec2<i8>                                       i8vec2;
    00061                 typedef detail::tvec3<i8>                                       i8vec3;
    00062                 typedef detail::tvec4<i8>                                       i8vec4;
    00063
    00064                 //typedef i16                                                                   i16vec1;        //!< \brief 16bit signed integer scalar. (from GLM_GTC_type_precision extension)
    00065                 typedef detail::tvec2<i16>                                      i16vec2;
    00066                 typedef detail::tvec3<i16>                                      i16vec3;
    00067                 typedef detail::tvec4<i16>                                      i16vec4;
    00068
    00069                 //typedef i32                                                                   i32vec1;        //!< \brief 32bit signed integer scalar. (from GLM_GTC_type_precision extension)
    00070                 typedef detail::tvec2<i32>                                      i32vec2;
    00071                 typedef detail::tvec3<i32>                                      i32vec3;
    00072                 typedef detail::tvec4<i32>                                      i32vec4;
    00073
    00074                 //typedef i64                                                                   i64vec1;        //!< \brief 32bit signed integer scalar. (from GLM_GTC_type_precision extension)
    00075                 typedef detail::tvec2<i64>                                      i64vec2;
    00076                 typedef detail::tvec3<i64>                                      i64vec3;
    00077                 typedef detail::tvec4<i64>                                      i64vec4;
    00078
    00080                 // Unsigned int vector types
    00081
    00082                 typedef detail::uint8                                           uint8;
    00083                 typedef detail::uint16                                          uint16;
    00084                 typedef detail::uint32                                          uint32;
    00085                 typedef detail::uint64                                          uint64;
    00086
    00087                 typedef uint8                                                           u8;
    00088                 typedef uint16                                                          u16;
    00089                 typedef uint32                                                          u32;
    00090                 typedef uint64                                                          u64;
    00091
    00092                 //typedef u8                                                                    u8vec1;         //!< \brief 8bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
    00093                 typedef detail::tvec2<u8>                                       u8vec2;
    00094                 typedef detail::tvec3<u8>                                       u8vec3;
    00095                 typedef detail::tvec4<u8>                                       u8vec4;
    00096
    00097                 //typedef u16                                                                   u16vec1;    //!< \brief 16bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
    00098                 typedef detail::tvec2<u16>                                      u16vec2;
    00099                 typedef detail::tvec3<u16>                                      u16vec3;
    00100                 typedef detail::tvec4<u16>                                      u16vec4;
    00101
    00102                 //typedef u32                                                                   u32vec1;    //!< \brief 32bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
    00103                 typedef detail::tvec2<u32>                                      u32vec2;
    00104                 typedef detail::tvec3<u32>                                      u32vec3;
    00105                 typedef detail::tvec4<u32>                                      u32vec4;
    00106
    00107                 //typedef u64                                                                   u64vec1;    //!< \brief 64bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
    00108                 typedef detail::tvec2<u64>                                      u64vec2;
    00109                 typedef detail::tvec3<u64>                                      u64vec3;
    00110                 typedef detail::tvec4<u64>                                      u64vec4;
    00111
    00113                 // Float vector types
    00114
    00115                 typedef detail::float16                                         float16;
    00116                 typedef detail::float32                                         float32;
    00117                 typedef detail::float64                                         float64;
    00118
    00119                 typedef float16                                                         f16;
    00120                 typedef float32                                                         f32;
    00121                 typedef float64                                                         f64;
    00122
    00123                 typedef detail::tvec2<float>                            fvec2;
    00124                 typedef detail::tvec3<float>                            fvec3;
    00125                 typedef detail::tvec4<float>                            fvec4;
    00126
    00127                 //typedef f16                                                                   f16vec1;    //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension)
    00128                 typedef detail::tvec2<f16>                                      f16vec2;
    00129                 typedef detail::tvec3<f16>                                      f16vec3;
    00130                 typedef detail::tvec4<f16>                                      f16vec4;
    00131
    00132                 //typedef f32                                                                   f32vec1;    //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
    00133                 typedef detail::tvec2<f32>                                      f32vec2;
    00134                 typedef detail::tvec3<f32>                                      f32vec3;
    00135                 typedef detail::tvec4<f32>                                      f32vec4;
    00136
    00137                 //typedef f64                                                                   f64vec1;    //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
    00138                 typedef detail::tvec2<f64>                                      f64vec2;
    00139                 typedef detail::tvec3<f64>                                      f64vec3;
    00140                 typedef detail::tvec4<f64>                                      f64vec4;
    00141
    00143                 // Float matrix types
    00144
    00145                 //typedef f32                                                                   fmat1;  //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
    00146                 typedef detail::tmat2x2<f32>                            fmat2;
    00147                 typedef detail::tmat3x3<f32>                            fmat3;
    00148                 typedef detail::tmat4x4<f32>                            fmat4;
    00149
    00150                 //typedef f32                                                                   fmat1x1;        //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
    00151                 typedef detail::tmat2x2<f32>                            fmat2x2;
    00152                 typedef detail::tmat2x3<f32>                            fmat2x3;
    00153                 typedef detail::tmat2x4<f32>                            fmat2x4;
    00154                 typedef detail::tmat3x2<f32>                            fmat3x2;
    00155                 typedef detail::tmat3x3<f32>                            fmat3x3;
    00156                 typedef detail::tmat3x4<f32>                            fmat3x4;
    00157                 typedef detail::tmat4x2<f32>                            fmat4x2;
    00158                 typedef detail::tmat4x3<f32>                            fmat4x3;
    00159                 typedef detail::tmat4x4<f32>                            fmat4x4;
    00160
    00161                 //typedef f16                                                                   f16mat1;    //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension)
    00162                 typedef detail::tmat2x2<f16>                            f16mat2;
    00163                 typedef detail::tmat3x3<f16>                            f16mat3;
    00164                 typedef detail::tmat4x4<f16>                            f16mat4;
    00165
    00166                 //typedef f16                                                                   f16mat1x1;      //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension)
    00167                 typedef detail::tmat2x2<f16>                            f16mat2x2;
    00168                 typedef detail::tmat2x3<f16>                            f16mat2x3;
    00169                 typedef detail::tmat2x4<f16>                            f16mat2x4;
    00170                 typedef detail::tmat3x2<f16>                            f16mat3x2;
    00171                 typedef detail::tmat3x3<f16>                            f16mat3x3;
    00172                 typedef detail::tmat3x4<f16>                            f16mat3x4;
    00173                 typedef detail::tmat4x2<f16>                            f16mat4x2;
    00174                 typedef detail::tmat4x3<f16>                            f16mat4x3;
    00175                 typedef detail::tmat4x4<f16>                            f16mat4x4;
    00176
    00177                 //typedef f32                                                                   f32mat1;        //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
    00178                 typedef detail::tmat2x2<f32>                            f32mat2;
    00179                 typedef detail::tmat3x3<f32>                            f32mat3;
    00180                 typedef detail::tmat4x4<f32>                            f32mat4;
    00181
    00182                 //typedef f32                                                                   f32mat1x1;      //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
    00183                 typedef detail::tmat2x2<f32>                            f32mat2x2;
    00184                 typedef detail::tmat2x3<f32>                            f32mat2x3;
    00185                 typedef detail::tmat2x4<f32>                            f32mat2x4;
    00186                 typedef detail::tmat3x2<f32>                            f32mat3x2;
    00187                 typedef detail::tmat3x3<f32>                            f32mat3x3;
    00188                 typedef detail::tmat3x4<f32>                            f32mat3x4;
    00189                 typedef detail::tmat4x2<f32>                            f32mat4x2;
    00190                 typedef detail::tmat4x3<f32>                            f32mat4x3;
    00191                 typedef detail::tmat4x4<f32>                            f32mat4x4;
    00192
    00193                 //typedef f64                                                                   f64mat1;        //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension)
    00194                 typedef detail::tmat2x2<f64>                            f64mat2;
    00195                 typedef detail::tmat3x3<f64>                            f64mat3;
    00196                 typedef detail::tmat4x4<f64>                            f64mat4;
    00197
    00198                 //typedef f64                                                                   f64mat1x1;      //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension)
    00199                 typedef detail::tmat2x2<f64>                            f64mat2x2;
    00200                 typedef detail::tmat2x3<f64>                            f64mat2x3;
    00201                 typedef detail::tmat2x4<f64>                            f64mat2x4;
    00202                 typedef detail::tmat3x2<f64>                            f64mat3x2;
    00203                 typedef detail::tmat3x3<f64>                            f64mat3x3;
    00204                 typedef detail::tmat3x4<f64>                            f64mat3x4;
    00205                 typedef detail::tmat4x2<f64>                            f64mat4x2;
    00206                 typedef detail::tmat4x3<f64>                            f64mat4x3;
    00207                 typedef detail::tmat4x4<f64>                            f64mat4x4;
    00208
    00210                 // Float quaternion types
    00211
    00212                 typedef detail::tquat<f16>                                      f16quat;
    00213                 typedef detail::tquat<f32>                                      f32quat;
    00214                 typedef detail::tquat<f64>                                      f64quat;
    00215
    00217
    00218         }//namespace type_precision
    00219         }//namespace gtc
    00220 }//namespace glm
    00221
    00222 #include "type_precision.inl"
    00223
    00224 namespace glm{using namespace gtc::type_precision;}
    00225
    00226 #endif//glm_gtc_type_precision