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 /// @brief Spline functions 10 /// 11 /// <glm/gtx/spline.hpp> need to be included to use these functionalities. 12 13 #pragma once 14 15 // Dependency: 16 #include "../glm.hpp" 17 #include "../gtx/optimum_pow.hpp" 18 19 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 20 # pragma message("GLM: GLM_GTX_spline extension included") 21 #endif 22 23 namespace glm 24 { 25 /// @addtogroup gtx_spline 26 /// @{ 27 28 /// Return a point from a catmull rom curve. 29 /// @see gtx_spline extension. 30 template <typename genType> 31 GLM_FUNC_DECL genType catmullRom( 32 genType const & v1, 33 genType const & v2, 34 genType const & v3, 35 genType const & v4, 36 typename genType::value_type const & s); 37 38 /// Return a point from a hermite curve. 39 /// @see gtx_spline extension. 40 template <typename genType> 41 GLM_FUNC_DECL genType hermite( 42 genType const & v1, 43 genType const & t1, 44 genType const & v2, 45 genType const & t2, 46 typename genType::value_type const & s); 47 48 /// Return a point from a cubic curve. 49 /// @see gtx_spline extension. 50 template <typename genType> 51 GLM_FUNC_DECL genType cubic( 52 genType const & v1, 53 genType const & v2, 54 genType const & v3, 55 genType const & v4, 56 typename genType::value_type const & s); 57 58 /// @} 59 }//namespace glm 60 61 #include "spline.inl" 62