number_precision.hpp 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. #ifndef GLM_ENABLE_EXPERIMENTAL
  19. # error "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."
  20. #endif
  21. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  22. # pragma message("GLM: GLM_GTX_number_precision extension included")
  23. #endif
  24. namespace glm{
  25. namespace gtx
  26. {
  27. /////////////////////////////
  28. // Unsigned int vector types
  29. /// @addtogroup gtx_number_precision
  30. /// @{
  31. typedef u8 u8vec1; //!< \brief 8bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
  32. typedef u16 u16vec1; //!< \brief 16bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
  33. typedef u32 u32vec1; //!< \brief 32bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
  34. typedef u64 u64vec1; //!< \brief 64bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
  35. //////////////////////
  36. // Float vector types
  37. typedef f32 f32vec1; //!< \brief Single-qualifier floating-point scalar. (from GLM_GTX_number_precision extension)
  38. typedef f64 f64vec1; //!< \brief Single-qualifier floating-point scalar. (from GLM_GTX_number_precision extension)
  39. //////////////////////
  40. // Float matrix types
  41. typedef f32 f32mat1; //!< \brief Single-qualifier floating-point scalar. (from GLM_GTX_number_precision extension)
  42. typedef f32 f32mat1x1; //!< \brief Single-qualifier floating-point scalar. (from GLM_GTX_number_precision extension)
  43. typedef f64 f64mat1; //!< \brief Double-qualifier floating-point scalar. (from GLM_GTX_number_precision extension)
  44. typedef f64 f64mat1x1; //!< \brief Double-qualifier floating-point scalar. (from GLM_GTX_number_precision extension)
  45. /// @}
  46. }//namespace gtx
  47. }//namespace glm
  48. #include "number_precision.inl"