VTK
vtkOctreePointLocatorNode.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOctreePointLocatorNode.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*----------------------------------------------------------------------------
16  Copyright (c) Sandia Corporation
17  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18 ----------------------------------------------------------------------------*/
19 
36 #ifndef __vtkOctreePointLocatorNode_h
37 #define __vtkOctreePointLocatorNode_h
38 
39 #include "vtkObject.h"
40 
41 class vtkCell;
43 
45 {
46 public:
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
51 
53 
54  void SetNumberOfPoints(int numberOfPoints)
55  {
56  this->NumberOfPoints = numberOfPoints;
57  }
58  vtkGetMacro(NumberOfPoints, int);
60 
62 
64  void SetBounds(double xMin, double xMax, double yMin,
65  double yMax, double zMin, double zMax);
66  void SetBounds(double b[6])
67  {
68  this->SetBounds(b[0], b[1], b[2], b[3], b[4], b[5]);
69  }
70  void GetBounds(double *b) const;
72 
74 
77  void SetDataBounds(double xMin, double xMax, double yMin,
78  double yMax, double zMin, double zMax);
79  void GetDataBounds(double *b) const;
81 
82 //BTX
84 
86  vtkGetMacro(MinBounds, double*);
87  vtkGetMacro(MaxBounds, double*);
88 //ETX
90 
92 
93  void SetMinBounds(double minBounds[3])
94  {
95  this->MinBounds[0] = minBounds[0];
96  this->MinBounds[1] = minBounds[1];
97  this->MinBounds[2] = minBounds[2];
98  }
100 
102 
103  void SetMaxBounds(double maxBounds[3])
104  {
105  this->MaxBounds[0] = maxBounds[0];
106  this->MaxBounds[1] = maxBounds[1];
107  this->MaxBounds[2] = maxBounds[2];
108  }
110 
111 //BTX
113 
115  vtkGetMacro(MinDataBounds, double*);
116  vtkGetMacro(MaxDataBounds, double*);
117 //ETX
119 
121 
123  void SetMinDataBounds(double minDataBounds[3])
124  {
125  this->MinDataBounds[0] = minDataBounds[0];
126  this->MinDataBounds[1] = minDataBounds[1];
127  this->MinDataBounds[2] = minDataBounds[2];
128  }
130 
132 
134  void SetMaxDataBounds(double maxDataBounds[3])
135  {
136  this->MaxDataBounds[0] = maxDataBounds[0];
137  this->MaxDataBounds[1] = maxDataBounds[1];
138  this->MaxDataBounds[2] = maxDataBounds[2];
139  }
141 
143 
145  vtkGetMacro(ID, int);
147 
149 
153  vtkGetMacro(MinID, int);
155 
157  void CreateChildNodes();
158 
160  void DeleteChildNodes();
161 
163  vtkOctreePointLocatorNode* GetChild(int i);
164 
171  int IntersectsRegion(vtkPlanesIntersection *pi, int useDataBounds);
172 
176  int ContainsPoint(double x, double y, double z, int useDataBounds);
177 
179 
182  double GetDistance2ToBoundary(double x, double y, double z,
183  vtkOctreePointLocatorNode* top, int useDataBounds);
185 
187 
191  double GetDistance2ToBoundary(double x, double y, double z,
192  double *boundaryPt, vtkOctreePointLocatorNode* top,
193  int useDataBounds);
195 
197 
201  double GetDistance2ToInnerBoundary(double x, double y, double z,
204 
210  int GetSubOctantIndex(double* point, int CheckContainment);
211 
213 
216  void ComputeOctreeNodeInformation(vtkOctreePointLocatorNode* Parent,
217  int& NextLeafId, int & NextMinId,
218  float* coordinates);
220 
221 protected:
224 
225 private:
226 
227  double _GetDistance2ToBoundary(
228  double x, double y, double z, double *boundaryPt,
229  int innerBoundaryOnly, vtkOctreePointLocatorNode* top,
230  int useDataBounds);
231 
233  double MinBounds[3];
234 
236  double MaxBounds[3];
237 
240  double MinDataBounds[3];
241 
244  double MaxDataBounds[3];
245 
249  int NumberOfPoints;
250 
252  vtkOctreePointLocatorNode** Children;
253 
255  int ID;
256 
260  int MinID;
261 
262  vtkOctreePointLocatorNode(const vtkOctreePointLocatorNode&); // Not implemented
263  void operator=(const vtkOctreePointLocatorNode&); // Not implemented
264 };
265 
266 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:60
#define VTK_FILTERING_EXPORT
void SetMaxBounds(double maxBounds[3])
void SetNumberOfPoints(int numberOfPoints)
A vtkPlanesIntersection object is a vtkPlanes object that can compute whether the arbitrary convex re...
void SetMaxDataBounds(double maxDataBounds[3])
void SetMinBounds(double minBounds[3])
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
Octree node that has 8 children each of equal size.
static vtkObject * New()
void SetMinDataBounds(double minDataBounds[3])