spline.hpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /// @ref gtx_spline
  2. /// @file glm/gtx/spline.hpp
  3. ///
  4. /// @see core (dependence)
  5. ///
  6. /// @defgroup gtx_spline GLM_GTX_spline
  7. /// @ingroup gtx
  8. ///
  9. /// Include <glm/gtx/spline.hpp> to use the features of this extension.
  10. ///
  11. /// Spline functions
  12. #pragma once
  13. // Dependency:
  14. #include "../glm.hpp"
  15. #include "../gtx/optimum_pow.hpp"
  16. #ifndef GLM_ENABLE_EXPERIMENTAL
  17. # error "GLM: GLM_GTX_spline 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."
  18. #endif
  19. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  20. # pragma message("GLM: GLM_GTX_spline extension included")
  21. #endif
  22. namespace glm
  23. {
  24. /// @addtogroup gtx_spline
  25. /// @{
  26. /// Return a point from a catmull rom curve.
  27. /// @see gtx_spline extension.
  28. template<typename genType>
  29. GLM_FUNC_DECL genType catmullRom(
  30. genType const& v1,
  31. genType const& v2,
  32. genType const& v3,
  33. genType const& v4,
  34. typename genType::value_type const& s);
  35. /// Return a point from a hermite curve.
  36. /// @see gtx_spline extension.
  37. template<typename genType>
  38. GLM_FUNC_DECL genType hermite(
  39. genType const& v1,
  40. genType const& t1,
  41. genType const& v2,
  42. genType const& t2,
  43. typename genType::value_type const& s);
  44. /// Return a point from a cubic curve.
  45. /// @see gtx_spline extension.
  46. template<typename genType>
  47. GLM_FUNC_DECL genType cubic(
  48. genType const& v1,
  49. genType const& v2,
  50. genType const& v3,
  51. genType const& v4,
  52. typename genType::value_type const& s);
  53. /// @}
  54. }//namespace glm
  55. #include "spline.inl"