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 =========================================================================*/
44 #ifndef vtkPlanes_h
45 #define vtkPlanes_h
46 
47 #include "vtkCommonDataModelModule.h" // For export macro
48 #include "vtkImplicitFunction.h"
49 
50 class vtkPlane;
51 class vtkPoints;
52 class vtkDataArray;
53 
54 class VTKCOMMONDATAMODEL_EXPORT vtkPlanes : public vtkImplicitFunction
55 {
56 public:
57  static vtkPlanes *New();
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
62 
66  double EvaluateFunction(double x[3]) override;
68 
72  void EvaluateGradient(double x[3], double n[3]) override;
73 
75 
78  virtual void SetPoints(vtkPoints*);
79  vtkGetObjectMacro(Points,vtkPoints);
81 
83 
87  void SetNormals(vtkDataArray* normals);
88  vtkGetObjectMacro(Normals,vtkDataArray);
90 
95  void SetFrustumPlanes(double planes[24]);
96 
98 
103  void SetBounds(const double bounds[6]);
104  void SetBounds(double xmin, double xmax, double ymin, double ymax,
105  double zmin, double zmax);
107 
111  int GetNumberOfPlanes();
112 
119  vtkPlane *GetPlane(int i);
120 
126  void GetPlane(int i, vtkPlane *plane);
127 
128 protected:
129  vtkPlanes();
130  ~vtkPlanes() override;
131 
135 
136 private:
137  double Planes[24];
138  double Bounds[6];
139 
140 private:
141  vtkPlanes(const vtkPlanes&) = delete;
142  void operator=(const vtkPlanes&) = delete;
143 };
144 
145 #endif
146 
147 
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
vtkPlane * Plane
Definition: vtkPlanes.h:134
implicit function for convex set of planes
Definition: vtkPlanes.h:54
virtual void EvaluateGradient(double x[3], double g[3])=0
Evaluate function gradient at position x-y-z and pass back vector.
vtkPoints * Points
Definition: vtkPlanes.h:132
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
perform various plane computations
Definition: vtkPlane.h:37
vtkDataArray * Normals
Definition: vtkPlanes.h:133
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
represent and manipulate 3D points
Definition: vtkPoints.h:39