string_cast.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /// @ref gtx_string_cast
  2. /// @file glm/gtx/string_cast.hpp
  3. ///
  4. /// @see core (dependence)
  5. /// @see gtx_integer (dependence)
  6. /// @see gtx_quaternion (dependence)
  7. ///
  8. /// @defgroup gtx_string_cast GLM_GTX_string_cast
  9. /// @ingroup gtx
  10. ///
  11. /// Include <glm/gtx/string_cast.hpp> to use the features of this extension.
  12. ///
  13. /// Setup strings for GLM type values
  14. #pragma once
  15. // Dependency:
  16. #include "../glm.hpp"
  17. #include "../gtc/type_precision.hpp"
  18. #include "../gtc/quaternion.hpp"
  19. #include "../gtx/dual_quaternion.hpp"
  20. #include <string>
  21. #include <cmath>
  22. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  23. # ifndef GLM_ENABLE_EXPERIMENTAL
  24. # pragma message("GLM: GLM_GTX_string_cast 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.")
  25. # else
  26. # pragma message("GLM: GLM_GTX_string_cast extension included")
  27. # endif
  28. #endif
  29. namespace glm
  30. {
  31. /// @addtogroup gtx_string_cast
  32. /// @{
  33. /// Create a string from a GLM vector or matrix typed variable.
  34. /// @see gtx_string_cast extension.
  35. template<typename genType>
  36. GLM_FUNC_DECL std::string to_string(genType const& x);
  37. /// @}
  38. }//namespace glm
  39. #include "string_cast.inl"