#ifndef BEZIER_H #define BEZIER_H #include "igl_inline.h" #include #include namespace igl { /// Evaluate a polynomial Bezier Curve at single parameter value. /// /// @param[in] V #V by dim list of Bezier control points /// @param[in] t evaluation parameter within [0,1] /// @param[out] P 1 by dim output point template IGL_INLINE void bezier( const Eigen::MatrixBase & V, const typename DerivedV::Scalar t, Eigen::PlainObjectBase & P); /// Evaluate a polynomial Bezier Curve at many parameter values. /// /// @param[in] V #V by dim list of Bezier control points /// @param[in] T #T evaluation parameters within [0,1] /// @param[out] P #T by dim output points template IGL_INLINE void bezier( const Eigen::MatrixBase & V, const Eigen::MatrixBase & T, Eigen::PlainObjectBase & P); /// Evaluate a polynomial Bezier spline with a fixed parameter set for each /// sub-curve. /// /// @tparam VMat type of matrix of each list of control points /// @tparam DerivedT Derived type of evaluation parameters /// @tparam DerivedP Derived type of output points /// @param[in] spline #curves list of lists of Bezier control points /// @param[in] T #T evaluation parameters within [0,1] to use for each spline /// @param[out] P #curves*#T by dim output points template IGL_INLINE void bezier( const std::vector & spline, const Eigen::MatrixBase & T, Eigen::PlainObjectBase & P); } #ifndef IGL_STATIC_LIBRARY # include "bezier.cpp" #endif #endif