glm.hpp 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 core
  24. /// @file glm/glm.hpp
  25. /// @date 2005-01-14 / 2011-10-24
  26. /// @author Christophe Riccio
  27. ///
  28. /// @defgroup core GLM Core
  29. ///
  30. /// @brief The core of GLM, which implements exactly and only the GLSL specification to the degree possible.
  31. ///
  32. /// The GLM core consists of @ref core_types "C++ types that mirror GLSL types" and
  33. /// C++ functions that mirror the GLSL functions. It also includes
  34. /// @ref core_precision "a set of precision-based types" that can be used in the appropriate
  35. /// functions. The C++ types are all based on a basic set of @ref core_template "template types".
  36. ///
  37. /// The best documentation for GLM Core is the current GLSL specification,
  38. /// <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.clean.pdf">version 4.2
  39. /// (pdf file)</a>.
  40. /// There are a few @ref pg_differences "differences" between GLM core and GLSL.
  41. ///
  42. /// GLM core functionnalities require <glm/glm.hpp> to be included to be used.
  43. ///
  44. /// @defgroup core_types Types
  45. ///
  46. /// @brief The standard types defined by the specification.
  47. ///
  48. /// These types are all typedefs of more generalized, template types. To see the definiton
  49. /// of these template types, go to @ref core_template.
  50. ///
  51. /// @ingroup core
  52. ///
  53. /// @defgroup core_precision Precision types
  54. ///
  55. /// @brief Non-GLSL types that are used to define precision-based types.
  56. ///
  57. /// The GLSL language allows the user to define the precision of a particular variable.
  58. /// In OpenGL's GLSL, these precision qualifiers have no effect; they are there for compatibility
  59. /// with OpenGL ES's precision qualifiers, where they @em do have an effect.
  60. ///
  61. /// C++ has no language equivalent to precision qualifiers. So GLM provides the next-best thing:
  62. /// a number of typedefs of the @ref core_template that use a particular precision.
  63. ///
  64. /// None of these types make any guarantees about the actual precision used.
  65. ///
  66. /// @ingroup core
  67. ///
  68. /// @defgroup core_template Template types
  69. ///
  70. /// @brief The generic template types used as the basis for the core types.
  71. ///
  72. /// These types are all templates used to define the actual @ref core_types.
  73. /// These templetes are implementation details of GLM types and should not be used explicitly.
  74. ///
  75. /// @ingroup core
  76. ///////////////////////////////////////////////////////////////////////////////////
  77. #include "detail/_fixes.hpp"
  78. #pragma once
  79. #include <cmath>
  80. #include <climits>
  81. #include <cfloat>
  82. #include <limits>
  83. #include <cassert>
  84. #include "fwd.hpp"
  85. #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED))
  86. # define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED
  87. # pragma message("GLM: Core library included")
  88. #endif//GLM_MESSAGE
  89. #include "vec2.hpp"
  90. #include "vec3.hpp"
  91. #include "vec4.hpp"
  92. #include "mat2x2.hpp"
  93. #include "mat2x3.hpp"
  94. #include "mat2x4.hpp"
  95. #include "mat3x2.hpp"
  96. #include "mat3x3.hpp"
  97. #include "mat3x4.hpp"
  98. #include "mat4x2.hpp"
  99. #include "mat4x3.hpp"
  100. #include "mat4x4.hpp"
  101. #include "trigonometric.hpp"
  102. #include "exponential.hpp"
  103. #include "common.hpp"
  104. #include "packing.hpp"
  105. #include "geometric.hpp"
  106. #include "matrix.hpp"
  107. #include "vector_relational.hpp"
  108. #include "integer.hpp"