Loading...
Searching...
No Matches
BaseKernel.hh
/* ========================================================================= *
* *
* OpenMesh *
* Copyright (c) 2001-2025, RWTH-Aachen University *
* Department of Computer Graphics and Multimedia *
* All rights reserved. *
* www.openmesh.org *
* *
*---------------------------------------------------------------------------*
* This file is part of OpenMesh. *
*---------------------------------------------------------------------------*
* *
* Redistribution and use in source and binary forms, with or without *
* modification, are permitted provided that the following conditions *
* are met: *
* *
* 1. Redistributions of source code must retain the above copyright notice, *
* this list of conditions and the following disclaimer. *
* *
* 2. Redistributions in binary form must reproduce the above copyright *
* notice, this list of conditions and the following disclaimer in the *
* documentation and/or other materials provided with the distribution. *
* *
* 3. Neither the name of the copyright holder nor the names of its *
* contributors may be used to endorse or promote products derived from *
* this software without specific prior written permission. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
* *
* ========================================================================= */
//=============================================================================
//
// CLASS BaseKernel
//
//=============================================================================
#ifndef OPENMESH_BASE_KERNEL_HH
#define OPENMESH_BASE_KERNEL_HH
//== INCLUDES =================================================================
#include <OpenMesh/Core/System/config.h>
// --------------------
#include <vector>
#include <string>
#include <algorithm>
#include <iosfwd>
// --------------------
#include <OpenMesh/Core/Utils/PropertyContainer.hh>
//== NAMESPACES ===============================================================
namespace OpenMesh {
//== CLASS DEFINITION =========================================================
class OPENMESHDLLEXPORT BaseKernel
{
public: //-------------------------------------------- constructor / destructor
BaseKernel() {}
virtual ~BaseKernel() {
vprops_.clear();
eprops_.clear();
hprops_.clear();
fprops_.clear();
}
public: //-------------------------------------------------- add new properties
template <class T>
void add_property( VPropHandleT<T>& _ph, const std::string& _name="<vprop>")
{
_ph = VPropHandleT<T>( vprops_.add(T(), _name) );
vprops_.resize(n_vertices());
}
template <class T>
void add_property( HPropHandleT<T>& _ph, const std::string& _name="<hprop>")
{
_ph = HPropHandleT<T>( hprops_.add(T(), _name) );
hprops_.resize(n_halfedges());
}
template <class T>
void add_property( EPropHandleT<T>& _ph, const std::string& _name="<eprop>")
{
_ph = EPropHandleT<T>( eprops_.add(T(), _name) );
eprops_.resize(n_edges());
}
template <class T>
void add_property( FPropHandleT<T>& _ph, const std::string& _name="<fprop>")
{
_ph = FPropHandleT<T>( fprops_.add(T(), _name) );
fprops_.resize(n_faces());
}
template <class T>
void add_property( MPropHandleT<T>& _ph, const std::string& _name="<mprop>")
{
_ph = MPropHandleT<T>( mprops_.add(T(), _name) );
mprops_.resize(1);
}
public: //--------------------------------------------------- remove properties
template <typename T>
void remove_property(VPropHandleT<T>& _ph)
{
if (_ph.is_valid())
vprops_.remove(_ph);
_ph.reset();
}
template <typename T>
void remove_property(HPropHandleT<T>& _ph)
{
if (_ph.is_valid())
hprops_.remove(_ph);
_ph.reset();
}
template <typename T>
void remove_property(EPropHandleT<T>& _ph)
{
if (_ph.is_valid())
eprops_.remove(_ph);
_ph.reset();
}
template <typename T>
void remove_property(FPropHandleT<T>& _ph)
{
if (_ph.is_valid())
fprops_.remove(_ph);
_ph.reset();
}
template <typename T>
void remove_property(MPropHandleT<T>& _ph)
{
if (_ph.is_valid())
mprops_.remove(_ph);
_ph.reset();
}
public: //------------------------------------------------ get handle from name
template <class T>
bool get_property_handle(VPropHandleT<T>& _ph,
const std::string& _name) const
{
return (_ph = VPropHandleT<T>(vprops_.handle(T(), _name))).is_valid();
}
template <class T>
bool get_property_handle(HPropHandleT<T>& _ph,
const std::string& _name) const
{
return (_ph = HPropHandleT<T>(hprops_.handle(T(), _name))).is_valid();
}
template <class T>
bool get_property_handle(EPropHandleT<T>& _ph,
const std::string& _name) const
{
return (_ph = EPropHandleT<T>(eprops_.handle(T(), _name))).is_valid();
}
template <class T>
bool get_property_handle(FPropHandleT<T>& _ph,
const std::string& _name) const
{
return (_ph = FPropHandleT<T>(fprops_.handle(T(), _name))).is_valid();
}
template <class T>
bool get_property_handle(MPropHandleT<T>& _ph,
const std::string& _name) const
{
return (_ph = MPropHandleT<T>(mprops_.handle(T(), _name))).is_valid();
}
public: //--------------------------------------------------- access properties
template <class T>
PropertyT<T>& property(VPropHandleT<T> _ph) {
return vprops_.property(_ph);
}
template <class T>
const PropertyT<T>& property(VPropHandleT<T> _ph) const {
return vprops_.property(_ph);
}
template <class T>
PropertyT<T>& property(HPropHandleT<T> _ph) {
return hprops_.property(_ph);
}
template <class T>
const PropertyT<T>& property(HPropHandleT<T> _ph) const {
return hprops_.property(_ph);
}
template <class T>
PropertyT<T>& property(EPropHandleT<T> _ph) {
return eprops_.property(_ph);
}
template <class T>
const PropertyT<T>& property(EPropHandleT<T> _ph) const {
return eprops_.property(_ph);
}
template <class T>
PropertyT<T>& property(FPropHandleT<T> _ph) {
return fprops_.property(_ph);
}
template <class T>
const PropertyT<T>& property(FPropHandleT<T> _ph) const {
return fprops_.property(_ph);
}
template <class T>
PropertyT<T>& mproperty(MPropHandleT<T> _ph) {
return mprops_.property(_ph);
}
template <class T>
const PropertyT<T>& mproperty(MPropHandleT<T> _ph) const {
return mprops_.property(_ph);
}
public: //-------------------------------------------- access property elements
template <class T>
typename VPropHandleT<T>::reference
property(VPropHandleT<T> _ph, VertexHandle _vh) {
return vprops_.property(_ph)[_vh.idx()];
}
template <class T>
typename VPropHandleT<T>::const_reference
property(VPropHandleT<T> _ph, VertexHandle _vh) const {
return vprops_.property(_ph)[_vh.idx()];
}
template <class T>
typename HPropHandleT<T>::reference
property(HPropHandleT<T> _ph, HalfedgeHandle _hh) {
return hprops_.property(_ph)[_hh.idx()];
}
template <class T>
typename HPropHandleT<T>::const_reference
property(HPropHandleT<T> _ph, HalfedgeHandle _hh) const {
return hprops_.property(_ph)[_hh.idx()];
}
template <class T>
typename EPropHandleT<T>::reference
property(EPropHandleT<T> _ph, EdgeHandle _eh) {
return eprops_.property(_ph)[_eh.idx()];
}
template <class T>
typename EPropHandleT<T>::const_reference
property(EPropHandleT<T> _ph, EdgeHandle _eh) const {
return eprops_.property(_ph)[_eh.idx()];
}
template <class T>
typename FPropHandleT<T>::reference
property(FPropHandleT<T> _ph, FaceHandle _fh) {
return fprops_.property(_ph)[_fh.idx()];
}
template <class T>
typename FPropHandleT<T>::const_reference
property(FPropHandleT<T> _ph, FaceHandle _fh) const {
return fprops_.property(_ph)[_fh.idx()];
}
template <class T>
typename MPropHandleT<T>::reference
property(MPropHandleT<T> _ph) {
return mprops_.property(_ph)[0];
}
template <class T>
typename MPropHandleT<T>::const_reference
property(MPropHandleT<T> _ph) const {
return mprops_.property(_ph)[0];
}
public: //------------------------------------------------ copy property
template <class T>
void copy_property(VPropHandleT<T>& _ph, VertexHandle _vh_from, VertexHandle _vh_to) {
if(_vh_from.is_valid() && _vh_to.is_valid())
vprops_.property(_ph)[_vh_to.idx()] = vprops_.property(_ph)[_vh_from.idx()];
}
template <class T>
void copy_property(HPropHandleT<T> _ph, HalfedgeHandle _hh_from, HalfedgeHandle _hh_to) {
if(_hh_from.is_valid() && _hh_to.is_valid())
hprops_.property(_ph)[_hh_to.idx()] = hprops_.property(_ph)[_hh_from.idx()];
}
template <class T>
void copy_property(EPropHandleT<T> _ph, EdgeHandle _eh_from, EdgeHandle _eh_to) {
if(_eh_from.is_valid() && _eh_to.is_valid())
eprops_.property(_ph)[_eh_to.idx()] = eprops_.property(_ph)[_eh_from.idx()];
}
template <class T>
void copy_property(FPropHandleT<T> _ph, FaceHandle _fh_from, FaceHandle _fh_to) {
if(_fh_from.is_valid() && _fh_to.is_valid())
fprops_.property(_ph)[_fh_to.idx()] = fprops_.property(_ph)[_fh_from.idx()];
}
public:
//------------------------------------------------ copy all properties
void copy_all_properties(VertexHandle _vh_from, VertexHandle _vh_to, bool _copyBuildIn = false) {
for( PropertyContainer::iterator p_it = vprops_.begin();
p_it != vprops_.end(); ++p_it) {
// Copy all properties, if build in is true
// Otherwise, copy only properties without build in specifier
if ( *p_it && ( _copyBuildIn || (*p_it)->name().substr(0,2) != "v:" ) )
(*p_it)->copy(static_cast<size_t>(_vh_from.idx()), static_cast<size_t>(_vh_to.idx()));
}
}
void copy_all_properties(HalfedgeHandle _hh_from, HalfedgeHandle _hh_to, bool _copyBuildIn = false) {
for( PropertyContainer::iterator p_it = hprops_.begin();
p_it != hprops_.end(); ++p_it) {
// Copy all properties, if build in is true
// Otherwise, copy only properties without build in specifier
if ( *p_it && ( _copyBuildIn || (*p_it)->name().substr(0,2) != "h:") )
(*p_it)->copy(_hh_from.idx(), _hh_to.idx());
}
}
void copy_all_properties(EdgeHandle _eh_from, EdgeHandle _eh_to, bool _copyBuildIn = false) {
for( PropertyContainer::iterator p_it = eprops_.begin();
p_it != eprops_.end(); ++p_it) {
// Copy all properties, if build in is true
// Otherwise, copy only properties without build in specifier
if ( *p_it && ( _copyBuildIn || (*p_it)->name().substr(0,2) != "e:") )
(*p_it)->copy(_eh_from.idx(), _eh_to.idx());
}
}
void copy_all_properties(FaceHandle _fh_from, FaceHandle _fh_to, bool _copyBuildIn = false) {
for( PropertyContainer::iterator p_it = fprops_.begin();
p_it != fprops_.end(); ++p_it) {
// Copy all properties, if build in is true
// Otherwise, copy only properties without build in specifier
if ( *p_it && ( _copyBuildIn || (*p_it)->name().substr(0,2) != "f:") )
(*p_it)->copy(_fh_from.idx(), _fh_to.idx());
}
}
void copy_all_kernel_properties(const BaseKernel & _other)
{
this->vprops_ = _other.vprops_;
this->eprops_ = _other.eprops_;
this->hprops_ = _other.hprops_;
this->fprops_ = _other.fprops_;
}
protected: //------------------------------------------------- low-level access
public: // used by non-native kernel and MeshIO, should be protected
size_t n_vprops(void) const { return vprops_.size(); }
size_t n_eprops(void) const { return eprops_.size(); }
size_t n_hprops(void) const { return hprops_.size(); }
size_t n_fprops(void) const { return fprops_.size(); }
size_t n_mprops(void) const { return mprops_.size(); }
BaseProperty* _get_vprop( const std::string& _name)
{ return vprops_.property(_name); }
BaseProperty* _get_eprop( const std::string& _name)
{ return eprops_.property(_name); }
BaseProperty* _get_hprop( const std::string& _name)
{ return hprops_.property(_name); }
BaseProperty* _get_fprop( const std::string& _name)
{ return fprops_.property(_name); }
BaseProperty* _get_mprop( const std::string& _name)
{ return mprops_.property(_name); }
const BaseProperty* _get_vprop( const std::string& _name) const
{ return vprops_.property(_name); }
const BaseProperty* _get_eprop( const std::string& _name) const
{ return eprops_.property(_name); }
const BaseProperty* _get_hprop( const std::string& _name) const
{ return hprops_.property(_name); }
const BaseProperty* _get_fprop( const std::string& _name) const
{ return fprops_.property(_name); }
const BaseProperty* _get_mprop( const std::string& _name) const
{ return mprops_.property(_name); }
BaseProperty& _vprop( size_t _idx ) { return vprops_._property( _idx ); }
BaseProperty& _eprop( size_t _idx ) { return eprops_._property( _idx ); }
BaseProperty& _hprop( size_t _idx ) { return hprops_._property( _idx ); }
BaseProperty& _fprop( size_t _idx ) { return fprops_._property( _idx ); }
BaseProperty& _mprop( size_t _idx ) { return mprops_._property( _idx ); }
const BaseProperty& _vprop( size_t _idx ) const
{ return vprops_._property( _idx ); }
const BaseProperty& _eprop( size_t _idx ) const
{ return eprops_._property( _idx ); }
const BaseProperty& _hprop( size_t _idx ) const
{ return hprops_._property( _idx ); }
const BaseProperty& _fprop( size_t _idx ) const
{ return fprops_._property( _idx ); }
const BaseProperty& _mprop( size_t _idx ) const
{ return mprops_._property( _idx ); }
size_t _add_vprop( BaseProperty* _bp ) { return vprops_._add( _bp ); }
size_t _add_eprop( BaseProperty* _bp ) { return eprops_._add( _bp ); }
size_t _add_hprop( BaseProperty* _bp ) { return hprops_._add( _bp ); }
size_t _add_fprop( BaseProperty* _bp ) { return fprops_._add( _bp ); }
size_t _add_mprop( BaseProperty* _bp ) { return mprops_._add( _bp ); }
protected: // low-level access non-public
BaseProperty& _vprop( BaseHandle _h )
{ return vprops_._property( _h.idx() ); }
BaseProperty& _eprop( BaseHandle _h )
{ return eprops_._property( _h.idx() ); }
BaseProperty& _hprop( BaseHandle _h )
{ return hprops_._property( _h.idx() ); }
BaseProperty& _fprop( BaseHandle _h )
{ return fprops_._property( _h.idx() ); }
BaseProperty& _mprop( BaseHandle _h )
{ return mprops_._property( _h.idx() ); }
const BaseProperty& _vprop( BaseHandle _h ) const
{ return vprops_._property( _h.idx() ); }
const BaseProperty& _eprop( BaseHandle _h ) const
{ return eprops_._property( _h.idx() ); }
const BaseProperty& _hprop( BaseHandle _h ) const
{ return hprops_._property( _h.idx() ); }
const BaseProperty& _fprop( BaseHandle _h ) const
{ return fprops_._property( _h.idx() ); }
const BaseProperty& _mprop( BaseHandle _h ) const
{ return mprops_._property( _h.idx() ); }
public: //----------------------------------------------------- element numbers
virtual size_t n_vertices() const { return 0; }
virtual size_t n_halfedges() const { return 0; }
virtual size_t n_edges() const { return 0; }
virtual size_t n_faces() const { return 0; }
template <typename HandleT>
size_t n_elements() const;
protected: //------------------------------------------- synchronize properties
void vprops_reserve(size_t _n) const { vprops_.reserve(_n); }
void vprops_resize(size_t _n) const { vprops_.resize(_n); }
void vprops_resize_if_smaller(size_t _n) const { vprops_.resize_if_smaller(_n); }
void vprops_clear() {
vprops_.clear();
}
void vprops_swap(unsigned int _i0, unsigned int _i1) const {
vprops_.swap(_i0, _i1);
}
void hprops_reserve(size_t _n) const { hprops_.reserve(_n); }
void hprops_resize(size_t _n) const { hprops_.resize(_n); }
void hprops_clear() {
hprops_.clear();
}
void hprops_swap(unsigned int _i0, unsigned int _i1) const {
hprops_.swap(_i0, _i1);
}
void eprops_reserve(size_t _n) const { eprops_.reserve(_n); }
void eprops_resize(size_t _n) const { eprops_.resize(_n); }
void eprops_clear() {
eprops_.clear();
}
void eprops_swap(unsigned int _i0, unsigned int _i1) const {
eprops_.swap(_i0, _i1);
}
void fprops_reserve(size_t _n) const { fprops_.reserve(_n); }
void fprops_resize(size_t _n) const { fprops_.resize(_n); }
void fprops_clear() {
fprops_.clear();
}
void fprops_swap(unsigned int _i0, unsigned int _i1) const {
fprops_.swap(_i0, _i1);
}
void mprops_resize(size_t _n) const { mprops_.resize(_n); }
void mprops_clear() {
mprops_.clear();
}
public:
// uses std::clog as output stream
void property_stats() const;
void property_stats(std::ostream& _ostr) const;
void vprop_stats( std::string& _string ) const;
void hprop_stats( std::string& _string ) const;
void eprop_stats( std::string& _string ) const;
void fprop_stats( std::string& _string ) const;
void mprop_stats( std::string& _string ) const;
// uses std::clog as output stream
void vprop_stats() const;
void hprop_stats() const;
void eprop_stats() const;
void fprop_stats() const;
void mprop_stats() const;
void vprop_stats(std::ostream& _ostr) const;
void hprop_stats(std::ostream& _ostr) const;
void eprop_stats(std::ostream& _ostr) const;
void fprop_stats(std::ostream& _ostr) const;
void mprop_stats(std::ostream& _ostr) const;
public:
typedef PropertyContainer::iterator prop_iterator;
typedef PropertyContainer::const_iterator const_prop_iterator;
prop_iterator vprops_begin() { return vprops_.begin(); }
prop_iterator vprops_end() { return vprops_.end(); }
const_prop_iterator vprops_begin() const { return vprops_.begin(); }
const_prop_iterator vprops_end() const { return vprops_.end(); }
prop_iterator eprops_begin() { return eprops_.begin(); }
prop_iterator eprops_end() { return eprops_.end(); }
const_prop_iterator eprops_begin() const { return eprops_.begin(); }
const_prop_iterator eprops_end() const { return eprops_.end(); }
prop_iterator hprops_begin() { return hprops_.begin(); }
prop_iterator hprops_end() { return hprops_.end(); }
const_prop_iterator hprops_begin() const { return hprops_.begin(); }
const_prop_iterator hprops_end() const { return hprops_.end(); }
prop_iterator fprops_begin() { return fprops_.begin(); }
prop_iterator fprops_end() { return fprops_.end(); }
const_prop_iterator fprops_begin() const { return fprops_.begin(); }
const_prop_iterator fprops_end() const { return fprops_.end(); }
prop_iterator mprops_begin() { return mprops_.begin(); }
prop_iterator mprops_end() { return mprops_.end(); }
const_prop_iterator mprops_begin() const { return mprops_.begin(); }
const_prop_iterator mprops_end() const { return mprops_.end(); }
private:
PropertyContainer vprops_;
PropertyContainer hprops_;
PropertyContainer eprops_;
PropertyContainer fprops_;
PropertyContainer mprops_;
};
template <>
inline size_t BaseKernel::n_elements<VertexHandle>() const { return n_vertices(); }
template <>
inline size_t BaseKernel::n_elements<HalfedgeHandle>() const { return n_halfedges(); }
template <>
inline size_t BaseKernel::n_elements<EdgeHandle>() const { return n_edges(); }
template <>
inline size_t BaseKernel::n_elements<FaceHandle>() const { return n_faces(); }
//=============================================================================
} // namespace OpenMesh
//=============================================================================
#endif // OPENMESH_BASE_KERNEL_HH defined
//=============================================================================
OpenMesh
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition MeshItems.hh:59
OpenMesh::BaseKernel::vprops_clear
void vprops_clear()
You should not use this function directly.
Definition BaseKernel.hh:715
OpenMesh::BaseKernel::_hprop
BaseProperty & _hprop(BaseHandle _h)
You should not use this function directly.
Definition BaseKernel.hh:666
OpenMesh::BaseKernel::prop_iterator
PropertyContainer::iterator prop_iterator
You should not use this function directly.
Definition BaseKernel.hh:782
OpenMesh::BaseKernel::mprops_begin
prop_iterator mprops_begin()
You should not use this function directly.
Definition BaseKernel.hh:805
OpenMesh::BaseKernel::_get_eprop
BaseProperty * _get_eprop(const std::string &_name)
You should not use this function directly.
Definition BaseKernel.hh:610
OpenMesh::BaseKernel::hprops_clear
void hprops_clear()
You should not use this function directly.
Definition BaseKernel.hh:725
OpenMesh::BaseKernel::n_vertices
virtual size_t n_vertices() const
You should not use this function directly.
Definition BaseKernel.hh:688
OpenMesh::BaseKernel::remove_property
void remove_property(EPropHandleT< T > &_ph)
You should not use this function directly.
Definition BaseKernel.hh:210
OpenMesh::BaseKernel::n_eprops
size_t n_eprops(void) const
You should not use this function directly.
Definition BaseKernel.hh:599
OpenMesh::BaseKernel::vprops_end
prop_iterator vprops_end()
You should not use this function directly.
Definition BaseKernel.hh:786
OpenMesh::BaseKernel::get_property_handle
bool get_property_handle(HPropHandleT< T > &_ph, const std::string &_name) const
You should not use this function directly.
Definition BaseKernel.hh:261
OpenMesh::BaseKernel::_eprop
const BaseProperty & _eprop(size_t _idx) const
You should not use this function directly.
Definition BaseKernel.hh:645
OpenMesh::BaseKernel::_get_mprop
const BaseProperty * _get_mprop(const std::string &_name) const
You should not use this function directly.
Definition BaseKernel.hh:634
OpenMesh::BaseKernel::_get_hprop
const BaseProperty * _get_hprop(const std::string &_name) const
You should not use this function directly.
Definition BaseKernel.hh:628
OpenMesh::BaseKernel::get_property_handle
bool get_property_handle(EPropHandleT< T > &_ph, const std::string &_name) const
You should not use this function directly.
Definition BaseKernel.hh:268
OpenMesh::BaseKernel::remove_property
void remove_property(VPropHandleT< T > &_ph)
You should not use this function directly.
Definition BaseKernel.hh:194
OpenMesh::BaseKernel::_eprop
BaseProperty & _eprop(BaseHandle _h)
You should not use this function directly.
Definition BaseKernel.hh:664
OpenMesh::BaseKernel::_get_fprop
const BaseProperty * _get_fprop(const std::string &_name) const
You should not use this function directly.
Definition BaseKernel.hh:631
OpenMesh::BaseKernel::add_property
void add_property(MPropHandleT< T > &_ph, const std::string &_name="<mprop>")
You should not use this function directly.
Definition BaseKernel.hh:169
OpenMesh::BaseKernel::_add_eprop
size_t _add_eprop(BaseProperty *_bp)
You should not use this function directly.
Definition BaseKernel.hh:655
OpenMesh::BaseKernel::vprops_begin
prop_iterator vprops_begin()
You should not use this function directly.
Definition BaseKernel.hh:785
OpenMesh::BaseKernel::vprops_begin
const_prop_iterator vprops_begin() const
You should not use this function directly.
Definition BaseKernel.hh:787
OpenMesh::BaseKernel::eprops_swap
void eprops_swap(unsigned int _i0, unsigned int _i1) const
You should not use this function directly.
Definition BaseKernel.hh:737
OpenMesh::BaseKernel::vprops_swap
void vprops_swap(unsigned int _i0, unsigned int _i1) const
You should not use this function directly.
Definition BaseKernel.hh:719
OpenMesh::BaseKernel::n_mprops
size_t n_mprops(void) const
You should not use this function directly.
Definition BaseKernel.hh:605
OpenMesh::BaseKernel::hprops_end
prop_iterator hprops_end()
You should not use this function directly.
Definition BaseKernel.hh:796
OpenMesh::BaseKernel::_mprop
BaseProperty & _mprop(BaseHandle _h)
You should not use this function directly.
Definition BaseKernel.hh:670
OpenMesh::BaseKernel::property
PropertyT< T > & property(FPropHandleT< T > _ph)
In most cases you should use the convenient PropertyManager wrapper and use of this function should n...
Definition BaseKernel.hh:337
OpenMesh::BaseKernel::_get_vprop
BaseProperty * _get_vprop(const std::string &_name)
You should not use this function directly.
Definition BaseKernel.hh:607
OpenMesh::BaseKernel::_get_eprop
const BaseProperty * _get_eprop(const std::string &_name) const
You should not use this function directly.
Definition BaseKernel.hh:625
OpenMesh::BaseKernel::hprops_begin
prop_iterator hprops_begin()
You should not use this function directly.
Definition BaseKernel.hh:795
OpenMesh::BaseKernel::_get_fprop
BaseProperty * _get_fprop(const std::string &_name)
You should not use this function directly.
Definition BaseKernel.hh:616
OpenMesh::BaseKernel::_vprop
BaseProperty & _vprop(size_t _idx)
You should not use this function directly.
Definition BaseKernel.hh:637
OpenMesh::BaseKernel::mproperty
PropertyT< T > & mproperty(MPropHandleT< T > _ph)
In most cases you should use the convenient PropertyManager wrapper and use of this function should n...
Definition BaseKernel.hh:346
OpenMesh::BaseKernel::n_vprops
size_t n_vprops(void) const
You should not use this function directly.
Definition BaseKernel.hh:597
OpenMesh::BaseKernel::property
const PropertyT< T > & property(VPropHandleT< T > _ph) const
In most cases you should use the convenient PropertyManager wrapper and use of this function should n...
Definition BaseKernel.hh:314
OpenMesh::BaseKernel::_mprop
const BaseProperty & _mprop(BaseHandle _h) const
You should not use this function directly.
Definition BaseKernel.hh:681
OpenMesh::BaseKernel::copy_property
void copy_property(EPropHandleT< T > _ph, EdgeHandle _eh_from, EdgeHandle _eh_to)
You should not use this function directly.
Definition BaseKernel.hh:479
OpenMesh::BaseKernel::n_halfedges
virtual size_t n_halfedges() const
You should not use this function directly.
Definition BaseKernel.hh:689
OpenMesh::BaseKernel::property
const PropertyT< T > & property(EPropHandleT< T > _ph) const
In most cases you should use the convenient PropertyManager wrapper and use of this function should n...
Definition BaseKernel.hh:332
OpenMesh::BaseKernel::remove_property
void remove_property(HPropHandleT< T > &_ph)
You should not use this function directly.
Definition BaseKernel.hh:202
OpenMesh::BaseKernel::fprops_end
const_prop_iterator fprops_end() const
You should not use this function directly.
Definition BaseKernel.hh:803
OpenMesh::BaseKernel::hprops_resize
void hprops_resize(size_t _n) const
You should not use this function directly.
Definition BaseKernel.hh:724
OpenMesh::BaseKernel::vprops_end
const_prop_iterator vprops_end() const
You should not use this function directly.
Definition BaseKernel.hh:788
OpenMesh::BaseKernel::_eprop
BaseProperty & _eprop(size_t _idx)
You should not use this function directly.
Definition BaseKernel.hh:638
OpenMesh::BaseKernel::property
const PropertyT< T > & property(FPropHandleT< T > _ph) const
In most cases you should use the convenient PropertyManager wrapper and use of this function should n...
Definition BaseKernel.hh:341
OpenMesh::BaseKernel::eprops_begin
const_prop_iterator eprops_begin() const
You should not use this function directly.
Definition BaseKernel.hh:792
OpenMesh::BaseKernel::vprops_resize_if_smaller
void vprops_resize_if_smaller(size_t _n) const
Same as vprops_resize() but ignores vertex property vectors that have a size larger than _n.
Definition BaseKernel.hh:713
OpenMesh::BaseKernel::remove_property
void remove_property(FPropHandleT< T > &_ph)
You should not use this function directly.
Definition BaseKernel.hh:218
OpenMesh::BaseKernel::_fprop
BaseProperty & _fprop(size_t _idx)
You should not use this function directly.
Definition BaseKernel.hh:640
OpenMesh::BaseKernel::copy_all_kernel_properties
void copy_all_kernel_properties(const BaseKernel &_other)
copy_all_kernel_properties uses the = operator to copy all properties from a given other BaseKernel.
Definition BaseKernel.hh:585
OpenMesh::BaseKernel::copy_all_properties
void copy_all_properties(EdgeHandle _eh_from, EdgeHandle _eh_to, bool _copyBuildIn=false)
Copies all properties from one mesh element to another (of the same type).
Definition BaseKernel.hh:549
OpenMesh::BaseKernel::fprops_clear
void fprops_clear()
You should not use this function directly.
Definition BaseKernel.hh:743
OpenMesh::BaseKernel::n_hprops
size_t n_hprops(void) const
You should not use this function directly.
Definition BaseKernel.hh:601
OpenMesh::BaseKernel::_fprop
const BaseProperty & _fprop(size_t _idx) const
You should not use this function directly.
Definition BaseKernel.hh:649
OpenMesh::BaseKernel::_hprop
const BaseProperty & _hprop(size_t _idx) const
You should not use this function directly.
Definition BaseKernel.hh:647
OpenMesh::BaseKernel::_add_vprop
size_t _add_vprop(BaseProperty *_bp)
You should not use this function directly.
Definition BaseKernel.hh:654
OpenMesh::BaseKernel::property
PropertyT< T > & property(HPropHandleT< T > _ph)
In most cases you should use the convenient PropertyManager wrapper and use of this function should n...
Definition BaseKernel.hh:319
OpenMesh::BaseKernel::property
FPropHandleT< T >::reference property(FPropHandleT< T > _ph, FaceHandle _fh)
You should not use this function directly.
Definition BaseKernel.hh:408
OpenMesh::BaseKernel::hprops_begin
const_prop_iterator hprops_begin() const
You should not use this function directly.
Definition BaseKernel.hh:797
OpenMesh::BaseKernel::n_edges
virtual size_t n_edges() const
You should not use this function directly.
Definition BaseKernel.hh:690
OpenMesh::BaseKernel::vprops_reserve
void vprops_reserve(size_t _n) const
Reserves space for _n elements in all vertex property vectors.
Definition BaseKernel.hh:700
OpenMesh::BaseKernel::hprops_end
const_prop_iterator hprops_end() const
You should not use this function directly.
Definition BaseKernel.hh:798
OpenMesh::BaseKernel::fprops_begin
prop_iterator fprops_begin()
You should not use this function directly.
Definition BaseKernel.hh:800
OpenMesh::BaseKernel::copy_all_properties
void copy_all_properties(FaceHandle _fh_from, FaceHandle _fh_to, bool _copyBuildIn=false)
Copies all properties from one mesh element to another (of the same type).
Definition BaseKernel.hh:568
OpenMesh::BaseKernel::hprops_swap
void hprops_swap(unsigned int _i0, unsigned int _i1) const
You should not use this function directly.
Definition BaseKernel.hh:728
OpenMesh::BaseKernel::get_property_handle
bool get_property_handle(MPropHandleT< T > &_ph, const std::string &_name) const
You should not use this function directly.
Definition BaseKernel.hh:282
OpenMesh::BaseKernel::property
PropertyT< T > & property(VPropHandleT< T > _ph)
In most cases you should use the convenient PropertyManager wrapper and use of this function should n...
Definition BaseKernel.hh:310
OpenMesh::BaseKernel::eprops_end
const_prop_iterator eprops_end() const
You should not use this function directly.
Definition BaseKernel.hh:793
OpenMesh::BaseKernel::fprops_resize
void fprops_resize(size_t _n) const
You should not use this function directly.
Definition BaseKernel.hh:742
OpenMesh::BaseKernel::_add_hprop
size_t _add_hprop(BaseProperty *_bp)
You should not use this function directly.
Definition BaseKernel.hh:656
OpenMesh::BaseKernel::property
PropertyT< T > & property(EPropHandleT< T > _ph)
In most cases you should use the convenient PropertyManager wrapper and use of this function should n...
Definition BaseKernel.hh:328
OpenMesh::BaseKernel::mprops_end
prop_iterator mprops_end()
You should not use this function directly.
Definition BaseKernel.hh:806
OpenMesh::BaseKernel::_fprop
BaseProperty & _fprop(BaseHandle _h)
You should not use this function directly.
Definition BaseKernel.hh:668
OpenMesh::BaseKernel::add_property
void add_property(VPropHandleT< T > &_ph, const std::string &_name="<vprop>")
You should not use this function directly.
Definition BaseKernel.hh:141
OpenMesh::BaseKernel::fprops_begin
const_prop_iterator fprops_begin() const
You should not use this function directly.
Definition BaseKernel.hh:802
OpenMesh::BaseKernel::_hprop
const BaseProperty & _hprop(BaseHandle _h) const
You should not use this function directly.
Definition BaseKernel.hh:677
OpenMesh::BaseKernel::_vprop
const BaseProperty & _vprop(BaseHandle _h) const
You should not use this function directly.
Definition BaseKernel.hh:673
OpenMesh::BaseKernel::eprops_begin
prop_iterator eprops_begin()
You should not use this function directly.
Definition BaseKernel.hh:790
OpenMesh::BaseKernel::property
VPropHandleT< T >::reference property(VPropHandleT< T > _ph, VertexHandle _vh)
You should not use this function directly.
Definition BaseKernel.hh:369
OpenMesh::BaseKernel::property
MPropHandleT< T >::reference property(MPropHandleT< T > _ph)
You should not use this function directly.
Definition BaseKernel.hh:421
OpenMesh::BaseKernel::mprops_clear
void mprops_clear()
You should not use this function directly.
Definition BaseKernel.hh:751
OpenMesh::BaseKernel::property
EPropHandleT< T >::reference property(EPropHandleT< T > _ph, EdgeHandle _eh)
You should not use this function directly.
Definition BaseKernel.hh:395
OpenMesh::BaseKernel::mprops_end
const_prop_iterator mprops_end() const
You should not use this function directly.
Definition BaseKernel.hh:808
OpenMesh::BaseKernel::_mprop
const BaseProperty & _mprop(size_t _idx) const
You should not use this function directly.
Definition BaseKernel.hh:651
OpenMesh::BaseKernel::eprops_resize
void eprops_resize(size_t _n) const
You should not use this function directly.
Definition BaseKernel.hh:733
OpenMesh::BaseKernel::n_faces
virtual size_t n_faces() const
You should not use this function directly.
Definition BaseKernel.hh:691
OpenMesh::BaseKernel::property
HPropHandleT< T >::reference property(HPropHandleT< T > _ph, HalfedgeHandle _hh)
You should not use this function directly.
Definition BaseKernel.hh:382
OpenMesh::BaseKernel::copy_all_properties
void copy_all_properties(VertexHandle _vh_from, VertexHandle _vh_to, bool _copyBuildIn=false)
Copies all properties from one mesh element to another (of the same type).
Definition BaseKernel.hh:511
OpenMesh::BaseKernel::_hprop
BaseProperty & _hprop(size_t _idx)
You should not use this function directly.
Definition BaseKernel.hh:639
OpenMesh::BaseKernel::fprops_reserve
void fprops_reserve(size_t _n) const
You should not use this function directly.
Definition BaseKernel.hh:741
OpenMesh::BaseKernel::copy_all_properties
void copy_all_properties(HalfedgeHandle _hh_from, HalfedgeHandle _hh_to, bool _copyBuildIn=false)
Copies all properties from one mesh element to another (of the same type).
Definition BaseKernel.hh:530
OpenMesh::BaseKernel::_vprop
BaseProperty & _vprop(BaseHandle _h)
You should not use this function directly.
Definition BaseKernel.hh:662
OpenMesh::BaseKernel::fprops_swap
void fprops_swap(unsigned int _i0, unsigned int _i1) const
You should not use this function directly.
Definition BaseKernel.hh:746
OpenMesh::BaseKernel::get_property_handle
bool get_property_handle(VPropHandleT< T > &_ph, const std::string &_name) const
You should not use this function directly.
Definition BaseKernel.hh:254
OpenMesh::BaseKernel::get_property_handle
bool get_property_handle(FPropHandleT< T > &_ph, const std::string &_name) const
You should not use this function directly.
Definition BaseKernel.hh:275
OpenMesh::BaseKernel::eprops_end
prop_iterator eprops_end()
You should not use this function directly.
Definition BaseKernel.hh:791
OpenMesh::BaseKernel::_fprop
const BaseProperty & _fprop(BaseHandle _h) const
You should not use this function directly.
Definition BaseKernel.hh:679
OpenMesh::BaseKernel::remove_property
void remove_property(MPropHandleT< T > &_ph)
You should not use this function directly.
Definition BaseKernel.hh:226
OpenMesh::BaseKernel::eprops_clear
void eprops_clear()
You should not use this function directly.
Definition BaseKernel.hh:734
OpenMesh::BaseKernel::const_prop_iterator
PropertyContainer::const_iterator const_prop_iterator
You should not use this function directly.
Definition BaseKernel.hh:783
OpenMesh::BaseKernel::mprops_resize
void mprops_resize(size_t _n) const
You should not use this function directly.
Definition BaseKernel.hh:750
OpenMesh::BaseKernel::hprops_reserve
void hprops_reserve(size_t _n) const
You should not use this function directly.
Definition BaseKernel.hh:723
OpenMesh::BaseKernel::property
FPropHandleT< T >::const_reference property(FPropHandleT< T > _ph, FaceHandle _fh) const
You should not use this function directly.
Definition BaseKernel.hh:414
OpenMesh::BaseKernel::_add_mprop
size_t _add_mprop(BaseProperty *_bp)
You should not use this function directly.
Definition BaseKernel.hh:658
OpenMesh::BaseKernel::_mprop
BaseProperty & _mprop(size_t _idx)
You should not use this function directly.
Definition BaseKernel.hh:641
OpenMesh::BaseKernel::property
HPropHandleT< T >::const_reference property(HPropHandleT< T > _ph, HalfedgeHandle _hh) const
You should not use this function directly.
Definition BaseKernel.hh:388
OpenMesh::BaseKernel::property
EPropHandleT< T >::const_reference property(EPropHandleT< T > _ph, EdgeHandle _eh) const
You should not use this function directly.
Definition BaseKernel.hh:401
OpenMesh::BaseKernel::_get_mprop
BaseProperty * _get_mprop(const std::string &_name)
You should not use this function directly.
Definition BaseKernel.hh:619
OpenMesh::BaseKernel::_add_fprop
size_t _add_fprop(BaseProperty *_bp)
You should not use this function directly.
Definition BaseKernel.hh:657
OpenMesh::BaseKernel::add_property
void add_property(FPropHandleT< T > &_ph, const std::string &_name="<fprop>")
You should not use this function directly.
Definition BaseKernel.hh:162
OpenMesh::BaseKernel::vprops_resize
void vprops_resize(size_t _n) const
Resizes all vertex property vectors to the specified size.
Definition BaseKernel.hh:703
OpenMesh::BaseKernel::_get_vprop
const BaseProperty * _get_vprop(const std::string &_name) const
You should not use this function directly.
Definition BaseKernel.hh:622
OpenMesh::BaseKernel::add_property
void add_property(HPropHandleT< T > &_ph, const std::string &_name="<hprop>")
You should not use this function directly.
Definition BaseKernel.hh:148
OpenMesh::BaseKernel::_vprop
const BaseProperty & _vprop(size_t _idx) const
You should not use this function directly.
Definition BaseKernel.hh:643
OpenMesh::BaseKernel::_eprop
const BaseProperty & _eprop(BaseHandle _h) const
You should not use this function directly.
Definition BaseKernel.hh:675
OpenMesh::BaseKernel::copy_property
void copy_property(VPropHandleT< T > &_ph, VertexHandle _vh_from, VertexHandle _vh_to)
You should not use this function directly.
Definition BaseKernel.hh:447
OpenMesh::BaseKernel::eprops_reserve
void eprops_reserve(size_t _n) const
You should not use this function directly.
Definition BaseKernel.hh:732
OpenMesh::BaseKernel::mprops_begin
const_prop_iterator mprops_begin() const
You should not use this function directly.
Definition BaseKernel.hh:807
OpenMesh::BaseKernel::property
MPropHandleT< T >::const_reference property(MPropHandleT< T > _ph) const
You should not use this function directly.
Definition BaseKernel.hh:427
OpenMesh::BaseKernel::property
const PropertyT< T > & property(HPropHandleT< T > _ph) const
In most cases you should use the convenient PropertyManager wrapper and use of this function should n...
Definition BaseKernel.hh:323
OpenMesh::BaseKernel::copy_property
void copy_property(FPropHandleT< T > _ph, FaceHandle _fh_from, FaceHandle _fh_to)
You should not use this function directly.
Definition BaseKernel.hh:495
OpenMesh::BaseKernel::add_property
void add_property(EPropHandleT< T > &_ph, const std::string &_name="<eprop>")
You should not use this function directly.
Definition BaseKernel.hh:155
OpenMesh::BaseKernel::_get_hprop
BaseProperty * _get_hprop(const std::string &_name)
You should not use this function directly.
Definition BaseKernel.hh:613
OpenMesh::BaseKernel::mproperty
const PropertyT< T > & mproperty(MPropHandleT< T > _ph) const
In most cases you should use the convenient PropertyManager wrapper and use of this function should n...
Definition BaseKernel.hh:350
OpenMesh::BaseKernel::fprops_end
prop_iterator fprops_end()
You should not use this function directly.
Definition BaseKernel.hh:801
OpenMesh::BaseKernel::copy_property
void copy_property(HPropHandleT< T > _ph, HalfedgeHandle _hh_from, HalfedgeHandle _hh_to)
You should not use this function directly.
Definition BaseKernel.hh:463
OpenMesh::BaseKernel::n_elements
size_t n_elements() const
You should not use this function directly.
OpenMesh::BaseKernel::n_fprops
size_t n_fprops(void) const
You should not use this function directly.
Definition BaseKernel.hh:603
OpenMesh::BaseKernel::property
VPropHandleT< T >::const_reference property(VPropHandleT< T > _ph, VertexHandle _vh) const
You should not use this function directly.
Definition BaseKernel.hh:375
OpenMesh::BaseHandle
Base class for all handle types.
Definition Handles.hh:63
OpenMesh::BaseHandle::is_valid
bool is_valid() const
The handle is valid iff the index is not negative.
Definition Handles.hh:72
OpenMesh::BaseHandle::reset
void reset()
reset handle to be invalid
Definition Handles.hh:75
OpenMesh::BaseHandle::idx
int idx() const
Get the underlying index of this handle.
Definition Handles.hh:69
OpenMesh::VertexHandle
Handle for a vertex entity.
Definition Handles.hh:121
OpenMesh::HalfedgeHandle
Handle for a halfedge entity.
Definition Handles.hh:128
OpenMesh::EdgeHandle
Handle for a edge entity.
Definition Handles.hh:135
OpenMesh::FaceHandle
Handle for a face entity.
Definition Handles.hh:142
OpenMesh::BaseProperty
Abstract class defining the basic interface of a dynamic property.
Definition BaseProperty.hh:61
OpenMesh::PropertyT
Default property class for any type T.
Definition Property.hh:93
OpenMesh::VPropHandleT
Handle representing a vertex property.
Definition Property.hh:417
OpenMesh::HPropHandleT
Handle representing a halfedge property.
Definition Property.hh:432
OpenMesh::EPropHandleT
Handle representing an edge property.
Definition Property.hh:447
OpenMesh::FPropHandleT
Handle representing a face property.
Definition Property.hh:462
OpenMesh::MPropHandleT
Handle representing a mesh property.
Definition Property.hh:477
OpenMesh::PropertyContainer
A a container for properties.
Definition PropertyContainer.hh:59