nmn::NurbsCore< Coordinates, _parameter_count > Class Template Reference

Core for NURBS object evaluation. More...

#include <nurbscore.h>

Inherited by nmn::Nurbs< Coordinates, _parameter_count >.

Inheritance diagram for nmn::NurbsCore< Coordinates, _parameter_count >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 NurbsCore ()
 Constructor.
virtual ~NurbsCore ()
 Destructor.
const UnsignedIntgetParameterCount () const
 Returns the number of parameters for the NURBS Object.
const Matrix< Coordinates,
_parameter_count > & 
getControlPoints () const
 Returns the n-dimensional matrix of control points.
const std::vector< BasisFunction > & getBasisFunctions () const
 Returns a vector of all the basis function of the NURBS object.
const BasisFunctiongetBasisFunction (const UnsignedInt &parameter_index) const
 Returns the i-th basis function of the NURBS object.
void setControlPoints (const Matrix< Coordinates, _parameter_count > &new_control_points)
 Sets the matrix of control points for the NURBS object.
void setBasisFunctions (const std::vector< BasisFunction > &new_basis_functions)
 Sets all the basis function for the NURBS object.
void setBasisFunction (const UnsignedInt &parameter_index, const BasisFunction &new_basis_function)
 Sets the i-th basis function.
Coordinates evaluate (const Float *parameters)
 Evaluates the NURBS object for fixed parameters' values.
Coordinates derive (const Float *parameters, const UnsignedInt &parameter_index)
 Evaluates the partial derivative of the NURBS object for fixed parameters' values respect to the i-th parameter.

Protected Member Functions

virtual Coordinates evaluateCurve (const Float &parameter, const BasisFunction &basis_function, const std::vector< Coordinates > &control_points)
 not yet documented
virtual Coordinates deriveCurve (const Float &parameter, const BasisFunction &basis_function, const std::vector< Coordinates > &control_points)
 not yet documented

Protected Attributes

Matrix< Coordinates, _parameter_count > _control_points
std::vector< BasisFunction_basis_functions

Classes

struct  Derivator
struct  Derivator< Owner, 1 >
struct  Evaluator
struct  Evaluator< Owner, 1 >

Detailed Description

template<typename Coordinates, UnsignedInt _parameter_count = 0>
class nmn::NurbsCore< Coordinates, _parameter_count >

Core for NURBS object evaluation.

Parameters:
Coordinates data type for control points coordinates.
_parameter_count number of parameter for the NURBS object.
This class is the core for NURBS object evaluation. The template parameter Coordinates is the data type for control points and must be an STL container, tipically a vector, having the operators operator[ const UnsignedInt& ], operator= .


Constructor & Destructor Documentation

template<typename Coordinates, UnsignedInt _parameter_count>
nmn::NurbsCore< Coordinates, _parameter_count >::NurbsCore (  ) 

Constructor.

template<typename Coordinates, UnsignedInt _parameter_count>
nmn::NurbsCore< Coordinates, _parameter_count >::~NurbsCore (  )  [virtual]

Destructor.


Member Function Documentation

template<typename Coordinates, UnsignedInt _parameter_count>
Coordinates nmn::NurbsCore< Coordinates, _parameter_count >::derive ( const Float parameters,
const UnsignedInt parameter_index 
)

Evaluates the partial derivative of the NURBS object for fixed parameters' values respect to the i-th parameter.

Parameters:
parameters fixed values of parameters for NURBS object derivative evaluation.
parameter_index i-th parameter
Evaluates the partial derivative in a point repsect to the i-th parameter of the NURBS object by the parameters parameters and returns it. The parameters parameters must be stored in a C-style vector with size _parameter_count.

template<typename Coordinates, UnsignedInt _parameter_count>
Coordinates nmn::NurbsCore< Coordinates, _parameter_count >::deriveCurve ( const Float parameter,
const BasisFunction basis_function,
const std::vector< Coordinates > &  control_points 
) [protected, virtual]

