Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | Namespace Members | Class Members | Related Pages

Curve Class Template Reference
[XEngineMath Library]

List of all members.

Detailed Description

template<unsigned int Dimension>
class XEngine::Math::Curves::Curve< Dimension >

This class is the abstract base class for all curves. A curve is a function with time t as the independent variable defined on an interval [t_min, t_max]. All time values used to evaluate e.g. the position of the curve must be in the range [t_min, t_max]. Note that the interval includes the boundaries.


Public Types

typedef GetVectorType< Dimension
>::type 
Vector
 The vector type used by this curve, can be Vector2, Vector3, or Vector4.

Public Member Functions

virtual ~Curve ()
 Destructor.
real GetMinTime () const
 Returns the minimum time parameter of this curve.
real GetMaxTime () const
 Returns the maximum time parameter of this curve.
real GetTotalArcLength () const
 Returns the total arc length of this curve.
real GetArcLengthBetween (real fromTime, real toTime) const
 Returns the arc length in between the two given time parameters.
real GetArcLengthFromTime (real time) const
 Returns the arc length parameter corresponding to the given time parameter.
real GetTimeFromArcLength (real arcLength) const
 Returns the time parameter corresponding to the given arc length parameter.
real GetSpeed (real time) const
 Returns the speed (= length of the tangent) of the curve at the given time.
Vector GetPosition (real time) const
 Returns the position of the curve at the given time.
Vector GetDerivative1 (real time) const
 Returns the first derivative at the given time.
Vector GetDerivative2 (real time) const
 Returns the second derivative at the given time.
Vector GetDerivative3 (real time) const
 Returns the third derivative at the given time.
Vector GetTangent (real time) const
 Returns the normalized tangent vector at the given time.
template<typename OutputIteratorT>
void SubdivideByTime (size_t pointCount, OutputIteratorT it) const
 Subdivides the curve by uniformly sampling the time parameter space [t_min, t_max].
template<typename OutputIteratorT>
void SubdivideByArcLength (size_t pointCount, OutputIteratorT it) const
 Subdivides the curve by uniformly sampling the arc length parameter space.


Constructor & Destructor Documentation

~Curve  )  [virtual]
 

Virtual destructor.


Member Function Documentation

real GetArcLengthBetween real  fromTime,
real  toTime
const
 

Returns the arc length in between the two given time parameter values.

real GetArcLengthFromTime real  time  )  const
 

Returns the arc length parameter corresponding to the given time parameter. This simply returns the arc length in between the minimum time parameter value of this curve and the given time value.

Curve< Dimension >::Vector GetDerivative1 real  time  )  const
 

Returns the first derivative at the given time.

Curve< Dimension >::Vector GetDerivative2 real  time  )  const
 

Returns the second derivative at the given time.

Curve< Dimension >::Vector GetDerivative3 real  time  )  const
 

Returns the third derivative at the given time.

real GetMaxTime  )  const
 

Returns the maximum time parameter of this curve.

real GetMinTime  )  const
 

Returns the minimum time parameter of this curve.

Curve< Dimension >::Vector GetPosition real  time  )  const
 

Returns the position of the curve at the given time.

real GetSpeed real  time  )  const
 

Returns the speed of the curve at the given time. The speed of a curve at a time t is defined as the length of the first derivative (= tangent vector) of the curve at time t.

Curve< Dimension >::Vector GetTangent real  time  )  const
 

Returns the normalized tangent vector at the given time. The tangent vector of the curve at a time t is simply the first derivative at t.

real GetTimeFromArcLength real  arcLength  )  const
 

Returns the time parameter corresponding to the given arc length parameter.

real GetTotalArcLength  )  const
 

Returns the total arc length of this curve.

void SubdivideByArcLength size_t  pointCount,
OutputIteratorT  it
const
 

Subdivides the curve by uniformly sampling the arc length parameter space. The points resulting from the subdivision are returned via the given output iterator. The given point count must at least be 2 which results in a straight line from the curve's start point to the curve's end point.

void SubdivideByTime size_t  pointCount,
OutputIteratorT  it
const
 

Subdivides the curve by uniformly sampling the time parameter space [minTime, maxTime]. The points resulting from the subdivision are returned via the given output iterator. The given point count must at least be 2 which results in a straight line from the curve's start point to the curve's end point.


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