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 =========================================================================*/
38 #ifndef vtkPlanes_h
39 #define vtkPlanes_h
40 
41 #include "vtkCommonDataModelModule.h" // For export macro
42 #include "vtkImplicitFunction.h"
43 
44 class vtkPlane;
45 class vtkPoints;
46 class vtkDataArray;
47 
48 class VTKCOMMONDATAMODEL_EXPORT vtkPlanes : public vtkImplicitFunction
49 {
50 public:
51  static vtkPlanes *New();
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
56 
60  double EvaluateFunction(double x[3]) override;
62 
66  void EvaluateGradient(double x[3], double n[3]) override;
67 
69 
72  virtual void SetPoints(vtkPoints*);
73  vtkGetObjectMacro(Points,vtkPoints);
75 
77 
81  void SetNormals(vtkDataArray* normals);
82  vtkGetObjectMacro(Normals,vtkDataArray);
84 
89  void SetFrustumPlanes(double planes[24]);
90 
92 
97  void SetBounds(const double bounds[6]);
98  void SetBounds(double xmin, double xmax, double ymin, double ymax,
99  double zmin, double zmax);
101 
105  int GetNumberOfPlanes();
106 
113  vtkPlane *GetPlane(int i);
114 
120  void GetPlane(int i, vtkPlane *plane);
121 
122 protected:
123  vtkPlanes();
124  ~vtkPlanes() override;
125 
129 
130 private:
131  double Planes[24];
132  double Bounds[6];
133 
134 private:
135  vtkPlanes(const vtkPlanes&) = delete;
136  void operator=(const vtkPlanes&) = delete;
137 };
138 
139 #endif
140 
141 
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:128
implicit function for convex set of planes
Definition: vtkPlanes.h:48
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:126
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:127
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