number_precision.hpp 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /// @ref gtx_number_precision
  2. /// @file glm/gtx/number_precision.hpp
  3. ///
  4. /// @see core (dependence)
  5. /// @see gtc_type_precision (dependence)
  6. /// @see gtc_quaternion (dependence)
  7. ///
  8. /// @defgroup gtx_number_precision GLM_GTX_number_precision
  9. /// @ingroup gtx
  10. ///
  11. /// Include <glm/gtx/number_precision.hpp> to use the features of this extension.
  12. ///
  13. /// Defined size types.
  14. #pragma once
  15. // Dependency:
  16. #include "../glm.hpp"
  17. #include "../gtc/type_precision.hpp"
  18. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  19. # ifndef GLM_ENABLE_EXPERIMENTAL
  20. # pragma message("GLM: GLM_GTX_number_precision is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
  21. # else
  22. # pragma message("GLM: GLM_GTX_number_precision extension included")
  23. # endif
  24. #endif
  25. namespace glm{
  26. namespace gtx
  27. {
  28. /////////////////////////////
  29. // Unsigned int vector types
  30. /// @addtogroup gtx_number_precision
  31. /// @{
  32. typedef u8 u8vec1; //!< \brief 8bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
  33. typedef u16 u16vec1; //!< \brief 16bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
  34. typedef u32 u32vec1; //!< \brief 32bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
  35. typedef u64 u64vec1; //!< \brief 64bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
  36. //////////////////////
  37. // Float vector types
  38. typedef f32 f32vec1; //!< \brief Single-qualifier floating-point scalar. (from GLM_GTX_number_precision extension)
  39. typedef f64 f64vec1; //!< \brief Single-qualifier floating-point scalar. (from GLM_GTX_number_precision extension)
  40. //////////////////////
  41. // Float matrix types
  42. typedef f32 f32mat1; //!< \brief Single-qualifier floating-point scalar. (from GLM_GTX_number_precision extension)
  43. typedef f32 f32mat1x1; //!< \brief Single-qualifier floating-point scalar. (from GLM_GTX_number_precision extension)
  44. typedef f64 f64mat1; //!< \brief Double-qualifier floating-point scalar. (from GLM_GTX_number_precision extension)
  45. typedef f64 f64mat1x1; //!< \brief Double-qualifier floating-point scalar. (from GLM_GTX_number_precision extension)
  46. /// @}
  47. }//namespace gtx
  48. }//namespace glm
  49. #include "number_precision.inl"