Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxLocalInterpol Class Reference

Class definition of a functor that interpolates data points to compute knots and control points for a cubic BSpline. More...

#include <HxLocalInterpol.h>

List of all members.

Public Methods

 HxLocalInterpol ()
 Default ctor: consistent but useless object. More...

 HxLocalInterpol (int degree, const HxPointSetR2 &inputData, int closed=0)
 Create and initialize functor with given data points and curve type. More...

 ~HxLocalInterpol ()
 Destructor. More...

HxPointSetR2 allP () const
 Get all generated control points. More...

int numP () const
 The number of control points. More...

vector< double > allKnots () const
 Get generated knots vector. More...

int numKnots () const
 The number of knots. More...

STD_OSTREAM & dump (ostream &) const


Detailed Description

Class definition of a functor that interpolates data points to compute knots and control points for a cubic BSpline.

Based on section 9.3.4 of "The NURBS book", "PIEGL, L. and TILLER, W.", Springer, 1997.

This could be used as a HxBSplineCurve constructor, but that would require a more general version.


Constructor & Destructor Documentation

HxLocalInterpol::HxLocalInterpol  
 

Default ctor: consistent but useless object.

00019 {
00020     makeDefault();
00021 }

HxLocalInterpol::HxLocalInterpol int    degree,
const HxPointSetR2 &    p,
int    closed = 0
 

Create and initialize functor with given data points and curve type.

00025 {
00026     if ( degree != 3 ) {
00027         message("(constructor) not cubic - setting degree=3");
00028         degree =3;
00029     }
00030 
00031     if ( p.size() <= 0 ) {
00032         message("(constructor) no data points - making default");
00033         makeDefault();
00034         return;
00035     }
00036 
00037     _degree = degree;
00038     _data = p;
00039     _closed = closed;
00040 
00041     _n = _data.size() -1;
00042     if ( _closed )
00043         _initClosed();
00044     else
00045         _initOpen();
00046 }

HxLocalInterpol::~HxLocalInterpol  
 

Destructor.

00049 {
00050 }


Member Function Documentation

HxPointSetR2 HxLocalInterpol::allP   const [inline]
 

Get all generated control points.

00099 {
00100     return _points;
00101 }

int HxLocalInterpol::numP   const [inline]
 

The number of control points.

00105 {
00106     return _points.size();
00107 }

vector< double > HxLocalInterpol::allKnots   const [inline]
 

Get generated knots vector.

00111 {
00112     return _knots;
00113 }

int HxLocalInterpol::numKnots   const [inline]
 

The number of knots.

00117 {
00118     return _knots.size();
00119 }


The documentation for this class was generated from the following files:
Generated on Tue Feb 3 14:19:05 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001