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 "vtkCommonDataModelModule.h" // For export macro
40 #include "vtkObject.h"
41 
42 class vtkCell;
44 
46 {
47 public:
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
52 
54 
55  void SetNumberOfPoints(int numberOfPoints)
56  {
57  this->NumberOfPoints = numberOfPoints;
58  }
59  vtkGetMacro(NumberOfPoints, int);
61 
63 
65  void SetBounds(double xMin, double xMax, double yMin,
66  double yMax, double zMin, double zMax);
67  void SetBounds(const double b[6])
68  {
69  this->SetBounds(b[0], b[1], b[2], b[3], b[4], b[5]);
70  }
71  void GetBounds(double *b) const;
73 
75 
78  void SetDataBounds(double xMin, double xMax, double yMin,
79  double yMax, double zMin, double zMax);
80  void GetDataBounds(double *b) const;
82 
83 //BTX
85 
87  vtkGetMacro(MinBounds, double*);
88  vtkGetMacro(MaxBounds, double*);
89 //ETX
91 
93 
94  void SetMinBounds(double minBounds[3])
95  {
96  this->MinBounds[0] = minBounds[0];
97  this->MinBounds[1] = minBounds[1];
98  this->MinBounds[2] = minBounds[2];
99  }
101 
103 
104  void SetMaxBounds(double maxBounds[3])
105  {
106  this->MaxBounds[0] = maxBounds[0];
107  this->MaxBounds[1] = maxBounds[1];
108  this->MaxBounds[2] = maxBounds[2];
109  }
111 
112 //BTX
114 
116  vtkGetMacro(MinDataBounds, double*);
117  vtkGetMacro(MaxDataBounds, double*);
118 //ETX
120 
122 
124  void SetMinDataBounds(double minDataBounds[3])
125  {
126  this->MinDataBounds[0] = minDataBounds[0];
127  this->MinDataBounds[1] = minDataBounds[1];
128  this->MinDataBounds[2] = minDataBounds[2];
129  }
131 
133 
135  void SetMaxDataBounds(double maxDataBounds[3])
136  {
137  this->MaxDataBounds[0] = maxDataBounds[0];
138  this->MaxDataBounds[1] = maxDataBounds[1];
139  this->MaxDataBounds[2] = maxDataBounds[2];
140  }
142 
144 
146  vtkGetMacro(ID, int);
148 
150 
154  vtkGetMacro(MinID, int);
156 
159 
162 
165 
172  int IntersectsRegion(vtkPlanesIntersection *pi, int useDataBounds);
173 
177  int ContainsPoint(double x, double y, double z, int useDataBounds);
178 
180 
183  double GetDistance2ToBoundary(double x, double y, double z,
184  vtkOctreePointLocatorNode* top, int useDataBounds);
186 
188 
192  double GetDistance2ToBoundary(double x, double y, double z,
193  double *boundaryPt, vtkOctreePointLocatorNode* top,
194  int useDataBounds);
196 
198 
202  double GetDistance2ToInnerBoundary(double x, double y, double z,
205 
211  int GetSubOctantIndex(double* point, int CheckContainment);
212 
214 
218  int& NextLeafId, int & NextMinId,
219  float* coordinates);
221 
222 protected:
225 
226 private:
227 
228  double _GetDistance2ToBoundary(
229  double x, double y, double z, double *boundaryPt,
230  int innerBoundaryOnly, vtkOctreePointLocatorNode* top,
231  int useDataBounds);
232 
234  double MinBounds[3];
235 
237  double MaxBounds[3];
238 
241  double MinDataBounds[3];
242 
245  double MaxDataBounds[3];
246 
250  int NumberOfPoints;
251 
253  vtkOctreePointLocatorNode** Children;
254 
256  int ID;
257 
261  int MinID;
262 
263  vtkOctreePointLocatorNode(const vtkOctreePointLocatorNode&); // Not implemented
264  void operator=(const vtkOctreePointLocatorNode&); // Not implemented
265 };
266 
267 #endif
vtkgl::z
GLdouble GLdouble z
Definition: vtkgl.h:11754
vtkOctreePointLocatorNode::IntersectsRegion
int IntersectsRegion(vtkPlanesIntersection *pi, int useDataBounds)
vtkOctreePointLocatorNode::SetBounds
void SetBounds(const double b[6])
Definition: vtkOctreePointLocatorNode.h:67
vtkgl::b
GLboolean GLboolean GLboolean b
Definition: vtkgl.h:12312
vtkOctreePointLocatorNode::ContainsPoint
int ContainsPoint(double x, double y, double z, int useDataBounds)
vtkOctreePointLocatorNode::CreateChildNodes
void CreateChildNodes()
vtkCommonDataModelModule.h
vtkOctreePointLocatorNode::GetDistance2ToInnerBoundary
double GetDistance2ToInnerBoundary(double x, double y, double z, vtkOctreePointLocatorNode *top)
vtkOctreePointLocatorNode::SetBounds
void SetBounds(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkOctreePointLocatorNode::SetMinBounds
void SetMinBounds(double minBounds[3])
Definition: vtkOctreePointLocatorNode.h:94
vtkOctreePointLocatorNode::~vtkOctreePointLocatorNode
~vtkOctreePointLocatorNode()
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkOctreePointLocatorNode::vtkOctreePointLocatorNode
vtkOctreePointLocatorNode()
vtkOctreePointLocatorNode
Octree node that has 8 children each of equal size.
Definition: vtkOctreePointLocatorNode.h:46
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkPlanesIntersection
A vtkPlanesIntersection object is a vtkPlanes object that can compute whether the arbitrary convex re...
Definition: vtkPlanesIntersection.h:52
vtkOctreePointLocatorNode::ComputeOctreeNodeInformation
void ComputeOctreeNodeInformation(vtkOctreePointLocatorNode *Parent, int &NextLeafId, int &NextMinId, float *coordinates)
vtkX3D::point
@ point
Definition: vtkX3D.h:236
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkOctreePointLocatorNode::GetSubOctantIndex
int GetSubOctantIndex(double *point, int CheckContainment)
vtkOctreePointLocatorNode::GetBounds
void GetBounds(double *b) const
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkOctreePointLocatorNode::GetDistance2ToBoundary
double GetDistance2ToBoundary(double x, double y, double z, vtkOctreePointLocatorNode *top, int useDataBounds)
vtkOctreePointLocatorNode::New
static vtkOctreePointLocatorNode * New()
vtkgl::top
GLdouble GLdouble GLdouble GLdouble top
Definition: vtkgl.h:18180
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkOctreePointLocatorNode::SetDataBounds
void SetDataBounds(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)
vtkOctreePointLocatorNode::SetMinDataBounds
void SetMinDataBounds(double minDataBounds[3])
Definition: vtkOctreePointLocatorNode.h:124
vtkObject.h
vtkgl::y
GLint GLint GLint GLint GLint GLint y
Definition: vtkgl.h:11318
vtkOctreePointLocatorNode::SetMaxDataBounds
void SetMaxDataBounds(double maxDataBounds[3])
Definition: vtkOctreePointLocatorNode.h:135
vtkOctreePointLocatorNode::SetMaxBounds
void SetMaxBounds(double maxBounds[3])
Definition: vtkOctreePointLocatorNode.h:104
vtkOctreePointLocatorNode::SetNumberOfPoints
void SetNumberOfPoints(int numberOfPoints)
Definition: vtkOctreePointLocatorNode.h:55
vtkOctreePointLocatorNode::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkOctreePointLocatorNode::GetDistance2ToBoundary
double GetDistance2ToBoundary(double x, double y, double z, double *boundaryPt, vtkOctreePointLocatorNode *top, int useDataBounds)
vtkOctreePointLocatorNode::DeleteChildNodes
void DeleteChildNodes()
vtkOctreePointLocatorNode::GetChild
vtkOctreePointLocatorNode * GetChild(int i)
vtkOctreePointLocatorNode::GetDataBounds
void GetDataBounds(double *b) const
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15