VTK  9.3.20240328
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
35 #ifndef vtkReflectionFilter_h
36 #define vtkReflectionFilter_h
37 
38 #include "vtkDataObjectAlgorithm.h"
39 #include "vtkFiltersGeneralModule.h" // For export macro
40 
41 VTK_ABI_NAMESPACE_BEGIN
43 class vtkDataSet;
44 
45 class VTKFILTERSGENERAL_EXPORT vtkReflectionFilter : public vtkDataObjectAlgorithm
46 {
47 public:
49 
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
54  {
55  USE_X_MIN = 0,
56  USE_Y_MIN = 1,
57  USE_Z_MIN = 2,
58  USE_X_MAX = 3,
59  USE_Y_MAX = 4,
60  USE_Z_MAX = 5,
61  USE_X = 6,
62  USE_Y = 7,
63  USE_Z = 8
64  };
65 
67 
70  vtkSetClampMacro(Plane, int, 0, 8);
71  vtkGetMacro(Plane, int);
72  void SetPlaneToX() { this->SetPlane(USE_X); }
73  void SetPlaneToY() { this->SetPlane(USE_Y); }
74  void SetPlaneToZ() { this->SetPlane(USE_Z); }
75  void SetPlaneToXMin() { this->SetPlane(USE_X_MIN); }
76  void SetPlaneToYMin() { this->SetPlane(USE_Y_MIN); }
77  void SetPlaneToZMin() { this->SetPlane(USE_Z_MIN); }
78  void SetPlaneToXMax() { this->SetPlane(USE_X_MAX); }
79  void SetPlaneToYMax() { this->SetPlane(USE_Y_MAX); }
80  void SetPlaneToZMax() { this->SetPlane(USE_Z_MAX); }
82 
84 
88  vtkSetMacro(Center, double);
89  vtkGetMacro(Center, double);
91 
93 
97  vtkSetMacro(CopyInput, vtkTypeBool);
98  vtkGetMacro(CopyInput, vtkTypeBool);
99  vtkBooleanMacro(CopyInput, vtkTypeBool);
101 
103 
110  vtkSetMacro(FlipAllInputArrays, bool);
111  vtkGetMacro(FlipAllInputArrays, bool);
112  vtkBooleanMacro(FlipAllInputArrays, bool);
114 
115 protected:
118 
125 
129  virtual int RequestDataInternal(vtkDataSet* input, vtkUnstructuredGrid* output, double bounds[6]);
130 
134  virtual int ComputeBounds(vtkDataObject* input, double bounds[6]);
135 
140  vtkDataSet* input, vtkUnstructuredGrid* output, vtkIdType cellId, vtkIdType numInputPoints);
141 
144 
145  void FlipTuple(double* tuple, int* mirrorDir, int nComp);
146 
147  int Plane;
148  double Center;
151 
152 private:
153  vtkReflectionFilter(const vtkReflectionFilter&) = delete;
154  void operator=(const vtkReflectionFilter&) = delete;
155 };
156 
157 VTK_ABI_NAMESPACE_END
158 #endif
Superclass for algorithms that produce only data object as output.
general representation of visualization data
abstract class to specify dataset behavior
Definition: vtkDataSet.h:165
a simple class to control print indentation
Definition: vtkIndent.h:108
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