VTK  9.3.1
vtkPlanes.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
30 #ifndef vtkPlanes_h
31 #define vtkPlanes_h
32 
33 #include "vtkCommonDataModelModule.h" // For export macro
34 #include "vtkImplicitFunction.h"
35 
36 VTK_ABI_NAMESPACE_BEGIN
37 class vtkPlane;
38 class vtkPoints;
39 class vtkDataArray;
40 
41 class VTKCOMMONDATAMODEL_EXPORT vtkPlanes : public vtkImplicitFunction
42 {
43 public:
45 
48  static vtkPlanes* New();
50  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
54 
59  double EvaluateFunction(double x[3]) override;
61 
65  void EvaluateGradient(double x[3], double n[3]) override;
66 
68 
71  virtual void SetPoints(vtkPoints*);
72  vtkGetObjectMacro(Points, vtkPoints);
74 
76 
80  void SetNormals(vtkDataArray* normals);
81  vtkGetObjectMacro(Normals, vtkDataArray);
83 
88  void SetFrustumPlanes(double planes[24]);
89 
91 
96  void SetBounds(const double bounds[6]);
97  void SetBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
99 
103  int GetNumberOfPlanes();
104 
111  vtkPlane* GetPlane(int i);
112 
118  void GetPlane(int i, vtkPlane* plane);
119 
120 protected:
121  vtkPlanes();
122  ~vtkPlanes() override;
123 
127 
128 private:
129  double Planes[24];
130  double Bounds[6];
131 
132  vtkPlanes(const vtkPlanes&) = delete;
133  void operator=(const vtkPlanes&) = delete;
134 };
135 
136 VTK_ABI_NAMESPACE_END
137 #endif
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:126
implicit function for convex set of planes
Definition: vtkPlanes.h:41
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:124
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
perform various plane computations
Definition: vtkPlane.h:25
vtkDataArray * Normals
Definition: vtkPlanes.h:125
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:28