Developer Documentation
|
#include <AC>
Public Types | |
typedef PointT | Point |
typedef Point::value_type | Scalar |
Public Member Functions | |
BSplineCurveT (unsigned int _degree=3) | |
Constructor. More... | |
BSplineCurveT (const BSplineCurveT &_curve) | |
Copy Constructor. More... | |
BSplineCurveT & | operator= (const BSplineCurveT &)=default |
Use the default = operator. | |
~BSplineCurveT () | |
Destructor. More... | |
std::vector< Scalar > & | get_knots () |
get the knotvector of the bspline curve More... | |
void | set_knots (std::vector< Scalar > _knots) |
set the knotvector of the bspline curve More... | |
Knotvector * | get_knotvector_ref () |
get a reference to the knotvector More... | |
void | set_knotvector_type (Knotvector::KnotvectorType _type) |
set type of knotvector More... | |
Scalar | get_knot (int _i) |
get knot i More... | |
Point & | get_control_point (int _i) |
get control point i More... | |
void | add_control_point (const Point &_cp) |
add a control point More... | |
void | insert_control_point (int _idx, const Point &_cp) |
insert a control point at given index More... | |
void | delete_control_point (int _idx) |
delete control point at given index More... | |
void | set_control_point (int _idx, const Point &_cp) |
reset a control point More... | |
void | set_control_polygon (std::vector< Point > &_control_polygon) |
set whole control polygon More... | |
void | reset_control_polygon () |
Clears the control polygon. More... | |
void | print () const |
print information string More... | |
Point | curvePoint (Scalar _u) |
Point | derivativeCurvePoint (Scalar _u, unsigned int _der) |
std::vector< Point > | deBoorAlgorithm (double _u) |
void | insertKnot (double _u) |
Inserts a new knot at parameter u. More... | |
unsigned int | n_control_points () const |
Returns the number of control points. More... | |
unsigned int | n_knots () const |
Returns the number of knots. More... | |
unsigned int | degree () const |
Returns the spline degree. More... | |
void | set_degree (unsigned int _degree) |
Sets the spline degree. More... | |
ACG::Vec2i | span (double _t) |
ACG::Vec2i | interval (double _t) |
void | autocompute_knotvector (bool _auto) |
void | fixNumberOfControlPoints (bool _fix) |
bool | projected () |
projected More... | |
void | reverse () |
Reverses the curve. More... | |
Scalar | basisFunction (int _i, int _n, Scalar _t) |
Scalar | derivativeBasisFunction (int _i, int _n, Scalar _t, int _der) |
Scalar | lower () const |
Returns the lower parameter. More... | |
Scalar | upper () const |
Returns the upper parameter. More... | |
void | request_controlpoint_selections () |
void | request_edge_selections () |
void | release_controlpoint_selections () |
void | release_edge_selections () |
bool | controlpoint_selections_available () const |
bool | edge_selections_available () const |
unsigned char & | controlpoint_selection (unsigned int _i) |
const unsigned char & | controlpoint_selection (unsigned int _i) const |
unsigned char & | edge_selection (unsigned int _i) |
const unsigned char & | edge_selection (unsigned int _i) const |
void | select_controlpoint (unsigned int _pIdx) |
void | deselect_controlpoint (unsigned int _pIdx) |
bool | controlpoint_selected (unsigned int _pIdx) const |
void | select_edge (unsigned int _pIdx) |
void | deselect_edge (unsigned int _pIdx) |
bool | edge_selected (unsigned int _pIdx) 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 | |
std::vector< Point > | control_polygon_ |
Knotvector | knotvector_ |
unsigned int | degree_ |
bool | autocompute_knotvector_ |
bool | fix_number_control_points_ |
std::vector< unsigned char > | cpselections_ |
std::vector< unsigned char > | eselections_ |
unsigned int | ref_count_cpselections_ |
unsigned int | ref_count_eselections_ |
/.../BSplineCurveT.hh>
Brief Description.
A more elaborate description follows.
Definition at line 82 of file BSplineCurveT.hh.
typedef PointT ACG::BSplineCurveT< PointT >::Point |
Definition at line 87 of file BSplineCurveT.hh.
typedef Point::value_type ACG::BSplineCurveT< PointT >::Scalar |
Definition at line 88 of file BSplineCurveT.hh.
ACG::BSplineCurveT< PointT >::BSplineCurveT | ( | unsigned int | _degree = 3 | ) |
Constructor.
Definition at line 75 of file BSplineCurveT_impl.hh.
ACG::BSplineCurveT< PointT >::BSplineCurveT | ( | const BSplineCurveT< PointT > & | _curve | ) |
Copy Constructor.
Definition at line 88 of file BSplineCurveT_impl.hh.
|
inline |
Destructor.
Definition at line 100 of file BSplineCurveT.hh.
void ACG::BSplineCurveT< PointT >::add_control_point | ( | const Point & | _cp | ) |
add a control point
Definition at line 148 of file BSplineCurveT_impl.hh.
|
inline |
Definition at line 190 of file BSplineCurveT.hh.
BSplineCurveT< PointT >::Scalar ACG::BSplineCurveT< PointT >::basisFunction | ( | int | _i, |
int | _n, | ||
Scalar | _t | ||
) |
A Spline Basis Function
_i | the i'th basis function |
_n | the spline degree |
_t | the parameter Returns N_i^p(_u) |
Definition at line 334 of file BSplineCurveT_impl.hh.
|
inline |
Definition at line 272 of file BSplineCurveT.hh.
|
inline |
Definition at line 248 of file BSplineCurveT.hh.
|
inline |
Definition at line 253 of file BSplineCurveT.hh.
|
inline |
Definition at line 243 of file BSplineCurveT.hh.
PointT ACG::BSplineCurveT< PointT >::curvePoint | ( | Scalar | _u | ) |
Evaluates a spline curve at parameter _u
_u | the parameter |
Definition at line 279 of file BSplineCurveT_impl.hh.
std::vector< PointT > ACG::BSplineCurveT< PointT >::deBoorAlgorithm | ( | double | _u | ) |
Evaluates the curve at parameter u using deBoor algorithm.
_u | the parameter |
Definition at line 400 of file BSplineCurveT_impl.hh.
|
inline |
Returns the spline degree.
Definition at line 173 of file BSplineCurveT.hh.
void ACG::BSplineCurveT< PointT >::delete_control_point | ( | int | _idx | ) |
delete control point at given index
Definition at line 204 of file BSplineCurveT_impl.hh.
BSplineCurveT< PointT >::Scalar ACG::BSplineCurveT< PointT >::derivativeBasisFunction | ( | int | _i, |
int | _n, | ||
Scalar | _t, | ||
int | _der | ||
) |
Derivative of a Spline Basis Function
_i | the i'th basis function |
_n | the spline degree |
_t | the parameter |
_der | the _der'th derivative |
Definition at line 373 of file BSplineCurveT_impl.hh.
PointT ACG::BSplineCurveT< PointT >::derivativeCurvePoint | ( | Scalar | _u, |
unsigned int | _der | ||
) |
Returns the _derm'th derivative of a spline curve
_u | the parameter |
_der | the _derm'th derivative |
Definition at line 309 of file BSplineCurveT_impl.hh.
|
inline |
Definition at line 270 of file BSplineCurveT.hh.
|
inline |
Definition at line 275 of file BSplineCurveT.hh.
|
inline |
Definition at line 277 of file BSplineCurveT.hh.
|
inline |
Definition at line 259 of file BSplineCurveT.hh.
|
inline |
Definition at line 263 of file BSplineCurveT.hh.
|
inline |
Definition at line 244 of file BSplineCurveT.hh.
|
inline |
Definition at line 192 of file BSplineCurveT.hh.
|
inline |
get control point i
Definition at line 118 of file BSplineCurveT.hh.
|
inline |
get knot i
Definition at line 115 of file BSplineCurveT.hh.
|
inline |
get the knotvector of the bspline curve
Definition at line 103 of file BSplineCurveT.hh.
|
inline |
get a reference to the knotvector
Definition at line 109 of file BSplineCurveT.hh.
void ACG::BSplineCurveT< PointT >::insert_control_point | ( | int | _idx, |
const Point & | _cp | ||
) |
insert a control point at given index
Definition at line 173 of file BSplineCurveT_impl.hh.
void ACG::BSplineCurveT< PointT >::insertKnot | ( | double | _u | ) |
Inserts a new knot at parameter u.
Definition at line 514 of file BSplineCurveT_impl.hh.
ACG::Vec2i ACG::BSplineCurveT< PointT >::interval | ( | 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 486 of file BSplineCurveT_impl.hh.
BSplineCurveT< PointT >::Scalar ACG::BSplineCurveT< PointT >::lower |
Returns the lower parameter.
Definition at line 447 of file BSplineCurveT_impl.hh.
|
inline |
Returns the number of control points.
Definition at line 167 of file BSplineCurveT.hh.
|
inline |
Returns the number of knots.
Definition at line 170 of file BSplineCurveT.hh.
void ACG::BSplineCurveT< PointT >::print |
print information string
Definition at line 500 of file BSplineCurveT_impl.hh.
|
inline |
|
inline |
Definition at line 239 of file BSplineCurveT.hh.
|
inline |
Definition at line 240 of file BSplineCurveT.hh.
|
private |
Definition at line 133 of file BSplineCurveT_impl.hh.
|
inline |
Definition at line 235 of file BSplineCurveT.hh.
|
inline |
Definition at line 236 of file BSplineCurveT.hh.
|
private |
Definition at line 116 of file BSplineCurveT_impl.hh.
void ACG::BSplineCurveT< PointT >::reset_control_polygon |
Clears the control polygon.
Definition at line 265 of file BSplineCurveT_impl.hh.
void ACG::BSplineCurveT< PointT >::reverse |
Reverses the curve.
Definition at line 570 of file BSplineCurveT_impl.hh.
|
inline |
Definition at line 269 of file BSplineCurveT.hh.
|
inline |
Definition at line 274 of file BSplineCurveT.hh.
void ACG::BSplineCurveT< PointT >::set_control_point | ( | int | _idx, |
const Point & | _cp | ||
) |
reset a control point
Definition at line 233 of file BSplineCurveT_impl.hh.
void ACG::BSplineCurveT< PointT >::set_control_polygon | ( | std::vector< Point > & | _control_polygon | ) |
set whole control polygon
Definition at line 244 of file BSplineCurveT_impl.hh.
|
inline |
Sets the spline degree.
Definition at line 176 of file BSplineCurveT.hh.
void ACG::BSplineCurveT< PointT >::set_knots | ( | std::vector< Scalar > | _knots | ) |
set the knotvector of the bspline curve
Definition at line 557 of file BSplineCurveT_impl.hh.
|
inline |
set type of knotvector
Definition at line 112 of file BSplineCurveT.hh.
ACG::Vec2i ACG::BSplineCurveT< PointT >::span | ( | double | _t | ) |
returns the basis functions which are unequal to zero at parameter t
_t | the parameter |
Definition at line 467 of file BSplineCurveT_impl.hh.
BSplineCurveT< PointT >::Scalar ACG::BSplineCurveT< PointT >::upper |
Returns the upper parameter.
Definition at line 457 of file BSplineCurveT_impl.hh.
|
private |
Definition at line 296 of file BSplineCurveT.hh.
|
private |
Definition at line 290 of file BSplineCurveT.hh.
|
private |
Definition at line 305 of file BSplineCurveT.hh.
|
private |
Definition at line 294 of file BSplineCurveT.hh.
|
private |
Definition at line 308 of file BSplineCurveT.hh.
|
private |
Definition at line 298 of file BSplineCurveT.hh.
|
private |
Definition at line 292 of file BSplineCurveT.hh.
|
private |
Definition at line 311 of file BSplineCurveT.hh.
|
private |
Definition at line 312 of file BSplineCurveT.hh.