|
Developer Documentation
|
#include <ObjectTypes/BSplineSurface/BSplineSurfaceT.hh>
Public Types | |
| typedef PointT | Point |
| typedef Point::value_type | Scalar |
| typedef std::vector< std::vector< Point > > | ControlNet |
| typedef std::vector< std::vector< unsigned char > > | PropertyNet |
Public Member Functions | |
| BSplineSurfaceT (unsigned int _degm=3, unsigned int _degn=3) | |
| Constructor. | |
| void | resize (unsigned int _m, unsigned int _n) |
| Resizes the spline struct. | |
| std::vector< Scalar > & | get_knots_m () |
| get the knotvector in m direction of the bspline surface | |
| std::vector< Scalar > & | get_knots_n () |
| get the knotvector in m direction of the bspline surface | |
| Knotvector | get_knotvector_m () |
| Get the knotvector in m direction. | |
| Knotvector | get_knotvector_n () |
| Get the knotvector in n direction. | |
| Knotvector * | get_knotvector_m_ref () |
| Get a reference to the knotvector in m direction. | |
| Knotvector * | get_knotvector_n_ref () |
| Get a reference to the knotvector in n direction. | |
| Scalar | get_knot_m (int _i) |
| Get knot i in m direction. | |
| Scalar | get_knot_n (int _i) |
| Get knot i in n direction. | |
| void | set_knots_m (std::vector< Scalar > _knots) |
| Set the knotvector of the bspline surface in m direction. | |
| void | set_knots_n (std::vector< Scalar > _knots) |
| Set the knotvector of the bspline surface in n direction. | |
| void | insert_knot_m (double _t) |
| Insert a knot i in m direction without changing the surface. | |
| void | insert_knot_n (double _t) |
| Insert a knot i in n direction without changing the surface. | |
| void | createKnots () |
| Creates interpolating knotvectors 0...0, 1, 2, ..., n...n. | |
| void | set_degree (unsigned int _degm, unsigned int _degn) |
| Sets the degree of the spline surface. | |
| int | degree_m () const |
| Returns the spline degree in m direction. | |
| int | degree_n () const |
| Returns the spline degree in n direction. | |
| unsigned int | n_control_points_m () const |
| Returns the number of controlpoints in m direction. | |
| unsigned int | n_control_points_n () const |
| Returns the number of controlpoints in n direction. | |
| unsigned int | n_knots_m () |
| Returns the number of knots in m direction. | |
| unsigned int | n_knots_n () |
| Returns the number of knots in n direction. | |
| void | reset_control_net () |
| Clears the control net. | |
| Point & | get_control_point (unsigned int _m, unsigned int _n) |
| Returns a reference to the control point (m, n) | |
| Point & | operator() (unsigned int _m, unsigned int _n) |
| Returns a reference to the control point (m, n) | |
| const Point & | operator() (unsigned int _m, unsigned int _n) const |
| Returns a const reference to the control point (m, n) | |
| Point & | operator() (Vec2i _param) |
| Returns a reference to the control point (m, n) | |
| const Point & | operator() (Vec2i _param) const |
| Returns a const reference to the control point (m, n) | |
| void | get_vector_m (std::vector< Point > &_control_polygon, unsigned int _m) |
| Returns an n control point vector. | |
| void | get_vector_n (std::vector< Point > &_control_polygon, unsigned int _n) |
| Returns an m ctrPointVector. | |
| void | add_vector_m (const std::vector< Point > &_control_polygon) |
| Adds a control point n-vector. | |
| void | add_vector_n (const std::vector< Point > &_control_polygon) |
| Adds a control point m-vector. | |
| void | insert_vector_m (const std::vector< Point > &_control_polygon, unsigned int _m) |
| Inserts an n control point vector. | |
| void | insert_vector_n (const std::vector< Point > &_control_polygon, unsigned int _n) |
| Inserts an m control point vector. | |
| void | delete_vector_m (unsigned int _m) |
| Deletes an n control point vector. | |
| void | delete_vector_n (unsigned int _n) |
| Deletes an m control point vector. | |
| Point | surfacePoint (double _u, double _v) |
| Evaluates a spline surface at parameters _u and _v. | |
| void | surfacePointNormal (Point &_pt, Point &_normal, double _u, double _v) |
| Evaluates a spline surface at parameters _u and _v. | |
| Point | surfacePoint_rec (double _u, double _v) |
| Evaluates a spline surface at parameters _u and _v. | |
| Point | derivativeSurfacePoint (double _u, double _v, int _derm, int _dern) |
| Returns the _derm'th derivative of a spline surface. | |
| Point | normalSurfacePoint (double _u, double _v) |
| Returns the normal of a spline surface. | |
| Scalar | basisFunction (Knotvector &_knotvector, int _i, int _n, double _t) |
| A Spline Basis Function. | |
| Scalar | derivativeBasisFunction (Knotvector &_knotvector, int _i, int _n, double _t, int _der) |
| Derivative of a Spline Basis Function. | |
| ACG::Vec2i | spanm (double _t) |
| Returns the basis functions which are unequal to zero at parameter u. | |
| ACG::Vec2i | spann (double _t) |
| Returns the basis functions which are unequal to zero at parameter v. | |
| ACG::Vec2i | interval_m (double _t) |
| Returns the index of the knots u and u+1 such that t in [u, u+1) | |
| ACG::Vec2i | interval_n (double _t) |
| Returns the index of the knots v and v+1 such that t in [v, v+1) | |
| Scalar | loweru () |
| Returns the lower u parameter. | |
| Scalar | upperu () |
| Returns the upper u parameter. | |
| Scalar | lowerv () |
| Returns the lower v parameter. | |
| Scalar | upperv () |
| Returns the upper v parameter. | |
| void | request_controlpoint_selections () |
| request control point selection property | |
| void | request_edge_selections () |
| request edge selection property | |
| void | release_controlpoint_selections () |
| release control point selection property | |
| void | release_edge_selections () |
| release edge selection property | |
| bool | controlpoint_selections_available () const |
| Check if control point selection property is available. | |
| bool | edge_selections_available () const |
| Check if edge selection property is available. | |
| unsigned char & | controlpoint_selection (unsigned int _i, unsigned int _j) |
| const unsigned char & | controlpoint_selection (unsigned int _i, unsigned int _j) const |
| unsigned char & | edge_selection (unsigned int _i, unsigned int _j) |
| const unsigned char & | edge_selection (unsigned int _i, unsigned int _j) const |
| void | select_controlpoint (unsigned int _iIdx, unsigned int _jIdx) |
| void | deselect_controlpoint (unsigned int _iIdx, unsigned int _jIdx) |
| bool | controlpoint_selected (unsigned int _iIdx, unsigned int _jIdx) const |
Private Member Functions | |
| template<class PropT > | |
| void | request_prop (unsigned int &_ref_count, PropT &_prop) |
| template<class PropT > | |
| void | release_prop (unsigned int &_ref_count, PropT &_prop) |
Private Attributes | |
| unsigned int | dimm_ |
| number of control points in m direction | |
| unsigned int | dimn_ |
| number of control points in n direction | |
| unsigned int | degree_m_ |
| Spline degree in m direction. | |
| unsigned int | degree_n_ |
| Spline degree in n direction. | |
| Knotvector | knotvector_m_ |
| Knotvector in m direction. | |
| Knotvector | knotvector_n_ |
| Knotvector in n direction. | |
| ControlNet | control_net_ |
| PropertyNet | cpselections_ |
| list of control point properties | |
| PropertyNet | eselections_ |
| list of edge properties | |
| unsigned int | ref_count_cpselections_ |
| unsigned int | ref_count_eselections_ |
Brief Description.
A more elaborate description follows.
Definition at line 82 of file BSplineSurfaceT.hh.
| typedef std::vector< std::vector< Point > > ACG::BSplineSurfaceT< PointT >::ControlNet |
Definition at line 89 of file BSplineSurfaceT.hh.
| typedef PointT ACG::BSplineSurfaceT< PointT >::Point |
Definition at line 87 of file BSplineSurfaceT.hh.
| typedef std::vector< std::vector< unsigned char > > ACG::BSplineSurfaceT< PointT >::PropertyNet |
Definition at line 90 of file BSplineSurfaceT.hh.
| typedef Point::value_type ACG::BSplineSurfaceT< PointT >::Scalar |
Definition at line 88 of file BSplineSurfaceT.hh.
|
explicit |
Constructor.
| _degm | Degree in m direction |
| _degn | Degree in n direction |
Definition at line 74 of file BSplineSurfaceT_impl.hh.
| void ACG::BSplineSurfaceT< PointT >::add_vector_m | ( | const std::vector< Point > & | _control_polygon | ) |
Adds a control point n-vector.
| _control_polygon | Additional control point vector |
Definition at line 186 of file BSplineSurfaceT_impl.hh.
| void ACG::BSplineSurfaceT< PointT >::add_vector_n | ( | const std::vector< Point > & | _control_polygon | ) |
Adds a control point m-vector.
| _control_polygon | Additional control point vector |
Definition at line 196 of file BSplineSurfaceT_impl.hh.
| BSplineSurfaceT< PointT >::Scalar ACG::BSplineSurfaceT< PointT >::basisFunction | ( | Knotvector & | _knotvector, |
| int | _i, | ||
| int | _n, | ||
| double | _t | ||
| ) |
A Spline Basis Function.
| _knotvector | the knotvector |
| _i | the i'th basis function |
| _n | the spline degree |
| _t | the parameter Returns N_i^p(_u) |
Definition at line 603 of file BSplineSurfaceT_impl.hh.
|
inline |
Definition at line 444 of file BSplineSurfaceT.hh.
|
inline |
Definition at line 420 of file BSplineSurfaceT.hh.
|
inline |
Definition at line 421 of file BSplineSurfaceT.hh.
|
inline |
Check if control point selection property is available.
Definition at line 414 of file BSplineSurfaceT.hh.
| void ACG::BSplineSurfaceT< PointT >::createKnots | ( | ) |
Creates interpolating knotvectors 0...0, 1, 2, ..., n...n.
Definition at line 164 of file BSplineSurfaceT_impl.hh.
|
inline |
Returns the spline degree in m direction.
Definition at line 172 of file BSplineSurfaceT.hh.
|
inline |
Returns the spline degree in n direction.
Definition at line 174 of file BSplineSurfaceT.hh.
| void ACG::BSplineSurfaceT< PointT >::delete_vector_m | ( | unsigned int | _m | ) |
Deletes an n control point vector.
| _m | the m'th pointvector |
Definition at line 274 of file BSplineSurfaceT_impl.hh.
| void ACG::BSplineSurfaceT< PointT >::delete_vector_n | ( | unsigned int | _n | ) |
Deletes an m control point vector.
| _n | the n'th pointvector |
Definition at line 301 of file BSplineSurfaceT_impl.hh.
| BSplineSurfaceT< PointT >::Scalar ACG::BSplineSurfaceT< PointT >::derivativeBasisFunction | ( | Knotvector & | _knotvector, |
| int | _i, | ||
| int | _n, | ||
| double | _t, | ||
| int | _der | ||
| ) |
Derivative of a Spline Basis Function.
| _knotvector | the knotvector |
| _i | the i'th basis function |
| _n | the spline degree |
| _t | the parameter |
| _der | the _der'th derivative |
Definition at line 691 of file BSplineSurfaceT_impl.hh.
| PointT ACG::BSplineSurfaceT< PointT >::derivativeSurfacePoint | ( | double | _u, |
| double | _v, | ||
| int | _derm, | ||
| int | _dern | ||
| ) |
Returns the _derm'th derivative of a spline surface.
| _u | the parameter in u direction |
| _v | the parameter in v direction |
| _derm | the _derm'th derivative in m |
| _dern | the _dern'th derivative in n |
Definition at line 641 of file BSplineSurfaceT_impl.hh.
|
inline |
Definition at line 442 of file BSplineSurfaceT.hh.
|
inline |
Definition at line 426 of file BSplineSurfaceT.hh.
|
inline |
Definition at line 427 of file BSplineSurfaceT.hh.
|
inline |
Check if edge selection property is available.
Definition at line 416 of file BSplineSurfaceT.hh.
|
inline |
Returns a reference to the control point (m, n)
| _m,_n | the control point index |
Definition at line 193 of file BSplineSurfaceT.hh.
|
inline |
Get knot i in m direction.
| _i | Knot index |
Definition at line 127 of file BSplineSurfaceT.hh.
|
inline |
Get knot i in n direction.
| _i | Knot index |
Definition at line 134 of file BSplineSurfaceT.hh.
|
inline |
get the knotvector in m direction of the bspline surface
Definition at line 108 of file BSplineSurfaceT.hh.
|
inline |
get the knotvector in m direction of the bspline surface
Definition at line 110 of file BSplineSurfaceT.hh.
|
inline |
Get the knotvector in m direction.
Definition at line 113 of file BSplineSurfaceT.hh.
|
inline |
Get a reference to the knotvector in m direction.
Definition at line 118 of file BSplineSurfaceT.hh.
|
inline |
Get the knotvector in n direction.
Definition at line 115 of file BSplineSurfaceT.hh.
|
inline |
Get a reference to the knotvector in n direction.
Definition at line 120 of file BSplineSurfaceT.hh.
| void ACG::BSplineSurfaceT< PointT >::get_vector_m | ( | std::vector< Point > & | _control_polygon, |
| unsigned int | _m | ||
| ) |
Returns an n control point vector.
| _m | the m'th pointvector |
| _control_polygon | the returned pointvector |
Definition at line 332 of file BSplineSurfaceT_impl.hh.
| void ACG::BSplineSurfaceT< PointT >::get_vector_n | ( | std::vector< Point > & | _control_polygon, |
| unsigned int | _n | ||
| ) |
Returns an m ctrPointVector.
| _n | the n'th pointvector |
| _control_polygon | the returned pointvector |
Definition at line 343 of file BSplineSurfaceT_impl.hh.
| void ACG::BSplineSurfaceT< PointT >::insert_knot_m | ( | double | _t | ) |
Insert a knot i in m direction without changing the surface.
| _t | Parameter value |
Definition at line 379 of file BSplineSurfaceT_impl.hh.
| void ACG::BSplineSurfaceT< PointT >::insert_knot_n | ( | double | _t | ) |
Insert a knot i in n direction without changing the surface.
| _t | Parameter value |
Definition at line 423 of file BSplineSurfaceT_impl.hh.
| void ACG::BSplineSurfaceT< PointT >::insert_vector_m | ( | const std::vector< Point > & | _control_polygon, |
| unsigned int | _m | ||
| ) |
Inserts an n control point vector.
| _m | the position in m direction |
| _control_polygon | the pointvector to be inserted |
Definition at line 206 of file BSplineSurfaceT_impl.hh.
| void ACG::BSplineSurfaceT< PointT >::insert_vector_n | ( | const std::vector< Point > & | _control_polygon, |
| unsigned int | _n | ||
| ) |
Inserts an m control point vector.
| _n | the position in n direction |
| _control_polygon | the pointvector to be inserted |
Definition at line 239 of file BSplineSurfaceT_impl.hh.
| ACG::Vec2i ACG::BSplineSurfaceT< PointT >::interval_m | ( | double | _t | ) |
Returns the index of the knots u and u+1 such that t in [u, u+1)
| _t | the parameter |
Definition at line 776 of file BSplineSurfaceT_impl.hh.
| ACG::Vec2i ACG::BSplineSurfaceT< PointT >::interval_n | ( | double | _t | ) |
Returns the index of the knots v and v+1 such that t in [v, v+1)
| _t | the parameter |
Definition at line 796 of file BSplineSurfaceT_impl.hh.
| BSplineSurfaceT< PointT >::Scalar ACG::BSplineSurfaceT< PointT >::loweru | ( | ) |
Returns the lower u parameter.
Definition at line 718 of file BSplineSurfaceT_impl.hh.
| BSplineSurfaceT< PointT >::Scalar ACG::BSplineSurfaceT< PointT >::lowerv | ( | ) |
Returns the lower v parameter.
Definition at line 737 of file BSplineSurfaceT_impl.hh.
|
inline |
Returns the number of controlpoints in m direction.
Definition at line 177 of file BSplineSurfaceT.hh.
|
inline |
Returns the number of controlpoints in n direction.
Definition at line 179 of file BSplineSurfaceT.hh.
|
inline |
Returns the number of knots in m direction.
Definition at line 182 of file BSplineSurfaceT.hh.
|
inline |
Returns the number of knots in n direction.
Definition at line 184 of file BSplineSurfaceT.hh.
| PointT ACG::BSplineSurfaceT< PointT >::normalSurfacePoint | ( | double | _u, |
| double | _v | ||
| ) |
Returns the normal of a spline surface.
| _u | the parameter in u direction |
| _v | the parameter in v direction |
Definition at line 673 of file BSplineSurfaceT_impl.hh.
|
inline |
Returns a reference to the control point (m, n)
| _m,_n | the control point index |
Definition at line 203 of file BSplineSurfaceT.hh.
|
inline |
Returns a const reference to the control point (m, n)
| _m,_n | the control point index |
Definition at line 213 of file BSplineSurfaceT.hh.
|
inline |
Returns a reference to the control point (m, n)
| _param | the control point index |
Definition at line 223 of file BSplineSurfaceT.hh.
|
inline |
Returns a const reference to the control point (m, n)
| _param | the control point index |
Definition at line 233 of file BSplineSurfaceT.hh.
|
inline |
release control point selection property
Definition at line 409 of file BSplineSurfaceT.hh.
|
inline |
release edge selection property
Definition at line 411 of file BSplineSurfaceT.hh.
|
private |
Definition at line 109 of file BSplineSurfaceT_impl.hh.
|
inline |
request control point selection property
Definition at line 404 of file BSplineSurfaceT.hh.
|
inline |
request edge selection property
Definition at line 406 of file BSplineSurfaceT.hh.
|
private |
Definition at line 89 of file BSplineSurfaceT_impl.hh.
| void ACG::BSplineSurfaceT< PointT >::reset_control_net | ( | ) |
Clears the control net.
Definition at line 150 of file BSplineSurfaceT_impl.hh.
| void ACG::BSplineSurfaceT< PointT >::resize | ( | unsigned int | _m, |
| unsigned int | _n | ||
| ) |
Resizes the spline struct.
You usually shoudn't have to care about this I will probably make it private...
| _m | size in m direction |
| _n | size in n direction |
Definition at line 124 of file BSplineSurfaceT_impl.hh.
|
inline |
Definition at line 441 of file BSplineSurfaceT.hh.
| void ACG::BSplineSurfaceT< PointT >::set_degree | ( | unsigned int | _degm, |
| unsigned int | _degn | ||
| ) |
Sets the degree of the spline surface.
| _degm | Degree in m direction |
| _degn | Degree in n direction |
Definition at line 175 of file BSplineSurfaceT_impl.hh.
| void ACG::BSplineSurfaceT< PointT >::set_knots_m | ( | std::vector< Scalar > | _knots | ) |
Set the knotvector of the bspline surface in m direction.
| _knots | The new knots |
Definition at line 357 of file BSplineSurfaceT_impl.hh.
| void ACG::BSplineSurfaceT< PointT >::set_knots_n | ( | std::vector< Scalar > | _knots | ) |
Set the knotvector of the bspline surface in n direction.
| _knots | The new knots |
Definition at line 368 of file BSplineSurfaceT_impl.hh.
| ACG::Vec2i ACG::BSplineSurfaceT< PointT >::spanm | ( | double | _t | ) |
Returns the basis functions which are unequal to zero at parameter u.
| _t | the parameter |
Definition at line 756 of file BSplineSurfaceT_impl.hh.
| ACG::Vec2i ACG::BSplineSurfaceT< PointT >::spann | ( | double | _t | ) |
Returns the basis functions which are unequal to zero at parameter v.
| _t | the parameter |
Definition at line 766 of file BSplineSurfaceT_impl.hh.
| PointT ACG::BSplineSurfaceT< PointT >::surfacePoint | ( | double | _u, |
| double | _v | ||
| ) |
Evaluates a spline surface at parameters _u and _v.
| _u | the parameter in u direction |
| _v | the parameter in v direction |
Definition at line 469 of file BSplineSurfaceT_impl.hh.
| PointT ACG::BSplineSurfaceT< PointT >::surfacePoint_rec | ( | double | _u, |
| double | _v | ||
| ) |
Evaluates a spline surface at parameters _u and _v.
Slower version of surfacePoint(), which evaluates the basis functions recursively.
| _u | the parameter in u direction |
| _v | the parameter in v direction |
Definition at line 570 of file BSplineSurfaceT_impl.hh.
| void ACG::BSplineSurfaceT< PointT >::surfacePointNormal | ( | Point & | _pt, |
| Point & | _normal, | ||
| double | _u, | ||
| double | _v | ||
| ) |
Evaluates a spline surface at parameters _u and _v.
Computes surface point and normal at the same time (optimized).
| _point | point output |
| _normal | normal output |
| _u | the parameter in u direction |
| _v | the parameter in v direction |
Definition at line 512 of file BSplineSurfaceT_impl.hh.
| BSplineSurfaceT< PointT >::Scalar ACG::BSplineSurfaceT< PointT >::upperu | ( | ) |
Returns the upper u parameter.
Definition at line 728 of file BSplineSurfaceT_impl.hh.
| BSplineSurfaceT< PointT >::Scalar ACG::BSplineSurfaceT< PointT >::upperv | ( | ) |
Returns the upper v parameter.
Definition at line 747 of file BSplineSurfaceT_impl.hh.
|
private |
Definition at line 465 of file BSplineSurfaceT.hh.
|
private |
list of control point properties
Definition at line 478 of file BSplineSurfaceT.hh.
|
private |
Spline degree in m direction.
Definition at line 459 of file BSplineSurfaceT.hh.
|
private |
Spline degree in n direction.
Definition at line 460 of file BSplineSurfaceT.hh.
|
private |
number of control points in m direction
Definition at line 457 of file BSplineSurfaceT.hh.
|
private |
number of control points in n direction
Definition at line 458 of file BSplineSurfaceT.hh.
|
private |
list of edge properties
Definition at line 482 of file BSplineSurfaceT.hh.
|
private |
Knotvector in m direction.
Definition at line 462 of file BSplineSurfaceT.hh.
|
private |
Knotvector in n direction.
Definition at line 463 of file BSplineSurfaceT.hh.
|
private |
Definition at line 485 of file BSplineSurfaceT.hh.
|
private |
Definition at line 486 of file BSplineSurfaceT.hh.