Go::HermiteGrid1D Class Reference
['geometry' - a spline library]

The type "GoHemiteGrid1D" holds a one dimensional grid containing sampled points and derivatives from a curve. More...

#include <HermiteGrid1D.h>

List of all members.

Public Member Functions

 HermiteGrid1D (const EvalCurve &crv, double start, double end)
 Construct a HermiteGrid1D from a curve and a given interval.
 HermiteGrid1D (const EvalCurve &crv, double param[], int n)
 Construct a HermiteGrid1D from a curve and a set of parameter values.
 ~HermiteGrid1D ()
 Default destructor.
int addKnot (const EvalCurve &crv, double knot)
 Add another sample (parameter, position, tangent) to the grid.
void getSegment (int left, int right, double &spar, double &epar, Point bezcoef[4])
 Calculate Bezier coefficients of the cubic curve interpolating the point and tangent values at grid nodes with indices "left" and "right".
std::vector< double > getKnots ()
 Return the grid parameters.
std::vector< PointgetData ()
 Return the sample values (positions and first derivatives).
int dim ()
 Return the spatial dimension.
int size ()
 Return the number of samples in the grid.


Detailed Description

The type "GoHemiteGrid1D" holds a one dimensional grid containing sampled points and derivatives from a curve.

It can be used to generate bezier curve segments obtained by Hermite interpolation of intervals between the sampled parameter values.

Definition at line 52 of file HermiteGrid1D.h.


Constructor & Destructor Documentation

Go::HermiteGrid1D::HermiteGrid1D ( const EvalCurve crv,
double  start,
double  end 
)

Construct a HermiteGrid1D from a curve and a given interval.

The grid will only contain the sampled values (position, derivative) for the first and last value of the interval.

Parameters:
crv curve to sample
start start of interval
end end of interval

Go::HermiteGrid1D::HermiteGrid1D ( const EvalCurve crv,
double  param[],
int  n 
)

Construct a HermiteGrid1D from a curve and a set of parameter values.

Parameters:
crv curve to sample
param array of strictly increasing parameters contained in the parameter domain of 'crv'.
n number of elements in 'param[]'.


Member Function Documentation

int Go::HermiteGrid1D::addKnot ( const EvalCurve crv,
double  knot 
)

Add another sample (parameter, position, tangent) to the grid.

Returns the index of the new knot (parameter value) in the sorted knot vector after insertion.

Parameters:
crv curve to evaluate
knot the new sample value (parameter value, knot)

void Go::HermiteGrid1D::getSegment ( int  left,
int  right,
double &  spar,
double &  epar,
Point  bezcoef[4] 
)

Calculate Bezier coefficients of the cubic curve interpolating the point and tangent values at grid nodes with indices "left" and "right".

Parameters:
left indicating grid node for start of curve segment
right indicating grid node for end of curve segment
spar start parameter of segment
epar end parameter of segment
bezcoef array of cubic Bezier coefficients


The documentation for this class was generated from the following file:
Generated on Mon Jun 11 14:48:18 2007 for GoTools Core Library by  doxygen 1.5.1