spline.hpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  17. # ifndef GLM_ENABLE_EXPERIMENTAL
  18. # pragma message("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.")
  19. # else
  20. # pragma message("GLM: GLM_GTX_spline extension included")
  21. # endif
  22. #endif
  23. namespace glm
  24. {
  25. /// @addtogroup gtx_spline
  26. /// @{
  27. /// Return a point from a catmull rom curve.
  28. /// @see gtx_spline extension.
  29. template<typename genType>
  30. GLM_FUNC_DECL genType catmullRom(
  31. genType const& v1,
  32. genType const& v2,
  33. genType const& v3,
  34. genType const& v4,
  35. typename genType::value_type const& s);
  36. /// Return a point from a hermite curve.
  37. /// @see gtx_spline extension.
  38. template<typename genType>
  39. GLM_FUNC_DECL genType hermite(
  40. genType const& v1,
  41. genType const& t1,
  42. genType const& v2,
  43. genType const& t2,
  44. typename genType::value_type const& s);
  45. /// Return a point from a cubic curve.
  46. /// @see gtx_spline extension.
  47. template<typename genType>
  48. GLM_FUNC_DECL genType cubic(
  49. genType const& v1,
  50. genType const& v2,
  51. genType const& v3,
  52. genType const& v4,
  53. typename genType::value_type const& s);
  54. /// @}
  55. }//namespace glm
  56. #include "spline.inl"