#include <curve.h>
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... | |
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.
| curve::curve (void) |
curve::~curve (void) [virtual]
|
| 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.
| t | the parameter giving the position along the curve |
| s | the weight factor for each of the parametric points |
| dsdt |
the rate of change of the weight factor, w.r.t. t
|
assert( 2 <= this->param.size() );
0 <= t && t <= 1
| 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.
| t | the parameter giving the position along the curve |
assert( 2 <= this->param.size() );
0 <= t && t <= 1
| void curve::position (const double t, vector2 & p, vector2 & dpdt) const |
Calculate the position of a point on the curve.
| t | the parameter giving the position along the curve |
| p | the position of the point having parameter value t |
| dpdt |
the gradient of the curve at that point
|
assert( 2 <= this->param.size() ); assert( this->end );
0 <= t && t <= 1
| 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.
| t | the parameter giving the position along the curve |
assert( 2 <= this->param.size() );
0 <= t && t <= 1
| vector< vector2 * > curve::param |
The parametric points for the curve.
Never set an element to a null pointer.
1.0.0 written by Dimitri van Heesch,
© 1997-1999