VTK  9.3.1
vtkAngularPeriodicFilter.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
3 
29 #ifndef vtkAngularPeriodicFilter_h
30 #define vtkAngularPeriodicFilter_h
31 
32 #include "vtkFiltersParallelModule.h" // For export macro
33 #include "vtkPeriodicFilter.h"
34 
35 VTK_ABI_NAMESPACE_BEGIN
38 class vtkPointSet;
39 
40 #define VTK_ROTATION_MODE_DIRECT_ANGLE 0 // Use user-provided angle
41 #define VTK_ROTATION_MODE_ARRAY_VALUE 1 // Use array from input data as angle
42 
43 class VTKFILTERSPARALLEL_EXPORT vtkAngularPeriodicFilter : public vtkPeriodicFilter
44 {
45 public:
46  static vtkAngularPeriodicFilter* New();
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
51 
56  vtkSetMacro(ComputeRotationsOnTheFly, bool);
57  vtkGetMacro(ComputeRotationsOnTheFly, bool);
58  vtkBooleanMacro(ComputeRotationsOnTheFly, bool);
60 
62 
67  vtkSetClampMacro(
69  vtkGetMacro(RotationMode, int);
73 
75 
80  vtkSetMacro(RotationAngle, double);
81  vtkGetMacro(RotationAngle, double);
83 
85 
89  vtkSetStringMacro(RotationArrayName);
90  vtkGetStringMacro(RotationArrayName);
92 
94 
97  vtkSetClampMacro(RotationAxis, int, 0, 2);
98  vtkGetMacro(RotationAxis, int);
99  void SetRotationAxisToX();
100  void SetRotationAxisToY();
101  void SetRotationAxisToZ();
103 
105 
108  vtkSetVector3Macro(Center, double);
109  vtkGetVector3Macro(Center, double);
111 
112 protected:
114  ~vtkAngularPeriodicFilter() override;
115 
117 
121  vtkDataArray* TransformDataArray(
122  vtkDataArray* inputArray, double angle, bool useCenter = true, bool normalize = false);
123 
127  void AppendPeriodicPiece(
128  double angle, vtkIdType iPiece, vtkDataObject* inputNode, vtkMultiPieceDataSet* multiPiece);
129 
133  void SetPeriodNumber(
134  vtkCompositeDataIterator* loc, vtkCompositeDataSet* output, int nbPeriod) override;
135 
139  void ComputePeriodicMesh(vtkPointSet* dataset, vtkPointSet* rotatedDataset, double angle);
140 
144  void ComputeAngularPeriodicData(
145  vtkDataSetAttributes* data, vtkDataSetAttributes* rotatedData, double angle);
146 
151  vtkCompositeDataSet* input) override;
152 
156  virtual void GeneratePieceName(vtkCompositeDataSet* input, vtkCompositeDataIterator* inputLoc,
157  vtkMultiPieceDataSet* output, vtkIdType outputId);
158 
159 private:
161  void operator=(const vtkAngularPeriodicFilter&) = delete;
162 
163  bool ComputeRotationsOnTheFly;
164 
165  int RotationMode;
166  char*
167  RotationArrayName; // user-provided array name to use as angle, for ROTATION_MODE_ARRAY_VALUE
168 
169  // Transform parameters
170  double RotationAngle;
171  int RotationAxis; // Axis to rotate around, 0 for X, 1 for Y, 2 for Z
172  double Center[3]; // Center of rotation
173 };
174 
175 VTK_ABI_NAMESPACE_END
176 #endif
virtual void SetPeriodNumber(vtkCompositeDataIterator *loc, vtkCompositeDataSet *output, int nbPeriod)=0
Manually set the number of period on a specific leaf.
#define VTK_ROTATION_MODE_ARRAY_VALUE
Store vtkAlgorithm input/output information.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
concrete class for storing a set of points
Definition: vtkPointSet.h:58
#define VTK_ROTATION_MODE_DIRECT_ANGLE
int vtkIdType
Definition: vtkType.h:315
void SetRotationModeToArrayValue()
Set/Get The rotation mode.
static vtkMultiBlockDataSetAlgorithm * New()
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
a simple class to control print indentation
Definition: vtkIndent.h:28
composite dataset to encapsulates pieces of dataset.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
represent and manipulate attribute data in a dataset
A filter to produce mapped periodic multiblock dataset from a single block.
A filter to produce mapped angular periodic multiblock dataset from a single block, by rotation.
virtual void CreatePeriodicDataSet(vtkCompositeDataIterator *loc, vtkCompositeDataSet *output, vtkCompositeDataSet *input)=0
Create a periodic data, leaf of the tree.
Store zero or more vtkInformation instances.
void SetRotationModeToDirectAngle()
Set/Get The rotation mode.
general representation of visualization data
Definition: vtkDataObject.h:54