Go to the documentation of this file. 1 #ifndef vtkLabelHierarchyPrivate_h
2 #define vtkLabelHierarchyPrivate_h
7 #include "octree/octree"
54 this->Hierarchy =
src.Hierarchy;
72 if (0 == this->Hierarchy)
88 class LabelSet :
public std::multiset<vtkIdType,PriorityComparator>
96 for (
int i = 0; i < 3; ++ i )
107 for (
int i = 0; i < 3; ++ i )
118 for (
int i = 0; i < 3; ++ i )
128 std::multiset<vtkIdType,PriorityComparator>::operator = ( rhs );
131 for (
int i = 0; i < 3; ++ i )
147 this->insert( anchor );
202 for (
int i = 0; i < 3; ++ i )
211 double sz2 = this->Size / 2.;
213 for (
int i = 0; i <
self->num_children(); ++ i )
215 for (
int j = 0; j < 2; ++ j )
217 x[j] = this->
Center[j] + ( ( i & (1<<j) ) ? 0.5 : -0.5 ) * sz2 ;
220 (*self)[i].value().SetGeometry(
x, sz2 );
226 double sz2 = this->Size / 2.;
228 for (
int i = 0; i <
self->num_children(); ++ i )
230 for (
int j = 0; j < 3; ++ j )
232 x[j] = this->
Center[j] + ( ( i & (1<<j) ) ? 0.5 : -0.5 ) * sz2 ;
234 (*self)[i].value().SetGeometry(
x, sz2 );
240 self->add_children( emptyNode );
241 this->SetChildGeometry(
self );
246 self->add_children( emptyNode );
247 this->SetChildGeometry(
self );
250 #endif // vtkLabelHierarchyPrivate_h
void DropAnchor2(vtkIdType anchor)
PriorityComparator & operator=(const PriorityComparator &rhs)
PriorityComparator(const PriorityComparator &src)
octree< LabelSet >::cursor HierarchyCursor3
GLboolean GLboolean GLboolean b
GLfloat GLfloat GLfloat GLfloat h
void DropAnchor3(vtkIdType anchor)
HierarchyType2 * Hierarchy2
contains an octree of labels
void SmudgeAnchor2(HierarchyCursor2 &cursor, vtkIdType anchor, double *x)
vtkIdType GetLocalAnchorCount() const
record modification and/or execution time
void AddChildren(octree< LabelSet, 2 >::octree_node_pointer self, LabelSet &emptyNode)
bool ComparePriorities(vtkIdType a, vtkIdType b)
void RecursiveNodeDivide(HierarchyCursor3 &cursor)
bool operator()(const vtkIdType &a, const vtkIdType &b)
GLint GLint GLint GLint GLint x
abstract superclass for arrays of numeric data
void SetChildGeometry(octree< LabelSet, 2 >::octree_node_pointer self)
void PrepareSortedAnchors(LabelSet &anchors)
GLuint GLsizei GLsizei * length
vtkTimeStamp HierarchyTime
void RecursiveNodeDivide(HierarchyCursor2 &cursor)
const GLuint const GLclampf * priorities
void SetGeometry(const double center[3], double length)
LabelSet & operator=(const LabelSet &rhs)
HierarchyType3::size_type ActualDepth
HierarchyType3 * Hierarchy3
PriorityComparator(vtkLabelHierarchy *h)
const double * GetCenter() const
LabelSet(const LabelSet &src)
vtkIdType GetTotalAnchorCount() const
LabelSet(vtkLabelHierarchy *hierarchy)
GLboolean GLboolean GLboolean GLboolean a
virtual vtkDataArray * GetPriorities()
void BinAnchorsToLevel(int level)
octree< LabelSet, 2 >::iterator HierarchyIterator2
vtkLabelHierarchy * Hierarchy
void Insert(vtkIdType anchor)
static vtkLabelHierarchy * Current
octree< LabelSet, 2 > HierarchyType2
#define vtkGenericWarningMacro(x)
octree< LabelSet, 2 >::cursor HierarchyCursor2
octree< LabelSet >::iterator HierarchyIterator3
octree< LabelSet > HierarchyType3
Implementation * GetImplementation()
void SmudgeAnchor3(HierarchyCursor3 &cursor, vtkIdType anchor, double *x)
void FillHierarchyRoot(LabelSet &anchors)
void DemoteAnchors(int level)