not yet documented

template<typename Coordinates, UnsignedInt _parameter_count>
Coordinates nmn::NurbsCore< Coordinates, _parameter_count >::evaluate ( const Float parameters  ) 

Evaluates the NURBS object for fixed parameters' values.

Parameters:
parameters fixed values of parameters for NURBS object evaluation.
Evaluates a point of the NURBS object by the parameters parameters and returns it. The parameters parameters must be stored in a C-style vector with size _parameter_count.

template<typename Coordinates, UnsignedInt _parameter_count>
Coordinates nmn::NurbsCore< Coordinates, _parameter_count >::evaluateCurve ( const Float parameter,
const BasisFunction basis_function,
const std::vector< Coordinates > &  control_points 
) [protected, virtual]

not yet documented

template<typename Coordinates, UnsignedInt _parameter_count>
const BasisFunction & nmn::NurbsCore< Coordinates, _parameter_count >::getBasisFunction ( const UnsignedInt parameter_index  )  const

Returns the i-th basis function of the NURBS object.

Parameters:
parameter_index index of the basis function relative to the i-th parameter.
Since there is a basis function associated to each parameter of the NURBS object, the parameter index parameter_index identify also the index for the vector of basis functions. The number of the basis function is equal to the number of the NURBS object's parameters.

template<typename Coordinates, UnsignedInt _parameter_count>
const std::vector< BasisFunction > & nmn::NurbsCore< Coordinates, _parameter_count >::getBasisFunctions (  )  const

Returns a vector of all the basis function of the NURBS object.

The number of the basis functions is equal to the number of the NURBS object's parameters.

template<typename Coordinates, UnsignedInt _parameter_count>
const Matrix< Coordinates, _parameter_count > & nmn::NurbsCore< Coordinates, _parameter_count >::getControlPoints (  )  const

Returns the n-dimensional matrix of control points.

The matrix' dimension count is equal to the number of the NURBS object's parameters.

template<typename Coordinates, UnsignedInt _parameter_count>
const UnsignedInt & nmn::NurbsCore< Coordinates, _parameter_count >::getParameterCount (  )  const

Returns the number of parameters for the NURBS Object.

template<typename Coordinates, UnsignedInt _parameter_count>
void nmn::NurbsCore< Coordinates, _parameter_count >::setBasisFunction ( const UnsignedInt parameter_index,
const BasisFunction new_basis_function 
)

Sets the i-th basis function.

Parameters:
parameter_index index of the basis function relative to the i-th parameter.
new_basis_function new basis function.
Since there is a basis function associated to each parameter of the NURBS object, the parameter index parameter_index identify also the index for the vector of basis functions. So this method replaces the i-th old basis function by the new basis function new_basis_function.

template<typename Coordinates, UnsignedInt _parameter_count>
void nmn::NurbsCore< Coordinates, _parameter_count >::setBasisFunctions ( const std::vector< BasisFunction > &  new_basis_functions  ) 

Sets all the basis function for the NURBS object.

Parameters:
new_basis_functions new basis functions vector
The new basis functions new_basis_functions replace the old ones.

template<typename Coordinates, UnsignedInt _parameter_count>
void nmn::NurbsCore< Coordinates, _parameter_count >::setControlPoints ( const Matrix< Coordinates, _parameter_count > &  new_control_points  ) 

Sets the matrix of control points for the NURBS object.

Parameters:
new_control_points new matrix of control points.
The new control points new_control_points replace the old ones. The matrix' dimension count is equal to the number of the NURBS object's parameters.


Member Data Documentation

template<typename Coordinates, UnsignedInt _parameter_count = 0>
std::vector< BasisFunction > nmn::NurbsCore< Coordinates, _parameter_count >::_basis_functions [protected]

template<typename Coordinates, UnsignedInt _parameter_count = 0>
Matrix< Coordinates, _parameter_count > nmn::NurbsCore< Coordinates, _parameter_count >::_control_points [protected]


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