⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basekernel.hh

📁 penMesh is a generic and efficient data structure for representing and manipulating polygonal meshes
💻 HH
📖 第 1 页 / 共 2 页
字号:
  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  /// \name Access a property element using a handle to a mesh item  //@{  /** Return value of property for an item   */  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];  }  //@}protected: //------------------------------------------------- low-level accesspublic: // 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 unsigned int n_vertices()  const { return 0; }  virtual unsigned int n_halfedges() const { return 0; }  virtual unsigned int n_edges()     const { return 0; }  virtual unsigned int n_faces()     const { return 0; }protected: //------------------------------------------- synchronize properties  void vprops_reserve(unsigned int _n) const { vprops_.reserve(_n); }  void vprops_resize(unsigned int _n) const { vprops_.resize(_n); }  void vprops_free_mem() const { vprops_.free_mem(); }  void vprops_swap(unsigned int _i0, unsigned int _i1) const {    vprops_.swap(_i0, _i1);  }  void hprops_reserve(unsigned int _n) const { hprops_.reserve(_n); }  void hprops_resize(unsigned int _n) const { hprops_.resize(_n); }  void hprops_free_mem() const { hprops_.free_mem(); }  void hprops_swap(unsigned int _i0, unsigned int _i1) const {    hprops_.swap(_i0, _i1);  }  void eprops_reserve(unsigned int _n) const { eprops_.reserve(_n); }  void eprops_resize(unsigned int _n) const { eprops_.resize(_n); }  void eprops_free_mem() const { eprops_.free_mem(); }  void eprops_swap(unsigned int _i0, unsigned int _i1) const {    eprops_.swap(_i0, _i1);  }  void fprops_reserve(unsigned int _n) const { fprops_.reserve(_n); }  void fprops_resize(unsigned int _n) const { fprops_.resize(_n); }  void fprops_free_mem() const { fprops_.free_mem(); }  void fprops_swap(unsigned int _i0, unsigned int _i1) const {    fprops_.swap(_i0, _i1);  }  void mprops_resize(unsigned int _n) const { mprops_.resize(_n); }public:  void property_stats(std::ostream& _ostr = std::clog) 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_;};//=============================================================================} // namespace OpenMesh//=============================================================================#endif // OPENMESH_BASE_KERNEL_HH defined//=============================================================================

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -