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 =========================================================================*/
37 #ifndef vtkReflectionFilter_h
38 #define vtkReflectionFilter_h
39 
40 #include "vtkDataObjectAlgorithm.h"
41 #include "vtkFiltersGeneralModule.h" // For export macro
42 
44 class vtkDataSet;
45 
46 class VTKFILTERSGENERAL_EXPORT vtkReflectionFilter : public vtkDataObjectAlgorithm
47 {
48 public:
50 
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
55  {
56  USE_X_MIN = 0,
57  USE_Y_MIN = 1,
58  USE_Z_MIN = 2,
59  USE_X_MAX = 3,
60  USE_Y_MAX = 4,
61  USE_Z_MAX = 5,
62  USE_X = 6,
63  USE_Y = 7,
64  USE_Z = 8
65  };
66 
68 
71  vtkSetClampMacro(Plane, int, 0, 8);
72  vtkGetMacro(Plane, int);
73  void SetPlaneToX() { this->SetPlane(USE_X); }
74  void SetPlaneToY() { this->SetPlane(USE_Y); }
75  void SetPlaneToZ() { this->SetPlane(USE_Z); }
76  void SetPlaneToXMin() { this->SetPlane(USE_X_MIN); }
77  void SetPlaneToYMin() { this->SetPlane(USE_Y_MIN); }
78  void SetPlaneToZMin() { this->SetPlane(USE_Z_MIN); }
79  void SetPlaneToXMax() { this->SetPlane(USE_X_MAX); }
80  void SetPlaneToYMax() { this->SetPlane(USE_Y_MAX); }
81  void SetPlaneToZMax() { this->SetPlane(USE_Z_MAX); }
83 
85 
89  vtkSetMacro(Center, double);
90  vtkGetMacro(Center, double);
92 
94 
98  vtkSetMacro(CopyInput, vtkTypeBool);
99  vtkGetMacro(CopyInput, vtkTypeBool);
100  vtkBooleanMacro(CopyInput, vtkTypeBool);
102 
104 
111  vtkSetMacro(FlipAllInputArrays, bool);
112  vtkGetMacro(FlipAllInputArrays, bool);
113  vtkBooleanMacro(FlipAllInputArrays, bool);
115 
116 protected:
119 
126 
130  virtual int RequestDataInternal(vtkDataSet* input, vtkUnstructuredGrid* output, double bounds[6]);
131 
135  virtual int ComputeBounds(vtkDataObject* input, double bounds[6]);
136 
141  vtkDataSet* input, vtkUnstructuredGrid* output, vtkIdType cellId, vtkIdType numInputPoints);
142 
145 
146  void FlipTuple(double* tuple, int* mirrorDir, int nComp);
147 
148  int Plane;
149  double Center;
152 
153 private:
154  vtkReflectionFilter(const vtkReflectionFilter&) = delete;
155  void operator=(const vtkReflectionFilter&) = delete;
156 };
157 
158 #endif
Superclass for algorithms that produce only data object as output.
general representation of visualization data
Definition: vtkDataObject.h:75
abstract class to specify dataset behavior
Definition: vtkDataSet.h:72
a simple class to control print indentation
Definition: vtkIndent.h:49
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:382
@ port
Definition: vtkX3D.h:453
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:332