string_cast.hpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. #ifndef GLM_ENABLE_EXPERIMENTAL
  25. # error "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."
  26. #endif
  27. #if(GLM_COMPILER & GLM_COMPILER_CUDA)
  28. # error "GLM_GTX_string_cast is not supported on CUDA compiler"
  29. #endif
  30. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  31. # pragma message("GLM: GLM_GTX_string_cast extension included")
  32. #endif
  33. namespace glm
  34. {
  35. /// @addtogroup gtx_string_cast
  36. /// @{
  37. /// Create a string from a GLM vector or matrix typed variable.
  38. /// @see gtx_string_cast extension.
  39. template<typename genType>
  40. GLM_FUNC_DECL std::string to_string(genType const& x);
  41. /// @}
  42. }//namespace glm
  43. #include "string_cast.inl"