Mondschein Engine  0.3.0
Public Member Functions | List of all members
mondschein::math::NURBSpatch Class Reference

This class represents a NURBS patch. More...

#include <nurbspatch.h>

Public Member Functions

virtual Eigen::Vector3d operator() (float64 _t, float64 _u) const
 Interpolated patch point access operator. More...
 
virtual void set_degree (uint32 _d)
 Set the patch degree. More...
 
virtual uint32 get_degree () const
 Get the patch degree. More...
 
virtual void set_curves (const std::vector< NURBScurve_p > &_c)
 Set the interpolation curves. More...
 
virtual std::vector< NURBScurve_p > get_curves () const
 Get the interpolation curves. More...
 
virtual void calc_knots (bool _cl)
 Calculate the knot vector. More...
 
virtual Eigen::Vector3d get_point (float64 _t, float64 _u) const
 Get an interpolated patch point. More...
 

Detailed Description

This class represents a NURBS patch.

The NURBSpatch class contains the parametric representation of a NURBS patch. Since NURBS patches are the most generalized form of B-Spline patches it also covers any B-Spline patch available.
Any NURBS patch is defined by a set of n interpolation curves and its degree. Like the NURBS curve degree the NURBS surface degree defines how many curves influence the surface point.
The interpolation curves may vary from each other and from the patch structure.

Definition at line 43 of file nurbspatch.h.

Member Function Documentation

void NURBSpatch::calc_knots ( bool  _cl)
virtual

Calculate the knot vector.

Parameters
_clif TRUE the knot vector is calculated in chord length, uniform length otherwise
Exceptions
mondschein::exceptionfirst known exception called during knot vector calculation

NOTE: The knot vector must always be recalculated after changing the patch degree or interpolation curves. Otherwise the interpolation may be incorrect.

Definition at line 175 of file nurbspatch.cpp.

std::vector< NURBScurve_p > NURBSpatch::get_curves ( ) const
virtual

Get the interpolation curves.

Returns
the interpolation curves of *this

Definition at line 170 of file nurbspatch.cpp.

uint32 NURBSpatch::get_degree ( ) const
virtual

Get the patch degree.

Returns
the patch degree value

Definition at line 159 of file nurbspatch.cpp.

Eigen::Vector3d NURBSpatch::get_point ( float64  _t,
float64  _u 
) const
virtual

Get an interpolated patch point.

Parameters
_tthe location between [0,1] of the interpolated point in X direction
_uthe location between [0,1] of the interpolated point in Y direction
Returns
the interpolated patch point vector
Exceptions
mondschein::exceptionif a known exception is thrown during execution

Definition at line 192 of file nurbspatch.cpp.

Eigen::Vector3d NURBSpatch::operator() ( float64  _t,
float64  _u 
) const
virtual

Interpolated patch point access operator.

Parameters
_tthe location between [0,1] of the interpolated point in X direction
_uthe location between [0,1] of the interpolated point in Y direction
Returns
the interpolated patch point vector
Exceptions
mondschein::exceptionif a known exception is thrown during execution

Definition at line 137 of file nurbspatch.cpp.

void NURBSpatch::set_curves ( const std::vector< NURBScurve_p > &  _c)
virtual

Set the interpolation curves.

Parameters
_pthe interpolation curves
Exceptions
mondschein::exceptionif _p.size() <= patch degree

NOTE: If the knot vector is not recalculated after changing the interpolation curves the interpolation may be incorrect.

Definition at line 164 of file nurbspatch.cpp.

void NURBSpatch::set_degree ( uint32  _d)
virtual

Set the patch degree.

Parameters
_dthe patch degree
Exceptions
mondschein::exceptionif _d is not smaller than the number of interpolation curves

NOTE: If the knot vector is not recalculated after changing the patch degree the interpolation may be incorrect.

Definition at line 152 of file nurbspatch.cpp.


The documentation for this class was generated from the following files: