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

The type "GoHemiteGrid1DMulti" holds a one dimensional grid containing sampled points and derivatives from a set of curves, as represented by a EvalCurveSet. More...

#include <HermiteGrid1DMulti.h>

List of all members.

Public Member Functions

 HermiteGrid1DMulti (EvalCurveSet &surf, double start, double end, std::vector< int > dims)
 Construct a HermiteGrid1DMulti from a set of related curves (represented by a EvalCurveSet) and a given interval.
 HermiteGrid1DMulti (EvalCurveSet &surf, double param[], int n, std::vector< int > dims)
 Construct a HermiteGrid1DMulti from a set of related curves (represented by a EvalCurveSet) and a set of parameter values.
 ~HermiteGrid1DMulti ()
 Default destructor.
int addKnot (EvalCurveSet &surf, double knot)
 Add another sample (parameter, positions, tangents) to the grid.
void getSegment (int left, int right, double &spar, double &epar, std::vector< std::vector< Point > > &bezcoef)
 Calculate Bezier coefficients of the cubic curves interpolating the points and tangents at the grid nodes with indices 'left' and 'right'.
std::vector< double > getKnots ()
 Return the grid parameters.
std::vector< std::vector<
Point > > 
getData ()
 Return the sample values (positions and first derivatives).
int dims (int ki)
 Return the spatial dimension of each of the curves.
int size ()
 Return the number of samples in the grid.


Detailed Description

The type "GoHemiteGrid1DMulti" holds a one dimensional grid containing sampled points and derivatives from a set of curves, as represented by a EvalCurveSet.

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 HermiteGrid1DMulti.h.


Constructor & Destructor Documentation

Go::HermiteGrid1DMulti::HermiteGrid1DMulti ( EvalCurveSet surf,
double  start,
double  end,
std::vector< int >  dims 
)

Construct a HermiteGrid1DMulti from a set of related curves (represented by a EvalCurveSet) and a given interval.

Parameters:
surf the curve collection to sample from
start start of parameter interval
end end of parameter interval
dims vector that specifies the dimensions of the curves contained in the EvalCurveSet. The size of the vector should be equal to the total number of curves in 'surf', ie. the return value of its EvalCurveSet::nmbCvs() function.

Go::HermiteGrid1DMulti::HermiteGrid1DMulti ( EvalCurveSet surf,
double  param[],
int  n,
std::vector< int >  dims 
)

Construct a HermiteGrid1DMulti from a set of related curves (represented by a EvalCurveSet) and a set of parameter values.

Parameters:
surf the curve collection to sample from
param array of strictly increasing parameters contained in the parameter domain of 'surf'.
n number of elements in 'param[]'
dims vector that specifies the dimensions of the curves contained in the EvalCurveSet. The size of the vector should be equal to the total number of curves in 'surf', ie. the return value of its EvalCurveSet::nmbCvs() function.


Member Function Documentation

int Go::HermiteGrid1DMulti::addKnot ( EvalCurveSet surf,
double  knot 
)

Add another sample (parameter, positions, tangents) to the grid.

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

Parameters:
surf the curve collection to sample from
knot the new sample value (parameter value, knot)

void Go::HermiteGrid1DMulti::getSegment ( int  left,
int  right,
double &  spar,
double &  epar,
std::vector< std::vector< Point > > &  bezcoef 
)

Calculate Bezier coefficients of the cubic curves interpolating the points and tangents at the 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 a vector containing arrays of cubic Bezier coefficients. There are as many vector entries as there are curves, and each entry contains the Bezier coefficients for that curve.


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