VTK  9.0.1
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 =========================================================================*/
34 #ifndef vtkHyperTreeGridAxisClip_h
35 #define vtkHyperTreeGridAxisClip_h
36 
37 #include "vtkFiltersHyperTreeModule.h" // For export macro
39 
40 class vtkBitArray;
41 class vtkHyperTreeGrid;
42 class vtkQuadric;
45 
46 class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridAxisClip : public vtkHyperTreeGridAlgorithm
47 {
48 public:
49  static vtkHyperTreeGridAxisClip* New();
51  void PrintSelf(ostream&, vtkIndent) override;
52 
59  enum ClipType
60  {
61  PLANE = 0,
62  BOX,
64  };
65 
67 
71  vtkSetClampMacro(ClipType, int, 0, 2);
72  vtkGetMacro(ClipType, int);
73  void SetClipTypeToPlane() { this->SetClipType(vtkHyperTreeGridAxisClip::PLANE); }
74  void SetClipTypeToBox() { this->SetClipType(vtkHyperTreeGridAxisClip::BOX); }
77 
79 
83  vtkSetClampMacro(PlaneNormalAxis, int, 0, 2);
84  vtkGetMacro(PlaneNormalAxis, int);
86 
88 
92  vtkSetMacro(PlanePosition, double);
93  vtkGetMacro(PlanePosition, double);
95 
97 
100  vtkSetVector6Macro(Bounds, double);
101  vtkGetVectorMacro(Bounds, double, 6);
102  void GetMinimumBounds(double[3]);
103  void GetMaximumBounds(double[3]);
105 
107 
114  vtkSetMacro(InsideOut, bool);
115  vtkGetMacro(InsideOut, bool);
116  vtkBooleanMacro(InsideOut, bool);
118 
120 
123  virtual void SetQuadric(vtkQuadric*);
124  vtkGetObjectMacro(Quadric, vtkQuadric);
126 
128 
131  void SetQuadricCoefficients(double a, double b, double c, double d, double e, double f, double g,
132  double h, double i, double j)
133  {
134  double array[10] = { a, b, c, d, e, f, g, h, i, j };
135  this->SetQuadricCoefficients(array);
136  }
137  void SetQuadricCoefficients(double[10]);
138  void GetQuadricCoefficients(double[10]);
139  double* GetQuadricCoefficients();
141 
145  vtkMTimeType GetMTime() override;
146 
147 protected:
149  ~vtkHyperTreeGridAxisClip() override;
150 
151  // For this algorithm the output is a vtkHyperTreeGrid instance
152  int FillOutputPortInformation(int, vtkInformation*) override;
153 
158 
163 
167  void RecursivelyProcessTree(vtkHyperTreeGridNonOrientedGeometryCursor* inCursor,
169 
173  int ClipType;
174 
179 
185 
189  double Bounds[6];
190 
195 
199  bool InsideOut;
200 
206 
211 
212 private:
214  void operator=(const vtkHyperTreeGridAxisClip&) = delete;
215 };
216 
217 #endif // vtkHyperTreeGridAxisClip_h
vtkHyperTreeGridAxisClip::Quadric
vtkQuadric * Quadric
Coefficients of axis-aligned quadric.
Definition: vtkHyperTreeGridAxisClip.h:194
vtkHyperTreeGridNonOrientedGeometryCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedGeometryCursor.h:56
vtkHyperTreeGridAxisClip::QUADRIC
@ QUADRIC
Definition: vtkHyperTreeGridAxisClip.h:63
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkHyperTreeGridAxisClip::InsideOut
bool InsideOut
Decide what is inside versus what is out.
Definition: vtkHyperTreeGridAxisClip.h:199
vtkHyperTreeGridAxisClip::SetClipTypeToBox
void SetClipTypeToBox()
Definition: vtkHyperTreeGridAxisClip.h:74
vtkHyperTreeGridAlgorithm::ProcessTrees
virtual int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *)=0
Main routine to process individual trees in the grid This is pure virtual method to be implemented by...
vtkHyperTreeGridAxisClip::SetClipTypeToPlane
void SetClipTypeToPlane()
Definition: vtkHyperTreeGridAxisClip.h:73
vtkHyperTreeGridAlgorithm.h
vtkHyperTreeGridNonOrientedCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedCursor.h:50
vtkHyperTreeGridAxisClip::ClipType
int ClipType
Type of clip to be performed.
Definition: vtkHyperTreeGridAxisClip.h:173
vtkQuadric
evaluate implicit quadric function
Definition: vtkQuadric.h:30
vtkHyperTreeGridAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperTreeGridAxisClip::PlanePosition
double PlanePosition
Intercept of clipping plane along normal.
Definition: vtkHyperTreeGridAxisClip.h:183
vtkHyperTreeGridAxisClip::OutMask
vtkBitArray * OutMask
Definition: vtkHyperTreeGridAxisClip.h:205
vtkHyperTreeGridAxisClip::BOX
@ BOX
Definition: vtkHyperTreeGridAxisClip.h:62
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
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:131
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkHyperTreeGridAxisClip::SetClipTypeToQuadric
void SetClipTypeToQuadric()
Definition: vtkHyperTreeGridAxisClip.h:75
vtkHyperTreeGridAxisClip::PLANE
@ PLANE
Definition: vtkHyperTreeGridAxisClip.h:61
vtkHyperTreeGridAxisClip
Axis aligned hyper tree grid clip.
Definition: vtkHyperTreeGridAxisClip.h:46
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkHyperTreeGridAxisClip::PlanePositionRealUse
double PlanePositionRealUse
Definition: vtkHyperTreeGridAxisClip.h:184
vtkHyperTreeGridAlgorithm::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkHyperTreeGridAxisClip::PlaneNormalAxis
int PlaneNormalAxis
Direction of clipping plane normal.
Definition: vtkHyperTreeGridAxisClip.h:178
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:59
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:33
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkHyperTreeGridAlgorithm
Superclass for algorithms that produce a hyper tree grid as output.
Definition: vtkHyperTreeGridAlgorithm.h:47
h
vtkHyperTreeGridAxisClip::CurrentId
vtkIdType CurrentId
Keep track of current index in output hyper tree grid.
Definition: vtkHyperTreeGridAxisClip.h:210
vtkHyperTreeGridAxisClip::InMask
vtkBitArray * InMask
Output material mask constructed by this filter.
Definition: vtkHyperTreeGridAxisClip.h:204
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:96
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293