VTK  9.3.1
vtkReflectionFilter.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
16 #ifndef vtkReflectionFilter_h
17 #define vtkReflectionFilter_h
18 
19 #include "vtkDataObjectAlgorithm.h"
20 #include "vtkFiltersGeneralModule.h" // For export macro
21 
22 VTK_ABI_NAMESPACE_BEGIN
24 class vtkDataSet;
25 
26 class VTKFILTERSGENERAL_EXPORT vtkReflectionFilter : public vtkDataObjectAlgorithm
27 {
28 public:
29  static vtkReflectionFilter* New();
30 
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
35  {
36  USE_X_MIN = 0,
37  USE_Y_MIN = 1,
38  USE_Z_MIN = 2,
39  USE_X_MAX = 3,
40  USE_Y_MAX = 4,
41  USE_Z_MAX = 5,
42  USE_X = 6,
43  USE_Y = 7,
44  USE_Z = 8
45  };
46 
48 
51  vtkSetClampMacro(Plane, int, 0, 8);
52  vtkGetMacro(Plane, int);
53  void SetPlaneToX() { this->SetPlane(USE_X); }
54  void SetPlaneToY() { this->SetPlane(USE_Y); }
55  void SetPlaneToZ() { this->SetPlane(USE_Z); }
56  void SetPlaneToXMin() { this->SetPlane(USE_X_MIN); }
57  void SetPlaneToYMin() { this->SetPlane(USE_Y_MIN); }
58  void SetPlaneToZMin() { this->SetPlane(USE_Z_MIN); }
59  void SetPlaneToXMax() { this->SetPlane(USE_X_MAX); }
60  void SetPlaneToYMax() { this->SetPlane(USE_Y_MAX); }
61  void SetPlaneToZMax() { this->SetPlane(USE_Z_MAX); }
63 
65 
69  vtkSetMacro(Center, double);
70  vtkGetMacro(Center, double);
72 
74 
78  vtkSetMacro(CopyInput, vtkTypeBool);
79  vtkGetMacro(CopyInput, vtkTypeBool);
80  vtkBooleanMacro(CopyInput, vtkTypeBool);
82 
84 
91  vtkSetMacro(FlipAllInputArrays, bool);
92  vtkGetMacro(FlipAllInputArrays, bool);
93  vtkBooleanMacro(FlipAllInputArrays, bool);
95 
96 protected:
98  ~vtkReflectionFilter() override;
99 
106 
110  virtual int RequestDataInternal(vtkDataSet* input, vtkUnstructuredGrid* output, double bounds[6]);
111 
115  virtual int ComputeBounds(vtkDataObject* input, double bounds[6]);
116 
120  virtual vtkIdType ReflectNon3DCell(
121  vtkDataSet* input, vtkUnstructuredGrid* output, vtkIdType cellId, vtkIdType numInputPoints);
122 
124  int FillInputPortInformation(int port, vtkInformation* info) override;
125 
126  void FlipTuple(double* tuple, int* mirrorDir, int nComp);
127 
128  int Plane;
129  double Center;
132 
133 private:
134  vtkReflectionFilter(const vtkReflectionFilter&) = delete;
135  void operator=(const vtkReflectionFilter&) = delete;
136 };
137 
138 VTK_ABI_NAMESPACE_END
139 #endif
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
void SetPlaneToYMin()
Set the normal of the plane to use as mirror.
reflects a data set across a plane
void SetPlaneToXMax()
Set the normal of the plane to use as mirror.
Store vtkAlgorithm input/output information.
void SetPlaneToY()
Set the normal of the plane to use as mirror.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
static vtkDataObjectAlgorithm * New()
void SetPlaneToZMax()
Set the normal of the plane to use as mirror.
int vtkIdType
Definition: vtkType.h:315
int vtkTypeBool
Definition: vtkABI.h:64
a simple class to control print indentation
Definition: vtkIndent.h:28
void SetPlaneToXMin()
Set the normal of the plane to use as mirror.
dataset represents arbitrary combinations of all possible cell types
void SetPlaneToZMin()
Set the normal of the plane to use as mirror.
void SetPlaneToYMax()
Set the normal of the plane to use as mirror.
void SetPlaneToX()
Set the normal of the plane to use as mirror.
Superclass for algorithms that produce only data object as output.
void SetPlaneToZ()
Set the normal of the plane to use as mirror.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Store zero or more vtkInformation instances.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
general representation of visualization data
Definition: vtkDataObject.h:54
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.