You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

137 lines
4.9 KiB

5 years ago
  1. ///////////////////////////////////////////////////////////////////////////////////
  2. /// OpenGL Mathematics (glm.g-truc.net)
  3. ///
  4. /// Copyright (c) 2005 - 2013 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. #ifndef GLM_GTX_vec1
  37. #define GLM_GTX_vec1 GLM_VERSION
  38. // Dependency:
  39. #include "../glm.hpp"
  40. #include "../core/type_vec1.hpp"
  41. #if(defined(GLM_MESSAGES) && !defined(glm_ext))
  42. # pragma message("GLM: GLM_GTX_vec1 extension included")
  43. #endif
  44. namespace glm
  45. {
  46. //! 1 component vector of high precision floating-point numbers.
  47. //! There is no guarantee on the actual precision.
  48. //! From GLM_GTX_vec1 extension.
  49. typedef detail::highp_vec1_t highp_vec1;
  50. //! 1 component vector of medium precision floating-point numbers.
  51. //! There is no guarantee on the actual precision.
  52. //! From GLM_GTX_vec1 extension.
  53. typedef detail::mediump_vec1_t mediump_vec1;
  54. //! 1 component vector of low precision floating-point numbers.
  55. //! There is no guarantee on the actual precision.
  56. //! From GLM_GTX_vec1 extension.
  57. typedef detail::lowp_vec1_t lowp_vec1;
  58. //! 1 component vector of high precision signed integer numbers.
  59. //! There is no guarantee on the actual precision.
  60. //! From GLM_GTX_vec1 extension.
  61. typedef detail::highp_ivec1_t highp_ivec1;
  62. //! 1 component vector of medium precision signed integer numbers.
  63. //! There is no guarantee on the actual precision.
  64. //! From GLM_GTX_vec1 extension.
  65. typedef detail::mediump_ivec1_t mediump_ivec1;
  66. //! 1 component vector of low precision signed integer numbers.
  67. //! There is no guarantee on the actual precision.
  68. //! From GLM_GTX_vec1 extension.
  69. typedef detail::lowp_ivec1_t lowp_ivec1;
  70. //! 1 component vector of high precision unsigned integer numbers.
  71. //! There is no guarantee on the actual precision.
  72. //! From GLM_GTX_vec1 extension.
  73. typedef detail::highp_uvec1_t highp_uvec1;
  74. //! 1 component vector of medium precision unsigned integer numbers.
  75. //! There is no guarantee on the actual precision.
  76. //! From GLM_GTX_vec1 extension.
  77. typedef detail::mediump_uvec1_t mediump_uvec1;
  78. //! 1 component vector of low precision unsigned integer numbers.
  79. //! There is no guarantee on the actual precision.
  80. //! From GLM_GTX_vec1 extension.
  81. typedef detail::lowp_uvec1_t lowp_uvec1;
  82. //////////////////////////
  83. // vec1 definition
  84. //! 1 component vector of boolean.
  85. //! From GLM_GTX_vec1 extension.
  86. typedef detail::tvec1<bool> bvec1;
  87. #if(defined(GLM_PRECISION_HIGHP_FLOAT))
  88. typedef highp_vec1 vec1;
  89. #elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
  90. typedef mediump_vec1 vec1;
  91. #elif(defined(GLM_PRECISION_LOWP_FLOAT))
  92. typedef lowp_vec1 vec1;
  93. #else
  94. //! 1 component vector of floating-point numbers.
  95. //! From GLM_GTX_vec1 extension.
  96. typedef mediump_vec1 vec1;
  97. #endif//GLM_PRECISION
  98. #if(defined(GLM_PRECISION_HIGHP_INT))
  99. typedef highp_ivec1 ivec1;
  100. #elif(defined(GLM_PRECISION_MEDIUMP_INT))
  101. typedef mediump_ivec1 ivec1;
  102. #elif(defined(GLM_PRECISION_LOWP_INT))
  103. typedef lowp_ivec1 ivec1;
  104. #else
  105. //! 1 component vector of signed integer numbers.
  106. //! From GLM_GTX_vec1 extension.
  107. typedef mediump_ivec1 ivec1;
  108. #endif//GLM_PRECISION
  109. #if(defined(GLM_PRECISION_HIGHP_UINT))
  110. typedef highp_uvec1 uvec1;
  111. #elif(defined(GLM_PRECISION_MEDIUMP_UINT))
  112. typedef mediump_uvec1 uvec1;
  113. #elif(defined(GLM_PRECISION_LOWP_UINT))
  114. typedef lowp_uvec1 uvec1;
  115. #else
  116. //! 1 component vector of unsigned integer numbers.
  117. //! From GLM_GTX_vec1 extension.
  118. typedef mediump_uvec1 uvec1;
  119. #endif//GLM_PRECISION
  120. }// namespace glm
  121. #include "vec1.inl"
  122. #endif//GLM_GTX_vec1