VTK  9.3.0
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
36VTK_ABI_NAMESPACE_BEGIN
37class vtkPlane;
38class vtkPoints;
39class vtkDataArray;
40
41class VTKCOMMONDATAMODEL_EXPORT vtkPlanes : public vtkImplicitFunction
42{
43public:
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
104
112
118 void GetPlane(int i, vtkPlane* plane);
119
120protected:
122 ~vtkPlanes() override;
123
127
128private:
129 double Planes[24];
130 double Bounds[6];
131
132 vtkPlanes(const vtkPlanes&) = delete;
133 void operator=(const vtkPlanes&) = delete;
134};
135
136VTK_ABI_NAMESPACE_END
137#endif
abstract superclass for arrays of numeric data
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:29
perform various plane computations
Definition vtkPlane.h:26
implicit function for convex set of planes
Definition vtkPlanes.h:42
void SetBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
An alternative method to specify six planes defined by a bounding box.
static vtkPlanes * New()
Standard methods for instantiation, type information, and printing.
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
Standard methods for instantiation, type information, and printing.
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
vtkPoints * Points
Definition vtkPlanes.h:124
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.
vtkPlane * Plane
Definition vtkPlanes.h:126
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.
vtkDataArray * Normals
Definition vtkPlanes.h:125
represent and manipulate 3D points
Definition vtkPoints.h:29