Cortex  10.0.0-a4
Public Types | Public Member Functions | Public Attributes | List of all members
IECore::Spline< X, Y > Class Template Reference

#include <Spline.h>

Public Types

typedef X XType
 
typedef Y YType
 
typedef boost::numeric::interval< XType > XInterval
 
typedef CubicBasis< XType > Basis
 
typedef std::multimap< X, Y > PointContainer
 
typedef PointContainer::value_type Point
 

Public Member Functions

 Spline (const Basis &basis=Basis::catmullRom())
 
 Spline (const Basis &basis, const PointContainer &points)
 
XInterval interval () const
 Returns the range of the spline in the X direction.
 
solve (X x, typename PointContainer::const_iterator &segment) const
 
solve (X x, Y segment[4]) const
 As above but fills the points array with the points for the segment.
 
operator() (X x) const
 Uses solve() to evaluate the y value for a given x position.
 
derivative (X x) const
 Returns dY/dX at given X.
 
integral (X x0, X x1) const
 Returns integral Y with respect to X for the given interval.
 
integral () const
 Returns the integral Y with respect to X over the spline domain.
 
bool operator== (const Spline &rhs) const
 
bool operator!= (const Spline &rhs) const
 

Public Attributes

Basis basis
 
PointContainer points
 

Detailed Description

template<typename X, typename Y>
class IECore::Spline< X, Y >

A Spline class suitable for things like creating ramps of colour through a series of control points or for creating simple animation curves.

Member Function Documentation

template<typename X , typename Y >
X IECore::Spline< X, Y >::solve ( x,
typename PointContainer::const_iterator &  segment 
) const
inline

Find the appropriate segment and parametric position to determine the y value for a given x value. The parametric position is returned and segment is set to point to the first point in the segment. This information can then be used along with the basis matrix to calculate the y value.

Member Data Documentation

template<typename X , typename Y >
Basis IECore::Spline< X, Y >::basis

The Spline is defined by a basis and a mapping from X to Y values defining control points for the spline. Both are public so they may be manipulated freely.


The documentation for this class was generated from the following file: