50 #ifndef OPENMESH_VDPROGMESH_VHIERARCHYNODE_HH 
   51 #define OPENMESH_VDPROGMESH_VHIERARCHYNODE_HH 
   59 #include <OpenMesh/Core/Geometry/VectorT.hh> 
   60 #include <OpenMesh/Core/Mesh/Handles.hh> 
   61 #include <OpenMesh/Tools/VDPM/VHierarchyNodeIndex.hh> 
   94   VHierarchyNode() :radius_(0.0f), normal_(0.0f), sin_square_(0.0f),mue_square_(0.0f), sigma_square_(0.0f) { }
 
   98   { 
return (parent_handle_.
is_valid() == 
false) ? true : 
false; }
 
  102   { 
return (lchild_handle_.
is_valid() == 
false) ? true : 
false; }
 
  115   { parent_handle_ = _parent_handle; }
 
  118   { lchild_handle_ = _lchild_handle; }
 
  120   VertexHandle vertex_handle()
 const                  { 
return vh_; }
 
  121   float radius()
 const                                { 
return radius_; }
 
  123   float sin_square()
 const                            { 
return sin_square_; }
 
  124   float mue_square()
 const                            { 
return mue_square_; }
 
  125   float sigma_square()
 const                          { 
return sigma_square_; }
 
  128   void set_radius(
float _radius)                      { radius_ = _radius; }
 
  131   void set_sin_square(
float _sin_square)      { sin_square_ = _sin_square; }
 
  132   void set_mue_square(
float _mue_square)      { mue_square_ = _mue_square; }
 
  133   void set_sigma_square(
float _sigma_square)  { sigma_square_ = _sigma_square; }
 
  135   void set_semi_angle(
float _semi_angle) 
 
  136   { 
float f=sinf(_semi_angle); sin_square_ = f*f; }
 
  138   void set_mue(
float _mue)                        { mue_square_ = _mue * _mue; }
 
  139   void set_sigma(
float _sigma)              { sigma_square_ = _sigma * _sigma; }
 
  141   const VHierarchyNodeIndex& node_index()
 const         { 
return  node_index_; }
 
  142   const VHierarchyNodeIndex& fund_lcut_index()
 const  
  143   { 
return  fund_cut_node_index_[0]; }
 
  145   const VHierarchyNodeIndex& fund_rcut_index()
 const 
  146   { 
return  fund_cut_node_index_[1]; }
 
  148   VHierarchyNodeIndex& node_index()
 
  149   { 
return  node_index_; }
 
  151   VHierarchyNodeIndex& fund_lcut_index()   { 
return  fund_cut_node_index_[0]; }
 
  152   VHierarchyNodeIndex& fund_rcut_index()   { 
return  fund_cut_node_index_[1]; }
 
  154   void set_index(
const VHierarchyNodeIndex &_node_index)
 
  155   { node_index_ = _node_index; }
 
  157   void set_fund_lcut(
const VHierarchyNodeIndex &_node_index)
 
  158   { fund_cut_node_index_[0] = _node_index; }
 
  160   void set_fund_rcut(
const VHierarchyNodeIndex &_node_index)
 
  161   { fund_cut_node_index_[1] = _node_index; }
 
  171   VHierarchyNodeHandle    parent_handle_;
 
  172   VHierarchyNodeHandle    lchild_handle_;
 
  175   VHierarchyNodeIndex     node_index_;
 
  176   VHierarchyNodeIndex     fund_cut_node_index_[2];
 
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
 
VectorT< float, 3 > Vec3f
3-float vector
Definition: Vector11T.hh:850
 
std::vector< VHierarchyNode > VHierarchyNodeContainer
Container for vertex hierarchy nodes.
Definition: VHierarchyNode.hh:180
 
std::vector< VHierarchyNodeHandle > VHierarchyNodeHandleContainer
Container for vertex hierarchy node handles.
Definition: VHierarchyNode.hh:183
 
std::list< VHierarchyNodeHandle > VHierarchyNodeHandleList
Container for vertex hierarchy node handles.
Definition: VHierarchyNode.hh:186
 
Base class for all handle types.
Definition: Handles.hh:63
 
bool is_valid() const
The handle is valid iff the index is not negative.
Definition: Handles.hh:72
 
int idx() const
Get the underlying index of this handle.
Definition: Handles.hh:69
 
Handle for a vertex entity.
Definition: Handles.hh:121
 
Handle for vertex hierarchy nodes
Definition: VHierarchyNode.hh:78
 
Vertex hierarchy node.
Definition: VHierarchyNode.hh:91
 
VHierarchyNodeHandle rchild_handle()
Returns handle to right child.
Definition: VHierarchyNode.hh:111
 
bool is_leaf() const
Returns true, if node is leaf else false.
Definition: VHierarchyNode.hh:101
 
bool is_root() const
Returns true, if node is root else false.
Definition: VHierarchyNode.hh:97
 
VHierarchyNodeHandle lchild_handle()
Returns handle to left child.
Definition: VHierarchyNode.hh:108
 
VHierarchyNodeHandle parent_handle()
Returns parent handle.
Definition: VHierarchyNode.hh:105