1 /////////////////////////////////////////////////////////////////////////////////// 2 /// OpenGL Mathematics (glm.g-truc.net) 3 /// 4 /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 /// of this software and associated documentation files (the "Software"), to deal 7 /// in the Software without restriction, including without limitation the rights 8 /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 /// copies of the Software, and to permit persons to whom the Software is 10 /// furnished to do so, subject to the following conditions: 11 /// 12 /// The above copyright notice and this permission notice shall be included in 13 /// all copies or substantial portions of the Software. 14 /// 15 /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 /// THE SOFTWARE. 22 /// 23 /// @ref gtx_vec1 24 /// @file glm/gtx/vec1.hpp 25 /// @date 2010-02-08 / 2011-06-07 26 /// @author Christophe Riccio 27 /// 28 /// @see core (dependence) 29 /// 30 /// @defgroup gtx_vec1 GLM_GTX_vec1 31 /// @ingroup gtx 32 /// 33 /// @brief Add vec1, ivec1, uvec1 and bvec1 types. 34 /// <glm/gtx/vec1.hpp> need to be included to use these functionalities. 35 /////////////////////////////////////////////////////////////////////////////////// 36 37 #ifndef GLM_GTX_vec1 38 #define GLM_GTX_vec1 39 40 // Dependency: 41 #include "../glm.hpp" 42 #include "../detail/type_vec1.hpp" 43 44 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 45 # pragma message("GLM: GLM_GTX_vec1 extension included") 46 #endif 47 48 namespace glm 49 { 50 //! 1 component vector of high precision floating-point numbers. 51 //! There is no guarantee on the actual precision. 52 /// @see gtx_vec1 extension. 53 typedef highp_vec1_t highp_vec1; 54 55 //! 1 component vector of medium precision floating-point numbers. 56 //! There is no guarantee on the actual precision. 57 /// @see gtx_vec1 extension. 58 typedef mediump_vec1_t mediump_vec1; 59 60 //! 1 component vector of low precision floating-point numbers. 61 //! There is no guarantee on the actual precision. 62 /// @see gtx_vec1 extension. 63 typedef lowp_vec1_t lowp_vec1; 64 65 //! 1 component vector of high precision signed integer numbers. 66 //! There is no guarantee on the actual precision. 67 /// @see gtx_vec1 extension. 68 typedef highp_ivec1_t highp_ivec1; 69 70 //! 1 component vector of medium precision signed integer numbers. 71 //! There is no guarantee on the actual precision. 72 /// @see gtx_vec1 extension. 73 typedef mediump_ivec1_t mediump_ivec1; 74 75 //! 1 component vector of low precision signed integer numbers. 76 //! There is no guarantee on the actual precision. 77 /// @see gtx_vec1 extension. 78 typedef lowp_ivec1_t lowp_ivec1; 79 80 //! 1 component vector of high precision unsigned integer numbers. 81 //! There is no guarantee on the actual precision. 82 /// @see gtx_vec1 extension. 83 typedef highp_uvec1_t highp_uvec1; 84 85 //! 1 component vector of medium precision unsigned integer numbers. 86 //! There is no guarantee on the actual precision. 87 /// @see gtx_vec1 extension. 88 typedef mediump_uvec1_t mediump_uvec1; 89 90 //! 1 component vector of low precision unsigned integer numbers. 91 //! There is no guarantee on the actual precision. 92 /// @see gtx_vec1 extension. 93 typedef lowp_uvec1_t lowp_uvec1; 94 95 //! 1 component vector of high precision boolean. 96 //! There is no guarantee on the actual precision. 97 /// @see gtx_vec1 extension. 98 typedef highp_bvec1_t highp_bvec1; 99 100 //! 1 component vector of medium precision boolean. 101 //! There is no guarantee on the actual precision. 102 /// @see gtx_vec1 extension. 103 typedef mediump_bvec1_t mediump_bvec1; 104 105 //! 1 component vector of low precision boolean. 106 //! There is no guarantee on the actual precision. 107 /// @see gtx_vec1 extension. 108 typedef lowp_bvec1_t lowp_bvec1; 109 110 ////////////////////////// 111 // vec1 definition 112 113 #if(defined(GLM_PRECISION_HIGHP_BOOL)) 114 typedef highp_bvec1 bvec1; 115 #elif(defined(GLM_PRECISION_MEDIUMP_BOOL)) 116 typedef mediump_bvec1 bvec1; 117 #elif(defined(GLM_PRECISION_LOWP_BOOL)) 118 typedef lowp_bvec1 bvec1; 119 #else 120 /// 1 component vector of boolean. 121 /// @see gtx_vec1 extension. 122 typedef highp_bvec1 bvec1; 123 #endif//GLM_PRECISION 124 125 #if(defined(GLM_PRECISION_HIGHP_FLOAT)) 126 typedef highp_vec1 vec1; 127 #elif(defined(GLM_PRECISION_MEDIUMP_FLOAT)) 128 typedef mediump_vec1 vec1; 129 #elif(defined(GLM_PRECISION_LOWP_FLOAT)) 130 typedef lowp_vec1 vec1; 131 #else 132 /// 1 component vector of floating-point numbers. 133 /// @see gtx_vec1 extension. 134 typedef highp_vec1 vec1; 135 #endif//GLM_PRECISION 136 137 #if(defined(GLM_PRECISION_HIGHP_INT)) 138 typedef highp_ivec1 ivec1; 139 #elif(defined(GLM_PRECISION_MEDIUMP_INT)) 140 typedef mediump_ivec1 ivec1; 141 #elif(defined(GLM_PRECISION_LOWP_INT)) 142 typedef lowp_ivec1 ivec1; 143 #else 144 /// 1 component vector of signed integer numbers. 145 /// @see gtx_vec1 extension. 146 typedef highp_ivec1 ivec1; 147 #endif//GLM_PRECISION 148 149 #if(defined(GLM_PRECISION_HIGHP_UINT)) 150 typedef highp_uvec1 uvec1; 151 #elif(defined(GLM_PRECISION_MEDIUMP_UINT)) 152 typedef mediump_uvec1 uvec1; 153 #elif(defined(GLM_PRECISION_LOWP_UINT)) 154 typedef lowp_uvec1 uvec1; 155 #else 156 /// 1 component vector of unsigned integer numbers. 157 /// @see gtx_vec1 extension. 158 typedef highp_uvec1 uvec1; 159 #endif//GLM_PRECISION 160 161 }// namespace glm 162 163 #include "vec1.inl" 164 165 #endif//GLM_GTX_vec1 166 167