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
50class vtkPlane;
51class vtkPoints;
52class vtkDataArray;
53
54class VTKCOMMONDATAMODEL_EXPORT vtkPlanes : public vtkImplicitFunction
55{
56public:
57 static vtkPlanes *New();
59 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
60
62
65 double EvaluateFunction(double x[3]) VTK_OVERRIDE;
66 double EvaluateFunction(double x, double y, double z)
67 {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
69
73 void EvaluateGradient(double x[3], double n[3]) VTK_OVERRIDE;
74
76
79 virtual void SetPoints(vtkPoints*);
80 vtkGetObjectMacro(Points,vtkPoints);
82
84
88 void SetNormals(vtkDataArray* normals);
89 vtkGetObjectMacro(Normals,vtkDataArray);
91
96 void SetFrustumPlanes(double planes[24]);
97
99
104 void SetBounds(const double bounds[6]);
105 void SetBounds(double xmin, double xmax, double ymin, double ymax,
106 double zmin, double zmax);
108
113
121
127 void GetPlane(int i, vtkPlane *plane);
128
129protected:
131 ~vtkPlanes() VTK_OVERRIDE;
132
133 vtkPoints *Points;
134 vtkDataArray *Normals;
135 vtkPlane *Plane;
136
137private:
138 double Planes[24];
139 double Bounds[6];
140
141private:
142 vtkPlanes(const vtkPlanes&) VTK_DELETE_FUNCTION;
143 void operator=(const vtkPlanes&) VTK_DELETE_FUNCTION;
144};
145
146#endif
147
148
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
a simple class to control print indentation
Definition: vtkIndent.h:40
perform various plane computations
Definition: vtkPlane.h:38
implicit function for convex set of planes
Definition: vtkPlanes.h:55
void SetBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
static vtkPlanes * New()
double EvaluateFunction(double x, double y, double z)
Definition: vtkPlanes.h:66
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...
void SetFrustumPlanes(double planes[24])
An alternative method to specify six planes defined by the camera view frustrum.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPlane * GetPlane(int i)
Create and return a pointer to a vtkPlane object at the ith position.
virtual void SetPoints(vtkPoints *)
Specify a list of points defining points through which the planes pass.
~vtkPlanes() override
void SetBounds(const double bounds[6])
An alternative method to specify six planes defined by a bounding box.
int GetNumberOfPlanes()
Return the number of planes in the set of planes.
double EvaluateFunction(double x[3]) override
Evaluate plane equations.
void EvaluateGradient(double x[3], double n[3]) override
Evaluate planes gradient.
void SetNormals(vtkDataArray *normals)
Specify a list of normal vectors for the planes.
represent and manipulate 3D points
Definition: vtkPoints.h:40