nmn::BasisFunction Class Reference

Basis function class for NURBS evaluation. More...

#include <basisfunction.h>

List of all members.

Public Member Functions

 BasisFunction ()
 Constructor.
 BasisFunction (const BasisFunction &basis_function)
 Copy constructor.
 ~BasisFunction ()
 Destructor.
BasisFunction operator= (const BasisFunction &basis_function)
 Assignment operator: copy of the basis function basis_function.
void setKnots (const std::vector< Float > &knots)
 Sets the knot vector.
void setDegree (const UnsignedInt &degree)
 Sets the degree of the basis function.
const std::vector< Float > & getKnots () const
 Returns the knot vector.
const UnsignedIntgetDegree () const
 Returns the degree of the basis function.
Float evaluate (const Float &parameter, const UnsignedInt &index) const
 Evaluates the basis function.
Float derive (const Float &parameter, const UnsignedInt &index) const
 Returns the derivative of the basis function.

Protected Member Functions

Polynomius evaluatePolynomius (const Float &parameter, const UnsignedInt &index) const
 Returns the basis function evaluation as polynomial representation.
Polynomius evaluatePolynomius (const Float &parameter, const UnsignedInt &index, const UnsignedInt &degree) const
 Returns the basis function evaluation as polynomial representation.

Protected Attributes

Cache< BasisFunction::Key,
Polynomius, BasisFunction
_cache
std::vector< Float_knots
UnsignedInt _degree

Friends

class Cache< Key, Polynomius, BasisFunction >

Classes

class  Key
 This class is for BasisFunction class private use only. More...


Detailed Description

Basis function class for NURBS evaluation.

This class represents the usual basis function definition for NURBS evaluation.


Constructor & Destructor Documentation

nmn::BasisFunction::BasisFunction (  ) 

Constructor.

Sets an empty knot vector and sets degree to 0.

nmn::BasisFunction::BasisFunction ( const BasisFunction basis_function  ) 

Copy constructor.

Parameters:
basis_function basis function to be copied.

nmn::BasisFunction::~BasisFunction (  ) 

Destructor.


Member Function Documentation

Float nmn::BasisFunction::derive ( const Float parameter,
const UnsignedInt index 
) const

Returns the derivative of the basis function.

Parameters:
parameter fixed parameter value for the basis function derivative evaluation.
index index value for the basis function derivative evaluation.
Returns the basis function derivative for the fixed parameter parameter and the index index.

Float nmn::BasisFunction::evaluate ( const Float parameter,
const UnsignedInt index 
) const

Evaluates the basis function.

Parameters:
parameter fixed parameter value for basis function evaluation.
index index value for basis function evaluation.
Returns the basis function evaluation for the fixed parameter parameter and the index index.

Polynomius nmn::BasisFunction::evaluatePolynomius ( const Float parameter,
const UnsignedInt index,
const UnsignedInt degree 
) const [protected]

Returns the basis function evaluation as polynomial representation.

This recursive method is the core for basis function evaluation as polynomial representation. Private use.

Polynomius nmn::BasisFunction::evaluatePolynomius ( const Float parameter,
const UnsignedInt index 
) const [protected]

Returns the basis function evaluation as polynomial representation.

Parameters:
parameter fixed parameter value for the basis function evaluation.
index index value for the basis function evaluation.
As the basis function is a polynomius, this method evaluates that polynomius in the parameter parameter and the index index. This polynomial representation of the basis function makes easy to caching e derivation for the basis function.

const UnsignedInt & nmn::BasisFunction::getDegree (  )  const

Returns the degree of the basis function.

const std::vector< Float > & nmn::BasisFunction::getKnots (  )  const

Returns the knot vector.

BasisFunction nmn::BasisFunction::operator= ( const BasisFunction basis_function  ) 

Assignment operator: copy of the basis function basis_function.

Parameters:
basis_function basis function to copy.

void nmn::BasisFunction::setDegree ( const UnsignedInt degree  ) 

Sets the degree of the basis function.

Parameters:
degree degree of the basis function.

void nmn::BasisFunction::setKnots ( const std::vector< Float > &  knots  ) 

Sets the knot vector.

Parameters:
knots knot vector.


Friends And Related Function Documentation

friend class Cache< Key, Polynomius, BasisFunction > [friend]


Member Data Documentation

Cache< BasisFunction::Key, Polynomius, BasisFunction > nmn::BasisFunction::_cache [mutable, protected]

UnsignedInt nmn::BasisFunction::_degree [protected]

std::vector< Float > nmn::BasisFunction::_knots [protected]


The documentation for this class was generated from the following files:
Generated on Sun Nov 18 21:29:38 2007 for nmnurbs by  doxygen 1.4.7