Developer Documentation
ACG::KnotvectorT< Scalar > Class Template Reference

#include <Type-BSpline/ObjectTypes/Knotvector/KnotvectorT.hh>

Public Types

enum  KnotvectorType { UNIFORM_INTERPOL = 0 , UNIFORM = 1 }
 

Public Member Functions

 KnotvectorT ()
 Constructor. More...
 
 KnotvectorT (const KnotvectorT &_knotvec)
 Copy Constructor. More...
 
KnotvectorToperator= (const KnotvectorT &)=default
 Use the default = operator.
 
 ~KnotvectorT ()
 Destructor. More...
 
void setType (KnotvectorType _type)
 
void createKnots (unsigned int _splineDeg, unsigned int _dim)
 
std::vector< Scalar > & getKnotvector ()
 
const std::vector< Scalar > & getKnotvector () const
 
unsigned int size () const
 
Scalar getKnot (unsigned int _index) const
 
void setKnotvector (const std::vector< Scalar > &_knots)
 
void resize (unsigned int _size)
 
void insertKnot (unsigned int _index, const Scalar _knot)
 
void addKnot (Scalar _knot)
 
void setKnot (unsigned int _index, Scalar _knot)
 
void deleteKnot (unsigned int _index)
 
Scalar & operator() (unsigned int _index)
 returns a reference to the _index'th knot More...
 
const Scalar & operator() (unsigned int _index) const
 returns a const reference to the _index'th knot More...
 
void clear ()
 
void request_selections ()
 
void release_selections ()
 
bool selections_available () const
 
unsigned char & selection (unsigned int _i)
 
const unsigned char & selection (unsigned int _i) const
 
void select (unsigned int _pIdx)
 
void deselect (unsigned int _pIdx)
 
bool 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)
 
void createUniformInterpolatingKnots (unsigned int _splineDeg, unsigned int _dim)
 
void createUniformKnots (unsigned int _splineDeg, unsigned int _dim)
 

Private Attributes

std::vector< unsigned char > selections_
 
unsigned int ref_count_selections_
 
std::vector< Scalar > knots_
 
KnotvectorType knotvectorType_
 
unsigned int num_control_points_
 
unsigned int spline_degree_
 

Detailed Description

template<typename Scalar>
class ACG::KnotvectorT< Scalar >

A knotvector class for use with splines

Definition at line 78 of file KnotvectorT.hh.

Member Enumeration Documentation

◆ KnotvectorType

template<typename Scalar >
enum ACG::KnotvectorT::KnotvectorType

Definition at line 82 of file KnotvectorT.hh.

Constructor & Destructor Documentation

◆ KnotvectorT() [1/2]

template<typename Scalar >
ACG::KnotvectorT< Scalar >::KnotvectorT

Constructor.

Definition at line 60 of file KnotvectorT_impl.hh.

◆ KnotvectorT() [2/2]

template<typename Scalar >
ACG::KnotvectorT< Scalar >::KnotvectorT ( const KnotvectorT< Scalar > &  _knotvec)

Copy Constructor.

Definition at line 69 of file KnotvectorT_impl.hh.

◆ ~KnotvectorT()

template<typename Scalar >
ACG::KnotvectorT< Scalar >::~KnotvectorT

Destructor.

Definition at line 84 of file KnotvectorT_impl.hh.

Member Function Documentation

◆ addKnot()

template<typename Scalar >
void ACG::KnotvectorT< Scalar >::addKnot ( Scalar  _knot)

Definition at line 122 of file KnotvectorT_impl.hh.

◆ clear()

template<typename Scalar >
void ACG::KnotvectorT< Scalar >::clear ( void  )
inline

Definition at line 147 of file KnotvectorT.hh.

◆ createKnots()

template<typename Scalar >
void ACG::KnotvectorT< Scalar >::createKnots ( unsigned int  _splineDeg,
unsigned int  _dim 
)

Definition at line 106 of file KnotvectorT_impl.hh.

◆ createUniformInterpolatingKnots()

template<typename Scalar >
void ACG::KnotvectorT< Scalar >::createUniformInterpolatingKnots ( unsigned int  _splineDeg,
unsigned int  _dim 
)
private

Definition at line 181 of file KnotvectorT_impl.hh.

◆ createUniformKnots()

template<typename Scalar >
void ACG::KnotvectorT< Scalar >::createUniformKnots ( unsigned int  _splineDeg,
unsigned int  _dim 
)
private

Definition at line 213 of file KnotvectorT_impl.hh.

◆ deleteKnot()

template<typename Scalar >
void ACG::KnotvectorT< Scalar >::deleteKnot ( unsigned int  _index)

Definition at line 151 of file KnotvectorT_impl.hh.

◆ deselect()

template<typename Scalar >
void ACG::KnotvectorT< Scalar >::deselect ( unsigned int  _pIdx)
inline

Definition at line 176 of file KnotvectorT.hh.

◆ getKnot()

template<typename Scalar >
Scalar ACG::KnotvectorT< Scalar >::getKnot ( unsigned int  _index) const
inline

Definition at line 108 of file KnotvectorT.hh.

◆ getKnotvector() [1/2]

template<typename Scalar >
std::vector< Scalar > & ACG::KnotvectorT< Scalar >::getKnotvector ( )
inline

