35 #ifndef IECORE_SPLINE_H
36 #define IECORE_SPLINE_H
38 #include "IECore/CubicBasis.h"
40 #include "OpenEXR/ImathColor.h"
42 #include "boost/numeric/interval.hpp"
52 template<
typename X,
typename Y>
60 typedef boost::numeric::interval<XType> XInterval;
63 typedef std::multimap<X, Y> PointContainer;
64 typedef typename PointContainer::value_type Point;
70 PointContainer points;
72 Spline(
const Basis &basis=Basis::catmullRom() );
73 Spline(
const Basis &basis,
const PointContainer &points );
83 inline X
solve( X x,
typename PointContainer::const_iterator &segment )
const;
85 inline X
solve( X x, Y segment[4] )
const;
94 inline Y
integral( X x0, X x1 )
const;
99 inline bool operator==(
const Spline &rhs )
const;
100 inline bool operator!=(
const Spline &rhs )
const;
104 inline Y
integral( X t0, X t1,
typename PointContainer::const_iterator segment )
const;
105 inline Y
integral( X t0,
typename PointContainer::const_iterator segment0, X t1,
typename PointContainer::const_iterator segment1 )
const;
106 inline typename PointContainer::const_iterator lastValidSegment()
const;
117 #include "IECore/Spline.inl"
119 #endif // IECORE_SPLINE_H
Y operator()(X x) const
Uses solve() to evaluate the y value for a given x position.
Y integral() const
Returns the integral Y with respect to X over the spline domain.
XInterval interval() const
Returns the range of the spline in the X direction.
X solve(X x, typename PointContainer::const_iterator &segment) const
This namespace contains all components of the core library.
Definition: AddSmoothSkinningInfluencesOp.h:43
Y derivative(X x) const
Returns dY/dX at given X.
Basis basis
Definition: Spline.h:69