Main Page   Namespace List   Class Hierarchy   Compound List   File List   Header Files   Sources   Namespace Members   Compound Members   File Members  

curve Class Reference

A parametric curve. More...

#include <curve.h>

List of all members.


Public Members

 curve (void)
The only constructur for a curve.

virtual ~curve (void)
void shape ( const double t, vector< double > &s, vector< double > &dsdt ) const
The shape function of the curve. More...

vector<double> shape ( const double t ) const
The shape function of the curve. More...

void position ( const double t, vector2 &p, vector2 &dpdt ) const
Calculate the position of a point on the curve. More...

vector2 position ( const double t ) const
Calculate the position of a point on the curve. More...

vector< vector2 * > param
The parametric points for the curve. More...


Detailed Description

A parametric curve.

The curve has a set of points and a real number as parameters. The real number parameter represents the position along the curve.

Definition at line 43 of file curve.h.


Member Function Documentation

curve::curve (void)

The only constructur for a curve.

Definition at line 39 of file curve.cpp.

curve::~curve (void) [virtual]

Definition at line 46 of file curve.cpp.

void curve::shape (const double t, vector<double>& s, vector<double>& dsdt) const

The shape function of the curve.

The shape function is used to calculate the positions of points on the curve. The the position vector of a point on the curve is calculated by taking the weighted sum of the position vectors of the parametric points of the curve. These weights vary along the curve, and are called the shape function of the curve.

Parameters:
t   the parameter giving the position along the curve
Return values:
s   the weight factor for each of the parametric points
dsdt   the rate of change of the weight factor, w.r.t. t

Preconditions:
 assert( 2 <= this->param.size() );

Normally:
 0 <= t && t <= 1

Definition at line 77 of file curve.cpp.

vector<double> curve::shape (const double t) const

The shape function of the curve.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
t   the parameter giving the position along the curve
Returns:
the weight factor for each of the parametric points

Preconditions:
 assert( 2 <= this->param.size() );

Normally:
 0 <= t && t <= 1

Definition at line 53 of file curve.cpp.

void curve::position (const double t, vector2 & p, vector2 & dpdt) const

Calculate the position of a point on the curve.

Parameters:
t   the parameter giving the position along the curve
Return values:
p   the position of the point having parameter value t
dpdt   the gradient of the curve at that point

Preconditions:
 assert( 2 <= this->param.size() );
 assert( this->end );

Normally:
 0 <= t && t <= 1

Definition at line 304 of file curve.cpp.

vector2 curve::position (const double t) const

Calculate the position of a point on the curve.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
t   the parameter giving the position along the curve
Returns:
the position of the point having that parameter value

Preconditions:
 assert( 2 <= this->param.size() );

Normally:
 0 <= t && t <= 1

Definition at line 110 of file curve.cpp.


Member Data Documentation

vector< vector2 * > curve::param

The parametric points for the curve.

Never set an element to a null pointer.

Definition at line 160 of file curve.h.


The documentation for this class was generated from the following files:
Generated at Sun Jul 14 20:38:16 2002 for Mapper by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999