55 #ifndef OPENMESH_VDPROGMESH_VHIERARCHY_HH 56 #define OPENMESH_VDPROGMESH_VHIERARCHY_HH 62 #include <OpenMesh/Tools/VDPM/VHierarchyNode.hh> 87 unsigned int n_roots_;
88 unsigned char tree_id_bits_;
94 void clear() { nodes_.clear(); n_roots_ = 0; }
95 unsigned char tree_id_bits()
const {
return tree_id_bits_; }
96 unsigned int num_roots()
const {
return n_roots_; }
97 size_t num_nodes()
const {
return nodes_.size(); }
105 void set_num_roots(
unsigned int _n_roots);
115 return nodes_[_vhierarchynode_handle.
idx()];
121 return nodes_[_vhierarchynode_handle.
idx()];
133 {
return nodes_[_node_handle.
idx()].is_leaf(); }
136 {
return nodes_[_node_handle.
idx()].is_root(); }
141 return nodes_[_node_handle.
idx()].normal();
146 {
return nodes_[_node_handle.
idx()].node_index(); }
149 {
return nodes_[_node_handle.
idx()].node_index(); }
153 {
return nodes_[_node_handle.
idx()].fund_lcut_index(); }
156 {
return nodes_[_node_handle.
idx()].fund_lcut_index(); }
160 {
return nodes_[_node_handle.
idx()].fund_rcut_index(); }
163 {
return nodes_[_node_handle.
idx()].fund_rcut_index(); }
166 {
return nodes_[_node_handle.
idx()].vertex_handle(); }
169 {
return nodes_[_node_handle.
idx()].parent_handle(); }
172 {
return nodes_[_node_handle.
idx()].lchild_handle(); }
175 {
return nodes_[_node_handle.
idx()].rchild_handle(); }
192 #endif // OPENMESH_VDPROGMESH_VHIERARCHY_HH defined
int idx() const
Get the underlying index of this handle.
Handle for a vertex entity.
unsigned int id_t
Type for tree and node ids.
std::vector< VHierarchyNode > VHierarchyNodeContainer
Container for vertex hierarchy nodes.