GLM Version 0.9.0

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) && GLM_PRECISION & 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) && GLM_PRECISION & 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) && GLM_PRECISION & 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         typedef precision::mediump_vec2         vec2;
00084 
00087         typedef precision::mediump_vec3         vec3;
00088 
00091         typedef precision::mediump_vec4         vec4;
00092 
00095         typedef precision::mediump_mat2x2               mat2x2;
00096 
00099         typedef precision::mediump_mat2x3               mat2x3;
00100 
00103         typedef precision::mediump_mat2x4               mat2x4;
00104 
00107         typedef precision::mediump_mat3x2               mat3x2;
00108 
00111         typedef precision::mediump_mat3x3               mat3x3;
00112 
00115         typedef precision::mediump_mat3x4               mat3x4;
00116 
00119         typedef precision::mediump_mat4x2               mat4x2;
00120 
00123         typedef precision::mediump_mat4x3               mat4x3;
00124 
00127         typedef precision::mediump_mat4x4               mat4x4;
00128 
00129 #endif//GLM_PRECISION
00130 
00133         typedef mat2x2                                                  mat2;
00134 
00137         typedef mat3x3                                                  mat3;
00138 
00141         typedef mat4x4                                                  mat4;
00142 
00144         // Signed integer definition
00145 
00146 #if(defined(GLM_PRECISION) && GLM_PRECISION & GLM_PRECISION_HIGHP_INT)
00147         typedef precision::highp_ivec2                  ivec2;
00148         typedef precision::highp_ivec3                  ivec3;
00149         typedef precision::highp_ivec4                  ivec4;
00150 #elif(defined(GLM_PRECISION) && GLM_PRECISION & GLM_PRECISION_MEDIUMP_INT)
00151         typedef precision::mediump_ivec2                ivec2;
00152         typedef precision::mediump_ivec3                ivec3;
00153         typedef precision::mediump_ivec4                ivec4;
00154 #elif(defined(GLM_PRECISION) && GLM_PRECISION & GLM_PRECISION_LOWP_INT)
00155         typedef precision::lowp_ivec2                   ivec2;
00156         typedef precision::lowp_ivec3                   ivec3;
00157         typedef precision::lowp_ivec4                   ivec4;
00158 #else
00159 
00160 
00161         typedef precision::mediump_ivec2                ivec2;
00162 
00165         typedef precision::mediump_ivec3                ivec3;
00166 
00169         typedef precision::mediump_ivec4                ivec4;
00170 #endif//GLM_PRECISION
00171 
00173         // Unsigned integer definition
00174 
00175 #if(defined(GLM_PRECISION) && GLM_PRECISION & GLM_PRECISION_HIGHP_UINT)
00176         typedef precision::highp_uvec2                  uvec2;
00177         typedef precision::highp_uvec3                  uvec3;
00178         typedef precision::highp_uvec4                  uvec4;
00179 #elif(defined(GLM_PRECISION) && GLM_PRECISION & GLM_PRECISION_MEDIUMP_UINT)
00180         typedef precision::mediump_uvec2                uvec2;
00181         typedef precision::mediump_uvec3                uvec3;
00182         typedef precision::mediump_uvec4                uvec4;
00183 #elif(defined(GLM_PRECISION) && GLM_PRECISION & GLM_PRECISION_LOWP_UINT)
00184         typedef precision::lowp_uvec2                   uvec2;
00185         typedef precision::lowp_uvec3                   uvec3;
00186         typedef precision::lowp_uvec4                   uvec4;
00187 #else
00188 
00189 
00190         typedef precision::mediump_uvec2                uvec2;
00191 
00194         typedef precision::mediump_uvec3                uvec3;
00195 
00198         typedef precision::mediump_uvec4                uvec4;
00199 #endif//GLM_PRECISION
00200 
00202         // Boolean definition
00203 
00206         typedef detail::tvec2<bool>             bvec2;
00207 
00210         typedef detail::tvec3<bool>             bvec3;
00211 
00214         typedef detail::tvec4<bool>             bvec4;
00215 
00217         // Double definition
00218 
00221         typedef detail::tvec2<double>   dvec2;
00222 
00225         typedef detail::tvec3<double>   dvec3;
00226 
00229         typedef detail::tvec4<double>   dvec4;
00230 
00233         typedef detail::tmat2x2<double> dmat2;
00234 
00237         typedef detail::tmat3x3<double> dmat3;
00238 
00241         typedef detail::tmat4x4<double> dmat4;
00242 
00245         typedef detail::tmat2x2<double> dmat2x2;
00246 
00249         typedef detail::tmat2x3<double> dmat2x3;
00250 
00253         typedef detail::tmat2x4<double> dmat2x4;
00254 
00257         typedef detail::tmat3x2<double> dmat3x2;
00258 
00261         typedef detail::tmat3x3<double> dmat3x3;
00262 
00265         typedef detail::tmat3x4<double> dmat3x4;
00266 
00269         typedef detail::tmat4x2<double> dmat4x2;
00270 
00273         typedef detail::tmat4x3<double> dmat4x3;
00274 
00277         typedef detail::tmat4x4<double> dmat4x4;
00278 
00279 }//namespace type
00280 }//namespace core
00281 }//namespace glm
00282 
00283 #endif//glm_core_type