Definition at line 103 of file KnotvectorT.hh.

◆ getKnotvector() [2/2]

template<typename Scalar >
const std::vector< Scalar > & ACG::KnotvectorT< Scalar >::getKnotvector ( ) const
inline

Definition at line 104 of file KnotvectorT.hh.

◆ insertKnot()

template<typename Scalar >
void ACG::KnotvectorT< Scalar >::insertKnot ( unsigned int  _index,
const Scalar  _knot 
)

Definition at line 136 of file KnotvectorT_impl.hh.

◆ operator()() [1/2]

template<typename Scalar >
Scalar & ACG::KnotvectorT< Scalar >::operator() ( unsigned int  _index)
inline

returns a reference to the _index'th knot

Parameters
_indexThe knot index

Definition at line 133 of file KnotvectorT.hh.

◆ operator()() [2/2]

template<typename Scalar >
const Scalar & ACG::KnotvectorT< Scalar >::operator() ( unsigned int  _index) const
inline

returns a const reference to the _index'th knot

Parameters
_indexThe knot index

Definition at line 142 of file KnotvectorT.hh.

◆ release_prop()

template<typename Scalar >
template<class PropT >
void ACG::KnotvectorT< Scalar >::release_prop ( unsigned int &  _ref_count,
PropT &  _prop 
)
private

Definition at line 258 of file KnotvectorT_impl.hh.

◆ release_selections()

template<typename Scalar >
void ACG::KnotvectorT< Scalar >::release_selections ( )
inline

Definition at line 157 of file KnotvectorT.hh.

◆ request_prop()

template<typename Scalar >
template<class PropT >
void ACG::KnotvectorT< Scalar >::request_prop ( unsigned int &  _ref_count,
PropT &  _prop 
)
private

Definition at line 241 of file KnotvectorT_impl.hh.

◆ request_selections()

template<typename Scalar >
void ACG::KnotvectorT< Scalar >::request_selections ( )
inline

Definition at line 154 of file KnotvectorT.hh.

◆ resize()

template<typename Scalar >
void ACG::KnotvectorT< Scalar >::resize ( unsigned int  _size)
inline

Definition at line 115 of file KnotvectorT.hh.

◆ select()

template<typename Scalar >
void ACG::KnotvectorT< Scalar >::select ( unsigned int  _pIdx)
inline

Definition at line 175 of file KnotvectorT.hh.

◆ selected()

template<typename Scalar >
bool ACG::KnotvectorT< Scalar >::selected ( unsigned int  _pIdx) const
inline

Definition at line 178 of file KnotvectorT.hh.

◆ selection() [1/2]

template<typename Scalar >
unsigned char & ACG::KnotvectorT< Scalar >::selection ( unsigned int  _i)
inline

Definition at line 163 of file KnotvectorT.hh.

◆ selection() [2/2]

template<typename Scalar >
const unsigned char & ACG::KnotvectorT< Scalar >::selection ( unsigned int  _i) const
inline

Definition at line 168 of file KnotvectorT.hh.

◆ selections_available()

template<typename Scalar >
bool ACG::KnotvectorT< Scalar >::selections_available ( ) const
inline

Definition at line 160 of file KnotvectorT.hh.

◆ setKnot()

template<typename Scalar >
void ACG::KnotvectorT< Scalar >::setKnot ( unsigned int  _index,
Scalar  _knot 
)
inline

Definition at line 121 of file KnotvectorT.hh.

◆ setKnotvector()

template<typename Scalar >
void ACG::KnotvectorT< Scalar >::setKnotvector ( const std::vector< Scalar > &  _knots)

Definition at line 165 of file KnotvectorT_impl.hh.

◆ setType()

template<typename Scalar >
void ACG::KnotvectorT< Scalar >::setType ( KnotvectorType  _type)

Definition at line 93 of file KnotvectorT_impl.hh.

◆ size()

template<typename Scalar >
unsigned int ACG::KnotvectorT< Scalar >::size ( ) const
inline

Definition at line 106 of file KnotvectorT.hh.

Member Data Documentation

◆ knots_

template<typename Scalar >
std::vector<Scalar> ACG::KnotvectorT< Scalar >::knots_
private

Definition at line 199 of file KnotvectorT.hh.

◆ knotvectorType_

template<typename Scalar >
KnotvectorType ACG::KnotvectorT< Scalar >::knotvectorType_
private

Definition at line 201 of file KnotvectorT.hh.

◆ num_control_points_

template<typename Scalar >
unsigned int ACG::KnotvectorT< Scalar >::num_control_points_
private

Definition at line 207 of file KnotvectorT.hh.

◆ ref_count_selections_

template<typename Scalar >
unsigned int ACG::KnotvectorT< Scalar >::ref_count_selections_
private

Definition at line 195 of file KnotvectorT.hh.

◆ selections_

template<typename Scalar >
std::vector<unsigned char> ACG::KnotvectorT< Scalar >::selections_
private

Definition at line 192 of file KnotvectorT.hh.

◆ spline_degree_

template<typename Scalar >
unsigned int ACG::KnotvectorT< Scalar >::spline_degree_
private

Definition at line 208 of file KnotvectorT.hh.


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