50 #ifndef OPENMESH_VDPROGMESH_VHIERARCHY_HH 51 #define OPENMESH_VDPROGMESH_VHIERARCHY_HH 57 #include <OpenMesh/Tools/VDPM/VHierarchyNode.hh> 82 unsigned int n_roots_;
83 unsigned char tree_id_bits_;
89 void clear() { nodes_.clear(); n_roots_ = 0; }
90 unsigned char tree_id_bits()
const {
return tree_id_bits_; }
91 unsigned int num_roots()
const {
return n_roots_; }
92 size_t num_nodes()
const {
return nodes_.size(); }
100 void set_num_roots(
unsigned int _n_roots);
110 return nodes_[_vhierarchynode_handle.
idx()];
116 return nodes_[_vhierarchynode_handle.
idx()];
128 {
return nodes_[_node_handle.
idx()].is_leaf(); }
131 {
return nodes_[_node_handle.
idx()].is_root(); }
136 return nodes_[_node_handle.
idx()].normal();
141 {
return nodes_[_node_handle.
idx()].node_index(); }
144 {
return nodes_[_node_handle.
idx()].node_index(); }
148 {
return nodes_[_node_handle.
idx()].fund_lcut_index(); }
151 {
return nodes_[_node_handle.
idx()].fund_lcut_index(); }
155 {
return nodes_[_node_handle.
idx()].fund_rcut_index(); }
158 {
return nodes_[_node_handle.
idx()].fund_rcut_index(); }
161 {
return nodes_[_node_handle.
idx()].vertex_handle(); }
164 {
return nodes_[_node_handle.
idx()].parent_handle(); }
167 {
return nodes_[_node_handle.
idx()].lchild_handle(); }
170 {
return nodes_[_node_handle.
idx()].rchild_handle(); }
187 #endif // OPENMESH_VDPROGMESH_VHIERARCHY_HH defined
int idx() const
Get the underlying index of this handle.
Handle for a vertex entity.
std::vector< VHierarchyNode > VHierarchyNodeContainer
Container for vertex hierarchy nodes.
unsigned int id_t
Type for tree and node ids.