VTK  9.0.20210223
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 =========================================================================*/
25 #ifndef vtkReflectionFilter_h
26 #define vtkReflectionFilter_h
27 
28 #include "vtkDataObjectAlgorithm.h"
29 #include "vtkFiltersGeneralModule.h" // For export macro
30 
32 class vtkDataSet;
33 
34 class VTKFILTERSGENERAL_EXPORT vtkReflectionFilter : public vtkDataObjectAlgorithm
35 {
36 public:
37  static vtkReflectionFilter* New();
38 
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43  {
44  USE_X_MIN = 0,
45  USE_Y_MIN = 1,
46  USE_Z_MIN = 2,
47  USE_X_MAX = 3,
48  USE_Y_MAX = 4,
49  USE_Z_MAX = 5,
50  USE_X = 6,
51  USE_Y = 7,
52  USE_Z = 8
53  };
54 
56 
59  vtkSetClampMacro(Plane, int, 0, 8);
60  vtkGetMacro(Plane, int);
61  void SetPlaneToX() { this->SetPlane(USE_X); }
62  void SetPlaneToY() { this->SetPlane(USE_Y); }
63  void SetPlaneToZ() { this->SetPlane(USE_Z); }
64  void SetPlaneToXMin() { this->SetPlane(USE_X_MIN); }
65  void SetPlaneToYMin() { this->SetPlane(USE_Y_MIN); }
66  void SetPlaneToZMin() { this->SetPlane(USE_Z_MIN); }
67  void SetPlaneToXMax() { this->SetPlane(USE_X_MAX); }
68  void SetPlaneToYMax() { this->SetPlane(USE_Y_MAX); }
69  void SetPlaneToZMax() { this->SetPlane(USE_Z_MAX); }
71 
73 
77  vtkSetMacro(Center, double);
78  vtkGetMacro(Center, double);
80 
82 
86  vtkSetMacro(CopyInput, vtkTypeBool);
87  vtkGetMacro(CopyInput, vtkTypeBool);
88  vtkBooleanMacro(CopyInput, vtkTypeBool);
90 
92 
99  vtkSetMacro(FlipAllInputArrays, bool);
100  vtkGetMacro(FlipAllInputArrays, bool);
101  vtkBooleanMacro(FlipAllInputArrays, bool);
103 
104 protected:
106  ~vtkReflectionFilter() override;
107 
114 
118  virtual int RequestDataInternal(vtkDataSet* input, vtkUnstructuredGrid* output, double bounds[6]);
119 
123  virtual int ComputeBounds(vtkDataObject* input, double bounds[6]);
124 
128  virtual vtkIdType ReflectNon3DCell(
129  vtkDataSet* input, vtkUnstructuredGrid* output, vtkIdType cellId, vtkIdType numInputPoints);
130 
132  int FillInputPortInformation(int port, vtkInformation* info) override;
133 
134  void FlipTuple(double* tuple, int* mirrorDir, int nComp);
135 
136  int Plane;
137  double Center;
140 
141 private:
142  vtkReflectionFilter(const vtkReflectionFilter&) = delete;
143  void operator=(const vtkReflectionFilter&) = delete;
144 };
145 
146 #endif
vtkReflectionFilter::SetPlaneToZ
void SetPlaneToZ()
Definition: vtkReflectionFilter.h:63
vtkDataObjectAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkReflectionFilter::Center
double Center
Definition: vtkReflectionFilter.h:137
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkReflectionFilter::SetPlaneToZMin
void SetPlaneToZMin()
Definition: vtkReflectionFilter.h:66
vtkReflectionFilter::SetPlaneToYMax
void SetPlaneToYMax()
Definition: vtkReflectionFilter.h:68
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkDataObjectAlgorithm
Superclass for algorithms that produce only data object as output.
Definition: vtkDataObjectAlgorithm.h:43
vtkX3D::port
Definition: vtkX3D.h:453
vtkReflectionFilter::CopyInput
vtkTypeBool CopyInput
Definition: vtkReflectionFilter.h:138
vtkReflectionFilter::SetPlaneToY
void SetPlaneToY()
Definition: vtkReflectionFilter.h:62
vtkReflectionFilter::SetPlaneToYMin
void SetPlaneToYMin()
Definition: vtkReflectionFilter.h:65
vtkReflectionFilter
reflects a data set across a plane
Definition: vtkReflectionFilter.h:34
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkReflectionFilter::SetPlaneToX
void SetPlaneToX()
Definition: vtkReflectionFilter.h:61
vtkReflectionFilter::SetPlaneToXMin
void SetPlaneToXMin()
Definition: vtkReflectionFilter.h:64
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkReflectionFilter::SetPlaneToZMax
void SetPlaneToZMax()
Definition: vtkReflectionFilter.h:69
vtkX3D::info
Definition: vtkX3D.h:382
vtkReflectionFilter::Plane
int Plane
Definition: vtkReflectionFilter.h:136
vtkReflectionFilter::FlipAllInputArrays
bool FlipAllInputArrays
Definition: vtkReflectionFilter.h:139
vtkDataObjectAlgorithm::New
static vtkDataObjectAlgorithm * New()
vtkDataObjectAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Definition: vtkDataObjectAlgorithm.h:116
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:93
vtkDataObjectAlgorithm.h
vtkDataObjectAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkReflectionFilter::ReflectionPlane
ReflectionPlane
Definition: vtkReflectionFilter.h:42
vtkDataObjectAlgorithm::RequestDataObject
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkDataObjectAlgorithm.h:102
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkReflectionFilter::SetPlaneToXMax
void SetPlaneToXMax()
Definition: vtkReflectionFilter.h:67
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69