VTK  9.0.1
vtkAngularPeriodicFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPeriodicFiler.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 =========================================================================*/
15 
38 #ifndef vtkAngularPeriodicFilter_h
39 #define vtkAngularPeriodicFilter_h
40 
41 #include "vtkFiltersParallelModule.h" // For export macro
42 #include "vtkPeriodicFilter.h"
43 
46 class vtkPointSet;
47 
48 #define VTK_ROTATION_MODE_DIRECT_ANGLE 0 // Use user-provided angle
49 #define VTK_ROTATION_MODE_ARRAY_VALUE 1 // Use array from input data as angle
50 
51 class VTKFILTERSPARALLEL_EXPORT vtkAngularPeriodicFilter : public vtkPeriodicFilter
52 {
53 public:
54  static vtkAngularPeriodicFilter* New();
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
59 
64  vtkSetMacro(ComputeRotationsOnTheFly, bool);
65  vtkGetMacro(ComputeRotationsOnTheFly, bool);
66  vtkBooleanMacro(ComputeRotationsOnTheFly, bool);
68 
70 
75  vtkSetClampMacro(
77  vtkGetMacro(RotationMode, int);
81 
83 
88  vtkSetMacro(RotationAngle, double);
89  vtkGetMacro(RotationAngle, double);
91 
93 
97  vtkSetStringMacro(RotationArrayName);
98  vtkGetStringMacro(RotationArrayName);
100 
102 
105  vtkSetClampMacro(RotationAxis, int, 0, 2);
106  vtkGetMacro(RotationAxis, int);
107  void SetRotationAxisToX();
108  void SetRotationAxisToY();
109  void SetRotationAxisToZ();
111 
113 
116  vtkSetVector3Macro(Center, double);
117  vtkGetVector3Macro(Center, double);
119 
120 protected:
122  ~vtkAngularPeriodicFilter() override;
123 
125 
129  vtkDataArray* TransformDataArray(
130  vtkDataArray* inputArray, double angle, bool useCenter = true, bool normalize = false);
131 
135  void AppendPeriodicPiece(
136  double angle, vtkIdType iPiece, vtkDataObject* inputNode, vtkMultiPieceDataSet* multiPiece);
137 
141  void SetPeriodNumber(
142  vtkCompositeDataIterator* loc, vtkCompositeDataSet* output, int nbPeriod) override;
143 
147  void ComputePeriodicMesh(vtkPointSet* dataset, vtkPointSet* rotatedDataset, double angle);
148 
152  void ComputeAngularPeriodicData(
153  vtkDataSetAttributes* data, vtkDataSetAttributes* rotatedData, double angle);
154 
159  vtkCompositeDataSet* input) override;
160 
164  virtual void GeneratePieceName(vtkCompositeDataSet* input, vtkCompositeDataIterator* inputLoc,
165  vtkMultiPieceDataSet* output, vtkIdType outputId);
166 
167 private:
169  void operator=(const vtkAngularPeriodicFilter&) = delete;
170 
171  bool ComputeRotationsOnTheFly;
172 
173  int RotationMode;
174  char*
175  RotationArrayName; // user-provided array name to use as angle, for ROTATION_MODE_ARRAY_VALUE
176 
177  // Transform parameters
178  double RotationAngle;
179  int RotationAxis; // Axis to rotate around, 0 for X, 1 for Y, 2 for Z
180  double Center[3]; // Center of rotation
181 };
182 
183 #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.
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:62
#define VTK_ROTATION_MODE_DIRECT_ANGLE
int vtkIdType
Definition: vtkType.h:338
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:33
composite dataset to encapsulates pieces of dataset.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:49
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:59