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 Vertex hierarchy node.
Definition: VHierarchyNode.hh:95
Handle for a vertex entity.
Definition: Handles.hh:125
Index of vertex hierarchy node.
Definition: VHierarchyNodeIndex.hh:78
unsigned int id_t
Type for tree and node ids.
Definition: VHierarchy.hh:82
int idx() const
Get the underlying index of this handle.
Definition: Handles.hh:74
Handle for vertex hierarchy nodes.
Definition: VHierarchyNode.hh:82
Keeps the vertex hierarchy build during analyzing a progressive mesh.
Definition: VHierarchy.hh:78
std::vector< VHierarchyNode > VHierarchyNodeContainer
Container for vertex hierarchy nodes.
Definition: VHierarchyNode.hh:185
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64