VTK
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 =========================================================================*/
45 #ifndef vtkPlanes_h
46 #define vtkPlanes_h
47 
48 #include "vtkCommonDataModelModule.h" // For export macro
49 #include "vtkImplicitFunction.h"
50 
51 class vtkPlane;
52 class vtkPoints;
53 class vtkDataArray;
54 
55 class VTKCOMMONDATAMODEL_EXPORT vtkPlanes : public vtkImplicitFunction
56 {
57 public:
59 
62  static vtkPlanes *New();
64  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
67 
69 
74  double EvaluateFunction(double x[3]) override;
76 
80  void EvaluateGradient(double x[3], double n[3]) override;
81 
83 
86  virtual void SetPoints(vtkPoints*);
87  vtkGetObjectMacro(Points,vtkPoints);
89 
91 
95  void SetNormals(vtkDataArray* normals);
96  vtkGetObjectMacro(Normals,vtkDataArray);
98 
103  void SetFrustumPlanes(double planes[24]);
104 
106 
111  void SetBounds(const double bounds[6]);
112  void SetBounds(double xmin, double xmax, double ymin, double ymax,
113  double zmin, double zmax);
115 
120 
128 
134  void GetPlane(int i, vtkPlane *plane);
135 
136 protected:
138  ~vtkPlanes() override;
139 
143 
144 private:
145  double Planes[24];
146  double Bounds[6];
147 
148 private:
149  vtkPlanes(const vtkPlanes&) = delete;
150  void operator=(const vtkPlanes&) = delete;
151 };
152 
153 #endif
vtkPlanes::SetNormals
void SetNormals(vtkDataArray *normals)
Specify a list of normal vectors for the planes.
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:40
vtkPlane
perform various plane computations
Definition: vtkPlane.h:38
vtkPlanes::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPlanes::EvaluateGradient
void EvaluateGradient(double x[3], double n[3]) override
Evaluate planes gradient.
vtkImplicitFunction::EvaluateFunction
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
vtkPlanes::SetFrustumPlanes
void SetFrustumPlanes(double planes[24])
An alternative method to specify six planes defined by the camera view frustrum.
vtkPlanes::Points
vtkPoints * Points
Definition: vtkPlanes.h:140
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkPlanes
implicit function for convex set of planes
Definition: vtkPlanes.h:56
vtkPlanes::SetBounds
void SetBounds(const double bounds[6])
An alternative method to specify six planes defined by a bounding box.
vtkPlanes::Normals
vtkDataArray * Normals
Definition: vtkPlanes.h:141
vtkImplicitFunction
abstract interface for implicit functions
Definition: vtkImplicitFunction.h:61
vtkPlanes::GetNumberOfPlanes
int GetNumberOfPlanes()
Return the number of planes in the set of planes.
vtkPlanes::GetPlane
vtkPlane * GetPlane(int i)
Create and return a pointer to a vtkPlane object at the ith position.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkPlanes::GetPlane
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...
vtkPlanes::~vtkPlanes
~vtkPlanes() override
vtkPlanes::SetPoints
virtual void SetPoints(vtkPoints *)
Specify a list of points defining points through which the planes pass.
vtkPlanes::New
static vtkPlanes * New()
Standard methods for instantiation, type information, and printing.
vtkImplicitFunction.h
vtkPlanes::SetBounds
void SetBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
vtkPlanes::EvaluateFunction
double EvaluateFunction(double x[3]) override
Evaluate function at position x-y-z and return value.
vtkPlanes::vtkPlanes
vtkPlanes()
vtkPlanes::Plane
vtkPlane * Plane
Definition: vtkPlanes.h:142