VTK  9.3.0
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:
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:
99 
106 
110  virtual int RequestDataInternal(vtkDataSet* input, vtkUnstructuredGrid* output, double bounds[6]);
111 
115  virtual int ComputeBounds(vtkDataObject* input, double bounds[6]);
116 
121  vtkDataSet* input, vtkUnstructuredGrid* output, vtkIdType cellId, vtkIdType numInputPoints);
122 
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
Superclass for algorithms that produce only data object as output.
general representation of visualization data
Definition: vtkDataObject.h:55
abstract class to specify dataset behavior
Definition: vtkDataSet.h:53
a simple class to control print indentation
Definition: vtkIndent.h:29
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.
void SetPlaneToY()
Set the normal of the plane to use as mirror.
void SetPlaneToZMin()
Set the normal of the plane to use as mirror.
virtual int RequestDataInternal(vtkDataSet *input, vtkUnstructuredGrid *output, double bounds[6])
Actual implementation for reflection.
void SetPlaneToX()
Set the normal of the plane to use as mirror.
void SetPlaneToYMin()
Set the normal of the plane to use as mirror.
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.
void SetPlaneToXMax()
Set the normal of the plane to use as mirror.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
void SetPlaneToZMax()
Set the normal of the plane to use as mirror.
void SetPlaneToYMax()
Set the normal of the plane to use as mirror.
virtual int ComputeBounds(vtkDataObject *input, double bounds[6])
Internal method to compute bounds.
void SetPlaneToZ()
Set the normal of the plane to use as mirror.
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.
void SetPlaneToXMin()
Set the normal of the plane to use as mirror.
~vtkReflectionFilter() override
dataset represents arbitrary combinations of all possible cell types
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
int vtkTypeBool
Definition: vtkABI.h:64
int vtkIdType
Definition: vtkType.h:315