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; }
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; }
143 {
return fund_cut_node_index_[0]; }
146 {
return fund_cut_node_index_[1]; }
149 {
return node_index_; }
155 { node_index_ = _node_index; }
158 { fund_cut_node_index_[0] = _node_index; }
161 { fund_cut_node_index_[1] = _node_index; }
193 #endif // OPENMESH_VDPROGMESH_VHIERARCHYNODE_HH defined VHierarchyNodeHandle lchild_handle()
Returns handle to left child.
Handle for a vertex entity.
VHierarchyNodeHandle rchild_handle()
Returns handle to right child.
std::list< VHierarchyNodeHandle > VHierarchyNodeHandleList
Container for vertex hierarchy node handles.
bool is_root() const
Returns true, if node is root else false.
VHierarchyNodeHandle parent_handle()
Returns parent handle.
bool is_leaf() const
Returns true, if node is leaf else false.
Base class for all handle types.
std::vector< VHierarchyNodeHandle > VHierarchyNodeHandleContainer
Container for vertex hierarchy node handles.
std::vector< VHierarchyNode > VHierarchyNodeContainer
Container for vertex hierarchy nodes.