VTK  9.2.6
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 =========================================================================*/
28 #ifndef vtkReflectionFilter_h
29 #define vtkReflectionFilter_h
30 
31 #include "vtkDataObjectAlgorithm.h"
32 #include "vtkFiltersGeneralModule.h" // For export macro
33 
35 class vtkDataSet;
36 
37 class VTKFILTERSGENERAL_EXPORT vtkReflectionFilter : public vtkDataObjectAlgorithm
38 {
39 public:
40  static vtkReflectionFilter* New();
41 
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46  {
47  USE_X_MIN = 0,
48  USE_Y_MIN = 1,
49  USE_Z_MIN = 2,
50  USE_X_MAX = 3,
51  USE_Y_MAX = 4,
52  USE_Z_MAX = 5,
53  USE_X = 6,
54  USE_Y = 7,
55  USE_Z = 8
56  };
57 
59 
62  vtkSetClampMacro(Plane, int, 0, 8);
63  vtkGetMacro(Plane, int);
64  void SetPlaneToX() { this->SetPlane(USE_X); }
65  void SetPlaneToY() { this->SetPlane(USE_Y); }
66  void SetPlaneToZ() { this->SetPlane(USE_Z); }
67  void SetPlaneToXMin() { this->SetPlane(USE_X_MIN); }
68  void SetPlaneToYMin() { this->SetPlane(USE_Y_MIN); }
69  void SetPlaneToZMin() { this->SetPlane(USE_Z_MIN); }
70  void SetPlaneToXMax() { this->SetPlane(USE_X_MAX); }
71  void SetPlaneToYMax() { this->SetPlane(USE_Y_MAX); }
72  void SetPlaneToZMax() { this->SetPlane(USE_Z_MAX); }
74 
76 
80  vtkSetMacro(Center, double);
81  vtkGetMacro(Center, double);
83 
85 
89  vtkSetMacro(CopyInput, vtkTypeBool);
90  vtkGetMacro(CopyInput, vtkTypeBool);
91  vtkBooleanMacro(CopyInput, vtkTypeBool);
93 
95 
102  vtkSetMacro(FlipAllInputArrays, bool);
103  vtkGetMacro(FlipAllInputArrays, bool);
104  vtkBooleanMacro(FlipAllInputArrays, bool);
106 
107 protected:
109  ~vtkReflectionFilter() override;
110 
117 
121  virtual int RequestDataInternal(vtkDataSet* input, vtkUnstructuredGrid* output, double bounds[6]);
122 
126  virtual int ComputeBounds(vtkDataObject* input, double bounds[6]);
127 
131  virtual vtkIdType ReflectNon3DCell(
132  vtkDataSet* input, vtkUnstructuredGrid* output, vtkIdType cellId, vtkIdType numInputPoints);
133 
135  int FillInputPortInformation(int port, vtkInformation* info) override;
136 
137  void FlipTuple(double* tuple, int* mirrorDir, int nComp);
138 
139  int Plane;
140  double Center;
143 
144 private:
145  vtkReflectionFilter(const vtkReflectionFilter&) = delete;
146  void operator=(const vtkReflectionFilter&) = delete;
147 };
148 
149 #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:62
static vtkDataObjectAlgorithm * New()
void SetPlaneToZMax()
Set the normal of the plane to use as mirror.
int vtkIdType
Definition: vtkType.h:332
int vtkTypeBool
Definition: vtkABI.h:69
a simple class to control print indentation
Definition: vtkIndent.h:39
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:65
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.