VTK  9.0.1
vtkReflectionFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkReflectionFilter.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 =========================================================================*/
25 #ifndef vtkReflectionFilter_h
26 #define vtkReflectionFilter_h
27 
28 #include "vtkDataObjectAlgorithm.h"
29 #include "vtkFiltersGeneralModule.h" // For export macro
30 
32 class vtkDataSet;
33 
34 class VTKFILTERSGENERAL_EXPORT vtkReflectionFilter : public vtkDataObjectAlgorithm
35 {
36 public:
38 
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43  {
44  USE_X_MIN = 0,
45  USE_Y_MIN = 1,
46  USE_Z_MIN = 2,
47  USE_X_MAX = 3,
48  USE_Y_MAX = 4,
49  USE_Z_MAX = 5,
50  USE_X = 6,
51  USE_Y = 7,
52  USE_Z = 8
53  };
54 
56 
59  vtkSetClampMacro(Plane, int, 0, 8);
60  vtkGetMacro(Plane, int);
61  void SetPlaneToX() { this->SetPlane(USE_X); }
62  void SetPlaneToY() { this->SetPlane(USE_Y); }
63  void SetPlaneToZ() { this->SetPlane(USE_Z); }
64  void SetPlaneToXMin() { this->SetPlane(USE_X_MIN); }
65  void SetPlaneToYMin() { this->SetPlane(USE_Y_MIN); }
66  void SetPlaneToZMin() { this->SetPlane(USE_Z_MIN); }
67  void SetPlaneToXMax() { this->SetPlane(USE_X_MAX); }
68  void SetPlaneToYMax() { this->SetPlane(USE_Y_MAX); }
69  void SetPlaneToZMax() { this->SetPlane(USE_Z_MAX); }
71 
73 
77  vtkSetMacro(Center, double);
78  vtkGetMacro(Center, double);
80 
82 
86  vtkSetMacro(CopyInput, vtkTypeBool);
87  vtkGetMacro(CopyInput, vtkTypeBool);
88  vtkBooleanMacro(CopyInput, vtkTypeBool);
90 
92 
99  vtkSetMacro(FlipAllInputArrays, bool);
100  vtkGetMacro(FlipAllInputArrays, bool);
101  vtkBooleanMacro(FlipAllInputArrays, bool);
103 
104 protected:
107 
114 
118  virtual int RequestDataInternal(vtkDataSet* input, vtkUnstructuredGrid* output, double bounds[6]);
119 
123  virtual int ComputeBounds(vtkDataObject* input, double bounds[6]);
124 
129  vtkDataSet* input, vtkUnstructuredGrid* output, vtkIdType cellId, vtkIdType numInputPoints);
130 
133 
134  void FlipTuple(double* tuple, int* mirrorDir, int nComp);
135 
136  int Plane;
137  double Center;
140 
141 private:
142  vtkReflectionFilter(const vtkReflectionFilter&) = delete;
143  void operator=(const vtkReflectionFilter&) = delete;
144 };
145 
146 #endif
Superclass for algorithms that produce only data object as output.
general representation of visualization data
Definition: vtkDataObject.h:60
abstract class to specify dataset behavior
Definition: vtkDataSet.h:57
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
reflects a data set across a plane
static vtkReflectionFilter * New()
virtual vtkIdType ReflectNon3DCell(vtkDataSet *input, vtkUnstructuredGrid *output, vtkIdType cellId, vtkIdType numInputPoints)
Generate new, non-3D cell and return the generated cells id.
virtual int RequestDataInternal(vtkDataSet *input, vtkUnstructuredGrid *output, double bounds[6])
Actual implementation for reflection.
void FlipTuple(double *tuple, int *mirrorDir, int nComp)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
virtual int ComputeBounds(vtkDataObject *input, double bounds[6])
Internal method to compute bounds.
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
~vtkReflectionFilter() override
dataset represents arbitrary combinations of all possible cell types
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:338