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
25 #ifndef vtkReflectionFilter_h
26 #define vtkReflectionFilter_h
27 
28 #include "vtkDataObjectAlgorithm.h"
29 #include "vtkFiltersGeneralModule.h" // For export macro
30 
31 VTK_ABI_NAMESPACE_BEGIN
33 class vtkDataSet;
34 
35 class VTKFILTERSGENERAL_EXPORT vtkReflectionFilter : public vtkDataObjectAlgorithm
36 {
37 public:
39 
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44  {
45  USE_X_MIN = 0,
46  USE_Y_MIN = 1,
47  USE_Z_MIN = 2,
48  USE_X_MAX = 3,
49  USE_Y_MAX = 4,
50  USE_Z_MAX = 5,
51  USE_X = 6,
52  USE_Y = 7,
53  USE_Z = 8
54  };
55 
57 
60  vtkSetClampMacro(Plane, int, 0, 8);
61  vtkGetMacro(Plane, int);
62  void SetPlaneToX() { this->SetPlane(USE_X); }
63  void SetPlaneToY() { this->SetPlane(USE_Y); }
64  void SetPlaneToZ() { this->SetPlane(USE_Z); }
65  void SetPlaneToXMin() { this->SetPlane(USE_X_MIN); }
66  void SetPlaneToYMin() { this->SetPlane(USE_Y_MIN); }
67  void SetPlaneToZMin() { this->SetPlane(USE_Z_MIN); }
68  void SetPlaneToXMax() { this->SetPlane(USE_X_MAX); }
69  void SetPlaneToYMax() { this->SetPlane(USE_Y_MAX); }
70  void SetPlaneToZMax() { this->SetPlane(USE_Z_MAX); }
72 
74 
78  vtkSetMacro(Center, double);
79  vtkGetMacro(Center, double);
81 
83 
87  vtkSetMacro(CopyInput, vtkTypeBool);
88  vtkGetMacro(CopyInput, vtkTypeBool);
89  vtkBooleanMacro(CopyInput, vtkTypeBool);
91 
93 
100  vtkSetMacro(FlipAllInputArrays, bool);
101  vtkGetMacro(FlipAllInputArrays, bool);
102  vtkBooleanMacro(FlipAllInputArrays, bool);
104 
105 protected:
108 
115 
119  virtual int RequestDataInternal(vtkDataSet* input, vtkUnstructuredGrid* output, double bounds[6]);
120 
124  virtual int ComputeBounds(vtkDataObject* input, double bounds[6]);
125 
130  vtkDataSet* input, vtkUnstructuredGrid* output, vtkIdType cellId, vtkIdType numInputPoints);
131 
134 
135  void FlipTuple(double* tuple, int* mirrorDir, int nComp);
136 
137  int Plane;
138  double Center;
141 
142 private:
143  vtkReflectionFilter(const vtkReflectionFilter&) = delete;
144  void operator=(const vtkReflectionFilter&) = delete;
145 };
146 
147 VTK_ABI_NAMESPACE_END
148 #endif
Superclass for algorithms that produce only data object as output.
general representation of visualization data
Definition: vtkDataObject.h:64
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
a simple class to control print indentation
Definition: vtkIndent.h:38
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