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 =========================================================================*/
39 #ifndef vtkPlanes_h
40 #define vtkPlanes_h
41 
42 #include "vtkCommonDataModelModule.h" // For export macro
43 #include "vtkImplicitFunction.h"
44 
45 class vtkPlane;
46 class vtkPoints;
47 class vtkDataArray;
48 
49 class VTKCOMMONDATAMODEL_EXPORT vtkPlanes : public vtkImplicitFunction
50 {
51 public:
53 
56  static vtkPlanes *New();
58  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
61 
63 
68  double EvaluateFunction(double x[3]) override;
70 
74  void EvaluateGradient(double x[3], double n[3]) override;
75 
77 
80  virtual void SetPoints(vtkPoints*);
81  vtkGetObjectMacro(Points,vtkPoints);
83 
85 
89  void SetNormals(vtkDataArray* normals);
90  vtkGetObjectMacro(Normals,vtkDataArray);
92 
97  void SetFrustumPlanes(double planes[24]);
98 
100 
105  void SetBounds(const double bounds[6]);
106  void SetBounds(double xmin, double xmax, double ymin, double ymax,
107  double zmin, double zmax);
109 
113  int GetNumberOfPlanes();
114 
121  vtkPlane *GetPlane(int i);
122 
128  void GetPlane(int i, vtkPlane *plane);
129 
130 protected:
131  vtkPlanes();
132  ~vtkPlanes() override;
133 
137 
138 private:
139  double Planes[24];
140  double Bounds[6];
141 
142 private:
143  vtkPlanes(const vtkPlanes&) = delete;
144  void operator=(const vtkPlanes&) = delete;
145 };
146 
147 #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:136
implicit function for convex set of planes
Definition: vtkPlanes.h:49
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:134
a simple class to control print indentation
Definition: vtkIndent.h:33
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
perform various plane computations
Definition: vtkPlane.h:31
vtkDataArray * Normals
Definition: vtkPlanes.h:135
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:33