string_cast.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. ///
  15. /// This extension is not supported with CUDA
  16. #pragma once
  17. // Dependency:
  18. #include "../glm.hpp"
  19. #include "../gtc/type_precision.hpp"
  20. #include "../gtc/quaternion.hpp"
  21. #include "../gtx/dual_quaternion.hpp"
  22. #include <string>
  23. #include <cmath>
  24. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  25. # ifndef GLM_ENABLE_EXPERIMENTAL
  26. # 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.")
  27. # else
  28. # pragma message("GLM: GLM_GTX_string_cast extension included")
  29. # endif
  30. #endif
  31. #if(GLM_COMPILER & GLM_COMPILER_CUDA)
  32. # error "GLM_GTX_string_cast is not supported on CUDA compiler"
  33. #endif
  34. namespace glm
  35. {
  36. /// @addtogroup gtx_string_cast
  37. /// @{
  38. /// Create a string from a GLM vector or matrix typed variable.
  39. /// @see gtx_string_cast extension.
  40. template<typename genType>
  41. GLM_FUNC_DECL std::string to_string(genType const& x);
  42. /// @}
  43. }//namespace glm
  44. #include "string_cast.inl"