VTK  9.2.6
vtkHyperTreeGridAxisClip.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkHyperTreeGridAxisClip.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=========================================================================*/
37#ifndef vtkHyperTreeGridAxisClip_h
38#define vtkHyperTreeGridAxisClip_h
39
40#include "vtkFiltersHyperTreeModule.h" // For export macro
42
43class vtkBitArray;
45class vtkQuadric;
48
49class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridAxisClip : public vtkHyperTreeGridAlgorithm
50{
51public:
54 void PrintSelf(ostream& os, vtkIndent indent) override;
55
63 {
64 PLANE = 0,
67 };
68
70
74 vtkSetClampMacro(ClipType, int, 0, 2);
75 vtkGetMacro(ClipType, int);
77 void SetClipTypeToBox() { this->SetClipType(vtkHyperTreeGridAxisClip::BOX); }
80
82
86 vtkSetClampMacro(PlaneNormalAxis, int, 0, 2);
87 vtkGetMacro(PlaneNormalAxis, int);
89
91
95 vtkSetMacro(PlanePosition, double);
96 vtkGetMacro(PlanePosition, double);
98
100
103 vtkSetVector6Macro(Bounds, double);
104 vtkGetVectorMacro(Bounds, double, 6);
105 void GetMinimumBounds(double[3]);
106 void GetMaximumBounds(double[3]);
108
110
117 vtkSetMacro(InsideOut, bool);
118 vtkGetMacro(InsideOut, bool);
119 vtkBooleanMacro(InsideOut, bool);
121
123
126 virtual void SetQuadric(vtkQuadric*);
127 vtkGetObjectMacro(Quadric, vtkQuadric);
129
131
134 void SetQuadricCoefficients(double a, double b, double c, double d, double e, double f, double g,
135 double h, double i, double j)
136 {
137 double array[10] = { a, b, c, d, e, f, g, h, i, j };
138 this->SetQuadricCoefficients(array);
139 }
140 void SetQuadricCoefficients(double[10]);
141 void GetQuadricCoefficients(double[10]);
144
149
150protected:
153
154 // For this algorithm the output is a vtkHyperTreeGrid instance
156
161
166
172
177
182
188
192 double Bounds[6];
193
198
203
209
214
215private:
217 void operator=(const vtkHyperTreeGridAxisClip&) = delete;
218};
219
220#endif // vtkHyperTreeGridAxisClip_h
dynamic, self-adjusting array of bits
Definition vtkBitArray.h:37
general representation of visualization data
Superclass for algorithms that produce a hyper tree grid as output.
Axis aligned hyper tree grid clip.
void RecursivelyProcessTree(vtkHyperTreeGridNonOrientedGeometryCursor *inCursor, vtkHyperTreeGridNonOrientedCursor *outCursor)
Recursively descend into tree down to leaves.
void GetMinimumBounds(double[3])
Set/get bounds of clipping box.
vtkMTimeType GetMTime() override
Override GetMTime because we delegate to a vtkQuadric.
int PlaneNormalAxis
Direction of clipping plane normal.
double PlanePosition
Intercept of clipping plane along normal.
vtkIdType CurrentId
Keep track of current index in output hyper tree grid.
~vtkHyperTreeGridAxisClip() override
int ClipType
Type of clip to be performed.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetQuadricCoefficients(double[10])
Helpers to set/get the 10 coefficients of the quadric function.
int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *) override
Main routine to generate hyper tree grid clip.
ClipType
Methods by which the hyper tree grid input may be clipped: PLANE: Clip with an axis-aligned plane def...
virtual void SetQuadric(vtkQuadric *)
Set/Get the clipping quadric function.
vtkBitArray * InMask
Output material mask constructed by this filter.
static vtkHyperTreeGridAxisClip * New()
bool InsideOut
Decide what is inside versus what is out.
bool IsClipped(vtkHyperTreeGridNonOrientedGeometryCursor *)
Decide whether the cell is clipped out.
void SetClipTypeToQuadric()
Set/get type of clip.
void GetMaximumBounds(double[3])
Set/get bounds of clipping box.
double * GetQuadricCoefficients()
Helpers to set/get the 10 coefficients of the quadric function.
void SetClipTypeToPlane()
Set/get type of clip.
void GetQuadricCoefficients(double[10])
Helpers to set/get the 10 coefficients of the quadric function.
int FillOutputPortInformation(int, vtkInformation *) override
Define default input and output port types.
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.
vtkQuadric * Quadric
Coefficients of axis-aligned quadric.
void SetClipTypeToBox()
Set/get type of clip.
Objects for traversal a HyperTreeGrid.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
a simple class to control print indentation
Definition vtkIndent.h:40
Store vtkAlgorithm input/output information.
evaluate implicit quadric function
Definition vtkQuadric.h:34
Computes the portion of a dataset which is inside a selection.
int vtkIdType
Definition vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287