VTK  9.1.0
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 =========================================================================*/
44 #ifndef vtkReflectionFilter_h
45 #define vtkReflectionFilter_h
46 
47 #include "vtkDataObjectAlgorithm.h"
48 #include "vtkFiltersGeneralModule.h" // For export macro
49 
51 class vtkDataSet;
52 
53 class VTKFILTERSGENERAL_EXPORT vtkReflectionFilter : public vtkDataObjectAlgorithm
54 {
55 public:
57 
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
62  {
63  USE_X_MIN = 0,
64  USE_Y_MIN = 1,
65  USE_Z_MIN = 2,
66  USE_X_MAX = 3,
67  USE_Y_MAX = 4,
68  USE_Z_MAX = 5,
69  USE_X = 6,
70  USE_Y = 7,
71  USE_Z = 8
72  };
73 
75 
78  vtkSetClampMacro(Plane, int, 0, 8);
79  vtkGetMacro(Plane, int);
80  void SetPlaneToX() { this->SetPlane(USE_X); }
81  void SetPlaneToY() { this->SetPlane(USE_Y); }
82  void SetPlaneToZ() { this->SetPlane(USE_Z); }
83  void SetPlaneToXMin() { this->SetPlane(USE_X_MIN); }
84  void SetPlaneToYMin() { this->SetPlane(USE_Y_MIN); }
85  void SetPlaneToZMin() { this->SetPlane(USE_Z_MIN); }
86  void SetPlaneToXMax() { this->SetPlane(USE_X_MAX); }
87  void SetPlaneToYMax() { this->SetPlane(USE_Y_MAX); }
88  void SetPlaneToZMax() { this->SetPlane(USE_Z_MAX); }
90 
92 
96  vtkSetMacro(Center, double);
97  vtkGetMacro(Center, double);
99 
101 
105  vtkSetMacro(CopyInput, vtkTypeBool);
106  vtkGetMacro(CopyInput, vtkTypeBool);
107  vtkBooleanMacro(CopyInput, vtkTypeBool);
109 
111 
118  vtkSetMacro(FlipAllInputArrays, bool);
119  vtkGetMacro(FlipAllInputArrays, bool);
120  vtkBooleanMacro(FlipAllInputArrays, bool);
122 
123 protected:
126 
133 
137  virtual int RequestDataInternal(vtkDataSet* input, vtkUnstructuredGrid* output, double bounds[6]);
138 
142  virtual int ComputeBounds(vtkDataObject* input, double bounds[6]);
143 
148  vtkDataSet* input, vtkUnstructuredGrid* output, vtkIdType cellId, vtkIdType numInputPoints);
149 
152 
153  void FlipTuple(double* tuple, int* mirrorDir, int nComp);
154 
155  int Plane;
156  double Center;
159 
160 private:
161  vtkReflectionFilter(const vtkReflectionFilter&) = delete;
162  void operator=(const vtkReflectionFilter&) = delete;
163 };
164 
165 #endif
vtkReflectionFilter::SetPlaneToZ
void SetPlaneToZ()
Set the normal of the plane to use as mirror.
Definition: vtkReflectionFilter.h:82
vtkReflectionFilter::ReflectNon3DCell
virtual vtkIdType ReflectNon3DCell(vtkDataSet *input, vtkUnstructuredGrid *output, vtkIdType cellId, vtkIdType numInputPoints)
Generate new, non-3D cell and return the generated cells id.
vtkReflectionFilter::Center
double Center
Definition: vtkReflectionFilter.h:156
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkReflectionFilter::RequestDataObject
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkReflectionFilter::SetPlaneToZMin
void SetPlaneToZMin()
Set the normal of the plane to use as mirror.
Definition: vtkReflectionFilter.h:85
vtkReflectionFilter::SetPlaneToYMax
void SetPlaneToYMax()
Set the normal of the plane to use as mirror.
Definition: vtkReflectionFilter.h:87
vtkReflectionFilter::New
static vtkReflectionFilter * New()
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkDataObjectAlgorithm
Superclass for algorithms that produce only data object as output.
Definition: vtkDataObjectAlgorithm.h:63
vtkReflectionFilter::~vtkReflectionFilter
~vtkReflectionFilter() override
vtkReflectionFilter::vtkReflectionFilter
vtkReflectionFilter()
vtkReflectionFilter::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkReflectionFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkReflectionFilter::CopyInput
vtkTypeBool CopyInput
Definition: vtkReflectionFilter.h:157
vtkReflectionFilter::SetPlaneToY
void SetPlaneToY()
Set the normal of the plane to use as mirror.
Definition: vtkReflectionFilter.h:81
vtkReflectionFilter::SetPlaneToYMin
void SetPlaneToYMin()
Set the normal of the plane to use as mirror.
Definition: vtkReflectionFilter.h:84
vtkReflectionFilter
reflects a data set across a plane
Definition: vtkReflectionFilter.h:54
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkReflectionFilter::SetPlaneToX
void SetPlaneToX()
Set the normal of the plane to use as mirror.
Definition: vtkReflectionFilter.h:80
vtkReflectionFilter::SetPlaneToXMin
void SetPlaneToXMin()
Set the normal of the plane to use as mirror.
Definition: vtkReflectionFilter.h:83
vtkReflectionFilter::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkReflectionFilter::RequestDataInternal
virtual int RequestDataInternal(vtkDataSet *input, vtkUnstructuredGrid *output, double bounds[6])
Actual implementation for reflection.
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkReflectionFilter::SetPlaneToZMax
void SetPlaneToZMax()
Set the normal of the plane to use as mirror.
Definition: vtkReflectionFilter.h:88
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkReflectionFilter::ComputeBounds
virtual int ComputeBounds(vtkDataObject *input, double bounds[6])
Internal method to compute bounds.
vtkReflectionFilter::Plane
int Plane
Definition: vtkReflectionFilter.h:155
vtkReflectionFilter::FlipAllInputArrays
bool FlipAllInputArrays
Definition: vtkReflectionFilter.h:158
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:204
vtkDataObjectAlgorithm.h
vtkReflectionFilter::FlipTuple
void FlipTuple(double *tuple, int *mirrorDir, int nComp)
vtkReflectionFilter::ReflectionPlane
ReflectionPlane
Definition: vtkReflectionFilter.h:62
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:169
vtkReflectionFilter::SetPlaneToXMax
void SetPlaneToXMax()
Set the normal of the plane to use as mirror.
Definition: vtkReflectionFilter.h:86
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69