VTK: Filters/HyperTree/vtkHyperTreeGridAxisClip.h Source File

| VTK 9.3.1

vtkHyperTreeGridAxisClip.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
25 #ifndef vtkHyperTreeGridAxisClip_h
26 #define vtkHyperTreeGridAxisClip_h
27
28 #include "vtkFiltersHyperTreeModule.h" // For export macro
29 #include "vtkHyperTreeGridAlgorithm.h"
30
31 VTK_ABI_NAMESPACE_BEGIN
32 class vtkBitArray;
33 class vtkHyperTreeGrid;
34 class vtkQuadric;
35 class vtkHyperTreeGridNonOrientedCursor;
36 class vtkHyperTreeGridNonOrientedGeometryCursor;
37
38 class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridAxisClip : public vtkHyperTreeGridAlgorithm
39 {
40 public:
41 static vtkHyperTreeGridAxisClip* New();
42 vtkTypeMacro(vtkHyperTreeGridAxisClip, vtkHyperTreeGridAlgorithm);
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
51 enum ClipType
52 {
53 PLANE = 0,
54 BOX,
55 QUADRIC,
56 };
57
59
63 vtkSetClampMacro(ClipType, int, 0, 2);
64 vtkGetMacro(ClipType, int);
65 void SetClipTypeToPlane() { this->SetClipType(vtkHyperTreeGridAxisClip::PLANE); }
66 void SetClipTypeToBox() { this->SetClipType(vtkHyperTreeGridAxisClip::BOX); }
67 void SetClipTypeToQuadric() { this->SetClipType(vtkHyperTreeGridAxisClip::QUADRIC); }
69
71
75 vtkSetClampMacro(PlaneNormalAxis, int, 0, 2);
76 vtkGetMacro(PlaneNormalAxis, int);
78
80
84 vtkSetMacro(PlanePosition, double);
85 vtkGetMacro(PlanePosition, double);
87
89
92 vtkSetVector6Macro(Bounds, double);
93 vtkGetVectorMacro(Bounds, double, 6);
94 void GetMinimumBounds(double[3]);
95 void GetMaximumBounds(double[3]);
97
99
106 vtkSetMacro(InsideOut, bool);
107 vtkGetMacro(InsideOut, bool);
108 vtkBooleanMacro(InsideOut, bool);
110
112
115 virtual void SetQuadric(vtkQuadric*);
116 vtkGetObjectMacro(Quadric, vtkQuadric);
118
120
123 void SetQuadricCoefficients(double a, double b, double c, double d, double e, double f, double g,
124 double h, double i, double j)
125 {
126 double array[10] = { a, b, c, d, e, f, g, h, i, j };
127 this->SetQuadricCoefficients(array);
128 }
129 void SetQuadricCoefficients(double[10]);
130 void GetQuadricCoefficients(double[10]);
131 double* GetQuadricCoefficients();
133
137 vtkMTimeType GetMTime() override;
138
139 protected:
140 vtkHyperTreeGridAxisClip();
141 ~vtkHyperTreeGridAxisClip() override;
142
143 // For this algorithm the output is a vtkHyperTreeGrid instance
144 int FillOutputPortInformation(int, vtkInformation*) override;
145
149 bool IsClipped(vtkHyperTreeGridNonOrientedGeometryCursor*);
150
154 int ProcessTrees(vtkHyperTreeGrid*, vtkDataObject*) override;
155
159 void RecursivelyProcessTree(vtkHyperTreeGridNonOrientedGeometryCursor* inCursor,
160 vtkHyperTreeGridNonOrientedCursor* outCursor);
161
165 int ClipType;
166
170 int PlaneNormalAxis;
171
175 double PlanePosition;
176 double PlanePositionRealUse;
177
181 double Bounds[6];
182
186 vtkQuadric* Quadric;
187
191 bool InsideOut;
192
196 vtkBitArray* InMask;
197 vtkBitArray* OutMask;
198
202 vtkIdType CurrentId;
203
204 private:
205 vtkHyperTreeGridAxisClip(const vtkHyperTreeGridAxisClip&) = delete;
206 void operator=(const vtkHyperTreeGridAxisClip&) = delete;
207 };
208
209 VTK_ABI_NAMESPACE_END
210 #endif // vtkHyperTreeGridAxisClip_h
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:29
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkHyperTreeGridAlgorithm
Superclass for algorithms that produce a hyper tree grid as output.
Definition: vtkHyperTreeGridAlgorithm.h:37
vtkHyperTreeGridAxisClip
Axis aligned hyper tree grid clip.
Definition: vtkHyperTreeGridAxisClip.h:39
vtkHyperTreeGridAxisClip::RecursivelyProcessTree
void RecursivelyProcessTree(vtkHyperTreeGridNonOrientedGeometryCursor *inCursor, vtkHyperTreeGridNonOrientedCursor *outCursor)
Recursively descend into tree down to leaves.
vtkHyperTreeGridAxisClip::GetMinimumBounds
void GetMinimumBounds(double[3])
Set/get bounds of clipping box.
vtkHyperTreeGridAxisClip::GetMTime
vtkMTimeType GetMTime() override
Override GetMTime because we delegate to a vtkQuadric.
vtkHyperTreeGridAxisClip::PlaneNormalAxis
int PlaneNormalAxis
Direction of clipping plane normal.
Definition: vtkHyperTreeGridAxisClip.h:170
vtkHyperTreeGridAxisClip::PlanePosition
double PlanePosition
Intercept of clipping plane along normal.
Definition: vtkHyperTreeGridAxisClip.h:175
vtkHyperTreeGridAxisClip::PlanePositionRealUse
double PlanePositionRealUse
Definition: vtkHyperTreeGridAxisClip.h:176
vtkHyperTreeGridAxisClip::CurrentId
vtkIdType CurrentId
Keep track of current index in output hyper tree grid.
Definition: vtkHyperTreeGridAxisClip.h:202
vtkHyperTreeGridAxisClip::~vtkHyperTreeGridAxisClip
~vtkHyperTreeGridAxisClip() override
vtkHyperTreeGridAxisClip::ClipType
int ClipType
Type of clip to be performed.
Definition: vtkHyperTreeGridAxisClip.h:165
vtkHyperTreeGridAxisClip::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperTreeGridAxisClip::OutMask
vtkBitArray * OutMask
Definition: vtkHyperTreeGridAxisClip.h:197
vtkHyperTreeGridAxisClip::SetQuadricCoefficients
void SetQuadricCoefficients(double[10])
Helpers to set/get the 10 coefficients of the quadric function.
vtkHyperTreeGridAxisClip::ProcessTrees
int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *) override
Main routine to generate hyper tree grid clip.
vtkHyperTreeGridAxisClip::ClipType
ClipType
Methods by which the hyper tree grid input may be clipped: PLANE: Clip with an axis-aligned plane def...
Definition: vtkHyperTreeGridAxisClip.h:52
vtkHyperTreeGridAxisClip::PLANE
@ PLANE
Definition: vtkHyperTreeGridAxisClip.h:53
vtkHyperTreeGridAxisClip::QUADRIC
@ QUADRIC
Definition: vtkHyperTreeGridAxisClip.h:55
vtkHyperTreeGridAxisClip::BOX
@ BOX
Definition: vtkHyperTreeGridAxisClip.h:54
vtkHyperTreeGridAxisClip::SetQuadric
virtual void SetQuadric(vtkQuadric *)
Set/Get the clipping quadric function.
vtkHyperTreeGridAxisClip::New
static vtkHyperTreeGridAxisClip * New()
vtkHyperTreeGridAxisClip::GetQuadricCoefficients
double * GetQuadricCoefficients()
Helpers to set/get the 10 coefficients of the quadric function.
vtkHyperTreeGridAxisClip::InMask
vtkBitArray * InMask
Output material mask constructed by this filter.
Definition: vtkHyperTreeGridAxisClip.h:196
vtkHyperTreeGridAxisClip::vtkHyperTreeGridAxisClip
vtkHyperTreeGridAxisClip()
vtkHyperTreeGridAxisClip::InsideOut
bool InsideOut
Decide what is inside versus what is out.
Definition: vtkHyperTreeGridAxisClip.h:191
vtkHyperTreeGridAxisClip::IsClipped
bool IsClipped(vtkHyperTreeGridNonOrientedGeometryCursor *)
Decide whether the cell is clipped out.
vtkHyperTreeGridAxisClip::SetClipTypeToQuadric
void SetClipTypeToQuadric()
Set/get type of clip.
Definition: vtkHyperTreeGridAxisClip.h:67
vtkHyperTreeGridAxisClip::GetMaximumBounds
void GetMaximumBounds(double[3])
Set/get bounds of clipping box.
vtkHyperTreeGridAxisClip::SetClipTypeToPlane
void SetClipTypeToPlane()
Set/get type of clip.
Definition: vtkHyperTreeGridAxisClip.h:65
vtkHyperTreeGridAxisClip::GetQuadricCoefficients
void GetQuadricCoefficients(double[10])
Helpers to set/get the 10 coefficients of the quadric function.
vtkHyperTreeGridAxisClip::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Define default input and output port types.
vtkHyperTreeGridAxisClip::SetQuadricCoefficients
void SetQuadricCoefficients(double a, double b, double c, double d, double e, double f, double g, double h, double i, double j)
Helpers to set/get the 10 coefficients of the quadric function.
Definition: vtkHyperTreeGridAxisClip.h:123
vtkHyperTreeGridAxisClip::Quadric
vtkQuadric * Quadric
Coefficients of axis-aligned quadric.
Definition: vtkHyperTreeGridAxisClip.h:186
vtkHyperTreeGridAxisClip::SetClipTypeToBox
void SetClipTypeToBox()
Set/get type of clip.
Definition: vtkHyperTreeGridAxisClip.h:66
vtkHyperTreeGridNonOrientedCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedCursor.h:46
vtkHyperTreeGridNonOrientedGeometryCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedGeometryCursor.h:52
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:91
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkQuadric
evaluate implicit quadric function
Definition: vtkQuadric.h:32
h
Computes the portion of a dataset which is inside a selection.
vtkHyperTreeGridAlgorithm.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270