type.hpp
00001 
00002 // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
00004 // Created : 2008-01-08
00005 // Updated : 2008-01-08
00006 // Licence : This source is under MIT License
00007 // File    : glm/core/type.hpp
00009 
00010 #ifndef glm_core_type
00011 #define glm_core_type
00012 
00013 #include "type_half.hpp"
00014 #include "type_float.hpp"
00015 #include "type_int.hpp"
00016 
00017 #include "type_gentype.hpp"
00018 
00019 #include "type_vec1.hpp"
00020 #include "type_vec2.hpp"
00021 #include "type_vec3.hpp"
00022 #include "type_vec4.hpp"
00023 
00024 #include "type_mat2x2.hpp"
00025 #include "type_mat2x3.hpp"
00026 #include "type_mat2x4.hpp"
00027 #include "type_mat3x2.hpp"
00028 #include "type_mat3x3.hpp"
00029 #include "type_mat3x4.hpp"
00030 #include "type_mat4x2.hpp"
00031 #include "type_mat4x3.hpp"
00032 #include "type_mat4x4.hpp"
00033 
00034 namespace glm{
00035 namespace core{
00036 namespace type
00037 {
00039         // Float definition
00040 
00041 #if(defined(GLM_PRECISION_HIGHP_FLOAT))
00042         typedef precision::highp_vec2           vec2;
00043         typedef precision::highp_vec3           vec3;
00044         typedef precision::highp_vec4           vec4;
00045         typedef precision::highp_mat2x2         mat2x2;
00046         typedef precision::highp_mat2x3         mat2x3;
00047         typedef precision::highp_mat2x4         mat2x4;
00048         typedef precision::highp_mat3x2         mat3x2;
00049         typedef precision::highp_mat3x3         mat3x3;
00050         typedef precision::highp_mat3x4         mat3x4;
00051         typedef precision::highp_mat4x2         mat4x2;
00052         typedef precision::highp_mat4x3         mat4x3;
00053         typedef precision::highp_mat4x4         mat4x4;
00054 #elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
00055         typedef precision::mediump_vec2         vec2;
00056         typedef precision::mediump_vec3         vec3;
00057         typedef precision::mediump_vec4         vec4;
00058         typedef precision::mediump_mat2x2       mat2x2;
00059         typedef precision::mediump_mat2x3       mat2x3;
00060         typedef precision::mediump_mat2x4       mat2x4;
00061         typedef precision::mediump_mat3x2       mat3x2;
00062         typedef precision::mediump_mat3x3       mat3x3;
00063         typedef precision::mediump_mat3x4       mat3x4;
00064         typedef precision::mediump_mat4x2       mat4x2;
00065         typedef precision::mediump_mat4x3       mat4x3;
00066         typedef precision::mediump_mat4x4       mat4x4;
00067 #elif(defined(GLM_PRECISION_LOWP_FLOAT))
00068         typedef precision::lowp_vec2                    vec2;
00069         typedef precision::lowp_vec3                    vec3;
00070         typedef precision::lowp_vec4                    vec4;
00071         typedef precision::lowp_mat2x2                  mat2x2;
00072         typedef precision::lowp_mat2x3                  mat2x3;
00073         typedef precision::lowp_mat2x4                  mat2x4;
00074         typedef precision::lowp_mat3x2                  mat3x2;
00075         typedef precision::lowp_mat3x3                  mat3x3;
00076         typedef precision::lowp_mat3x4                  mat3x4;
00077         typedef precision::lowp_mat4x2                  mat4x2;
00078         typedef precision::lowp_mat4x3                  mat4x3;
00079         typedef precision::lowp_mat4x4                  mat4x4;
00080 #else
00081 
00082 
00083 
00084         typedef precision::mediump_vec2         vec2;
00085 
00089         typedef precision::mediump_vec3         vec3;
00090 
00094         typedef precision::mediump_vec4         vec4;
00095 
00099         typedef precision::mediump_mat2x2               mat2x2;
00100 
00104         typedef precision::mediump_mat2x3               mat2x3;
00105 
00109         typedef precision::mediump_mat2x4               mat2x4;
00110 
00114         typedef precision::mediump_mat3x2               mat3x2;
00115 
00119         typedef precision::mediump_mat3x3               mat3x3;
00120 
00124         typedef precision::mediump_mat3x4               mat3x4;
00125 
00129         typedef precision::mediump_mat4x2               mat4x2;
00130 
00134         typedef precision::mediump_mat4x3               mat4x3;
00135 
00139         typedef precision::mediump_mat4x4               mat4x4;
00140 
00141 #endif//GLM_PRECISION
00142 
00146         typedef mat2x2                                                  mat2;
00147 
00151         typedef mat3x3                                                  mat3;
00152 
00156         typedef mat4x4                                                  mat4;
00157 
00159         // Signed integer definition
00160 
00161 #if(defined(GLM_PRECISION_HIGHP_INT))
00162         typedef precision::highp_ivec2                  ivec2;
00163         typedef precision::highp_ivec3                  ivec3;
00164         typedef precision::highp_ivec4                  ivec4;
00165 #elif(defined(GLM_PRECISION_MEDIUMP_INT))
00166         typedef precision::mediump_ivec2                ivec2;
00167         typedef precision::mediump_ivec3                ivec3;
00168         typedef precision::mediump_ivec4                ivec4;
00169 #elif(defined(GLM_PRECISION_LOWP_INT))
00170         typedef precision::lowp_ivec2                   ivec2;
00171         typedef precision::lowp_ivec3                   ivec3;
00172         typedef precision::lowp_ivec4                   ivec4;
00173 #else
00174 
00175 
00176 
00177         typedef precision::mediump_ivec2                ivec2;
00178 
00182         typedef precision::mediump_ivec3                ivec3;
00183 
00187         typedef precision::mediump_ivec4                ivec4;
00188 #endif//GLM_PRECISION
00189 
00191         // Unsigned integer definition
00192 
00193 #if(defined(GLM_PRECISION_HIGHP_UINT))
00194         typedef precision::highp_uvec2                  uvec2;
00195         typedef precision::highp_uvec3                  uvec3;
00196         typedef precision::highp_uvec4                  uvec4;
00197 #elif(defined(GLM_PRECISION_MEDIUMP_UINT))
00198         typedef precision::mediump_uvec2                uvec2;
00199         typedef precision::mediump_uvec3                uvec3;
00200         typedef precision::mediump_uvec4                uvec4;
00201 #elif(defined(GLM_PRECISION_LOWP_UINT))
00202         typedef precision::lowp_uvec2                   uvec2;
00203         typedef precision::lowp_uvec3                   uvec3;
00204         typedef precision::lowp_uvec4                   uvec4;
00205 #else
00206 
00207 
00208 
00209         typedef precision::mediump_uvec2                uvec2;
00210 
00214         typedef precision::mediump_uvec3                uvec3;
00215 
00219         typedef precision::mediump_uvec4                uvec4;
00220 #endif//GLM_PRECISION
00221 
00223         // Boolean definition
00224 
00228         typedef detail::tvec2<bool>             bvec2;
00229 
00233         typedef detail::tvec3<bool>             bvec3;
00234 
00238         typedef detail::tvec4<bool>             bvec4;
00239 
00241         // Double definition
00242 
00246         typedef detail::tvec2<double>   dvec2;
00247 
00251         typedef detail::tvec3<double>   dvec3;
00252 
00256         typedef detail::tvec4<double>   dvec4;
00257 
00261         typedef detail::tmat2x2<double> dmat2;
00262 
00266         typedef detail::tmat3x3<double> dmat3;
00267 
00271         typedef detail::tmat4x4<double> dmat4;
00272 
00276         typedef detail::tmat2x2<double> dmat2x2;
00277 
00281         typedef detail::tmat2x3<double> dmat2x3;
00282 
00286         typedef detail::tmat2x4<double> dmat2x4;
00287 
00291         typedef detail::tmat3x2<double> dmat3x2;
00292 
00296         typedef detail::tmat3x3<double> dmat3x3;
00297 
00301         typedef detail::tmat3x4<double> dmat3x4;
00302 
00306         typedef detail::tmat4x2<double> dmat4x2;
00307 
00311         typedef detail::tmat4x3<double> dmat4x3;
00312 
00316         typedef detail::tmat4x4<double> dmat4x4;
00317 
00318 }//namespace type
00319 }//namespace core
00320 }//namespace glm
00321 
00322 #endif//glm_core_type