#include <BaseKernel.hh>
Public Types | |
typedef PropertyContainer::iterator | prop_iterator |
typedef PropertyContainer::const_iterator | const_prop_iterator |
Public Member Functions | |
size_t | n_vprops (void) const |
size_t | n_eprops (void) const |
size_t | n_hprops (void) const |
size_t | n_fprops (void) const |
size_t | n_mprops (void) const |
BaseProperty * | _get_vprop (const std::string &_name) |
BaseProperty * | _get_eprop (const std::string &_name) |
BaseProperty * | _get_hprop (const std::string &_name) |
BaseProperty * | _get_fprop (const std::string &_name) |
BaseProperty * | _get_mprop (const std::string &_name) |
const BaseProperty * | _get_vprop (const std::string &_name) const |
const BaseProperty * | _get_eprop (const std::string &_name) const |
const BaseProperty * | _get_hprop (const std::string &_name) const |
const BaseProperty * | _get_fprop (const std::string &_name) const |
const BaseProperty * | _get_mprop (const std::string &_name) const |
BaseProperty & | _vprop (size_t _idx) |
BaseProperty & | _eprop (size_t _idx) |
BaseProperty & | _hprop (size_t _idx) |
BaseProperty & | _fprop (size_t _idx) |
BaseProperty & | _mprop (size_t _idx) |
const BaseProperty & | _vprop (size_t _idx) const |
const BaseProperty & | _eprop (size_t _idx) const |
const BaseProperty & | _hprop (size_t _idx) const |
const BaseProperty & | _fprop (size_t _idx) const |
const BaseProperty & | _mprop (size_t _idx) const |
size_t | _add_vprop (BaseProperty *_bp) |
size_t | _add_eprop (BaseProperty *_bp) |
size_t | _add_hprop (BaseProperty *_bp) |
size_t | _add_fprop (BaseProperty *_bp) |
size_t | _add_mprop (BaseProperty *_bp) |
virtual unsigned int | n_vertices () const |
virtual unsigned int | n_halfedges () const |
virtual unsigned int | n_edges () const |
virtual unsigned int | n_faces () const |
void | property_stats (std::ostream &_ostr=std::clog) const |
prop_iterator | vprops_begin () |
prop_iterator | vprops_end () |
const_prop_iterator | vprops_begin () const |
const_prop_iterator | vprops_end () const |
prop_iterator | eprops_begin () |
prop_iterator | eprops_end () |
const_prop_iterator | eprops_begin () const |
const_prop_iterator | eprops_end () const |
prop_iterator | hprops_begin () |
prop_iterator | hprops_end () |
const_prop_iterator | hprops_begin () const |
const_prop_iterator | hprops_end () const |
prop_iterator | fprops_begin () |
prop_iterator | fprops_end () |
const_prop_iterator | fprops_begin () const |
const_prop_iterator | fprops_end () const |
prop_iterator | mprops_begin () |
prop_iterator | mprops_end () |
const_prop_iterator | mprops_begin () const |
const_prop_iterator | mprops_end () const |
Add a property to a mesh item | |
template<class T> | |
void | add_property (VPropHandleT< T > &_ph, const std::string &_name="<vprop>") |
template<class T> | |
void | add_property (HPropHandleT< T > &_ph, const std::string &_name="<hprop>") |
template<class T> | |
void | add_property (EPropHandleT< T > &_ph, const std::string &_name="<eprop>") |
template<class T> | |
void | add_property (FPropHandleT< T > &_ph, const std::string &_name="<fprop>") |
template<class T> | |
void | add_property (MPropHandleT< T > &_ph, const std::string &_name="<mprop>") |
Removing a property from a mesh tiem | |
template<typename T> | |
void | remove_property (VPropHandleT< T > &_ph) |
template<typename T> | |
void | remove_property (HPropHandleT< T > &_ph) |
template<typename T> | |
void | remove_property (EPropHandleT< T > &_ph) |
template<typename T> | |
void | remove_property (FPropHandleT< T > &_ph) |
template<typename T> | |
void | remove_property (MPropHandleT< T > &_ph) |
Get property handle by name | |
template<class T> | |
bool | get_property_handle (VPropHandleT< T > &_ph, const std::string &_name) const |
template<class T> | |
bool | get_property_handle (HPropHandleT< T > &_ph, const std::string &_name) const |
template<class T> | |
bool | get_property_handle (EPropHandleT< T > &_ph, const std::string &_name) const |
template<class T> | |
bool | get_property_handle (FPropHandleT< T > &_ph, const std::string &_name) const |
template<class T> | |
bool | get_property_handle (MPropHandleT< T > &_ph, const std::string &_name) const |
Access a property | |
template<class T> | |
PropertyT< T > & | property (VPropHandleT< T > _ph) |
template<class T> | |
const PropertyT< T > & | property (VPropHandleT< T > _ph) const |
template<class T> | |
PropertyT< T > & | property (HPropHandleT< T > _ph) |
template<class T> | |
const PropertyT< T > & | property (HPropHandleT< T > _ph) const |
template<class T> | |
PropertyT< T > & | property (EPropHandleT< T > _ph) |
template<class T> | |
const PropertyT< T > & | property (EPropHandleT< T > _ph) const |
template<class T> | |
PropertyT< T > & | property (FPropHandleT< T > _ph) |
template<class T> | |
const PropertyT< T > & | property (FPropHandleT< T > _ph) const |
template<class T> | |
PropertyT< T > & | mproperty (MPropHandleT< T > _ph) |
template<class T> | |
const PropertyT< T > & | mproperty (MPropHandleT< T > _ph) const |
Access a property element using a handle to a mesh item | |
template<class T> | |
VPropHandleT< T >::reference | property (VPropHandleT< T > _ph, VertexHandle _vh) |
template<class T> | |
VPropHandleT< T >::const_reference | property (VPropHandleT< T > _ph, VertexHandle _vh) const |
template<class T> | |
HPropHandleT< T >::reference | property (HPropHandleT< T > _ph, HalfedgeHandle _hh) |
template<class T> | |
HPropHandleT< T >::const_reference | property (HPropHandleT< T > _ph, HalfedgeHandle _hh) const |
template<class T> | |
EPropHandleT< T >::reference | property (EPropHandleT< T > _ph, EdgeHandle _eh) |
template<class T> | |
EPropHandleT< T >::const_reference | property (EPropHandleT< T > _ph, EdgeHandle _eh) const |
template<class T> | |
FPropHandleT< T >::reference | property (FPropHandleT< T > _ph, FaceHandle _fh) |
template<class T> | |
FPropHandleT< T >::const_reference | property (FPropHandleT< T > _ph, FaceHandle _fh) const |
template<class T> | |
MPropHandleT< T >::reference | property (MPropHandleT< T > _ph) |
template<class T> | |
MPropHandleT< T >::const_reference | property (MPropHandleT< T > _ph) const |
Protected Member Functions | |
BaseProperty & | _vprop (BaseHandle _h) |
BaseProperty & | _eprop (BaseHandle _h) |
BaseProperty & | _hprop (BaseHandle _h) |
BaseProperty & | _fprop (BaseHandle _h) |
BaseProperty & | _mprop (BaseHandle _h) |
const BaseProperty & | _vprop (BaseHandle _h) const |
const BaseProperty & | _eprop (BaseHandle _h) const |
const BaseProperty & | _hprop (BaseHandle _h) const |
const BaseProperty & | _fprop (BaseHandle _h) const |
const BaseProperty & | _mprop (BaseHandle _h) const |
void | vprops_reserve (unsigned int _n) const |
void | vprops_resize (unsigned int _n) const |
void | vprops_swap (unsigned int _i0, unsigned int _i1) const |
void | hprops_reserve (unsigned int _n) const |
void | hprops_resize (unsigned int _n) const |
void | hprops_swap (unsigned int _i0, unsigned int _i1) const |
void | eprops_reserve (unsigned int _n) const |
void | eprops_resize (unsigned int _n) const |
void | eprops_swap (unsigned int _i0, unsigned int _i1) const |
void | fprops_reserve (unsigned int _n) const |
void | fprops_resize (unsigned int _n) const |
void | fprops_swap (unsigned int _i0, unsigned int _i1) const |
void | mprops_resize (unsigned int _n) const |
There are two types of properties:
The differentiation is only semantically, technically both are equally handled. Therefore the methods provided by the BaseKernel are applicable to both property types.
void OpenMesh::BaseKernel::add_property | ( | VPropHandleT< T > & | _ph, | |
const std::string & | _name = "<vprop>" | |||
) | [inline] |
Adds a property
Depending on the property handle type a vertex, (half-)edge, face or mesh property is added to the mesh. If the action fails the handle is invalid. On success the handle must be used to access the property data with property().
_ph | A property handle defining the data type to bind to mesh. On success the handle is valid else invalid. | |
_name | Optional name of property. Following restrictions apply to the name:
|
true
on success else false
. void OpenMesh::BaseKernel::remove_property | ( | VPropHandleT< T > & | _ph | ) | [inline] |
Remove a property.
Removes the property represented by the handle from the apropriate mesh item.
_ph | Property to be removed. The handle is invalid afterwords. |
bool OpenMesh::BaseKernel::get_property_handle | ( | VPropHandleT< T > & | _ph, | |
const std::string & | _name | |||
) | const [inline] |
Retrieves the handle to a named property by it's name.
_ph | A property handle. On success the handle is valid else invalid. | |
_name | Name of wanted property. |
true
if such a named property is available, else false
. PropertyT<T>& OpenMesh::BaseKernel::property | ( | VPropHandleT< T > | _ph | ) | [inline] |
Access a property
This method returns a reference to property. The property handle must be valid! The result is unpredictable if the handle is invalid!
_ph | A valid (!) property handle. |
VPropHandleT<T>::reference OpenMesh::BaseKernel::property | ( | VPropHandleT< T > | _ph, | |
VertexHandle | _vh | |||
) | [inline] |
Return value of property for an item