VTK  9.2.5
vtkPlanes.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlanes.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 =========================================================================*/
151 #ifndef vtkPlanes_h
152 #define vtkPlanes_h
153 
154 #include "vtkCommonDataModelModule.h" // For export macro
155 #include "vtkImplicitFunction.h"
156 
157 class vtkPlane;
158 class vtkPoints;
159 class vtkDataArray;
160 
161 class VTKCOMMONDATAMODEL_EXPORT vtkPlanes : public vtkImplicitFunction
162 {
163 public:
165 
168  static vtkPlanes* New();
170  void PrintSelf(ostream& os, vtkIndent indent) override;
172 
174 
179  double EvaluateFunction(double x[3]) override;
181 
185  void EvaluateGradient(double x[3], double n[3]) override;
186 
188 
191  virtual void SetPoints(vtkPoints*);
192  vtkGetObjectMacro(Points, vtkPoints);
194 
196 
200  void SetNormals(vtkDataArray* normals);
201  vtkGetObjectMacro(Normals, vtkDataArray);
203 
208  void SetFrustumPlanes(double planes[24]);
209 
211 
216  void SetBounds(const double bounds[6]);
217  void SetBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
219 
224 
232 
238  void GetPlane(int i, vtkPlane* plane);
239 
240 protected:
242  ~vtkPlanes() override;
243 
247 
248 private:
249  double Planes[24];
250  double Bounds[6];
251 
252 private:
253  vtkPlanes(const vtkPlanes&) = delete;
254  void operator=(const vtkPlanes&) = delete;
255 };
256 
257 #endif
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:165
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
a simple class to control print indentation
Definition: vtkIndent.h:119
perform various plane computations
Definition: vtkPlane.h:146
implicit function for convex set of planes
Definition: vtkPlanes.h:162
void SetBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
An alternative method to specify six planes defined by a bounding box.
void GetPlane(int i, vtkPlane *plane)
If i is within the allowable range, mutates the given plane's Normal and Origin to match the vtkPlane...
void SetFrustumPlanes(double planes[24])
An alternative method to specify six planes defined by the camera view frustrum.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
virtual void SetPoints(vtkPoints *)
Specify a list of points defining points through which the planes pass.
~vtkPlanes() override
vtkPoints * Points
Definition: vtkPlanes.h:244
void SetBounds(const double bounds[6])
An alternative method to specify six planes defined by a bounding box.
int GetNumberOfPlanes()
Return the number of planes in the set of planes.
static vtkPlanes * New()
Standard methods for instantiation, type information, and printing.
double EvaluateFunction(double x[3]) override
Evaluate plane equations.
vtkPlane * GetPlane(int i)
Create and return a pointer to a vtkPlane object at the ith position.
vtkPlane * Plane
Definition: vtkPlanes.h:246
void EvaluateGradient(double x[3], double n[3]) override
Evaluate planes gradient.
void SetNormals(vtkDataArray *normals)
Specify a list of normal vectors for the planes.
vtkDataArray * Normals
Definition: vtkPlanes.h:245
represent and manipulate 3D points
Definition: vtkPoints.h:149