VTK  9.0.2
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:
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);
111 
113 
116  vtkSetVector3Macro(Center, double);
117  vtkGetVector3Macro(Center, double);
119 
120 protected:
123 
125 
130  vtkDataArray* inputArray, double angle, bool useCenter = true, bool normalize = false);
131 
136  double angle, vtkIdType iPiece, vtkDataObject* inputNode, vtkMultiPieceDataSet* multiPiece);
137 
142  vtkCompositeDataIterator* loc, vtkCompositeDataSet* output, int nbPeriod) override;
143 
147  void ComputePeriodicMesh(vtkPointSet* dataset, vtkPointSet* rotatedDataset, double angle);
148 
153  vtkDataSetAttributes* data, vtkDataSetAttributes* rotatedData, double angle);
154 
159  vtkCompositeDataSet* input) override;
160 
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
A filter to produce mapped angular periodic multiblock dataset from a single block,...
virtual void GeneratePieceName(vtkCompositeDataSet *input, vtkCompositeDataIterator *inputLoc, vtkMultiPieceDataSet *output, vtkIdType outputId)
Generate a name for a piece in the periodic dataset from the input dataset.
static vtkAngularPeriodicFilter * New()
void SetPeriodNumber(vtkCompositeDataIterator *loc, vtkCompositeDataSet *output, int nbPeriod) override
Manually set the number of period on a specific leaf.
void ComputePeriodicMesh(vtkPointSet *dataset, vtkPointSet *rotatedDataset, double angle)
Compute periodic pointset, rotating point, using provided angle.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
~vtkAngularPeriodicFilter() override
vtkDataArray * TransformDataArray(vtkDataArray *inputArray, double angle, bool useCenter=true, bool normalize=false)
Create a transform copy of the provided data array.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ComputeAngularPeriodicData(vtkDataSetAttributes *data, vtkDataSetAttributes *rotatedData, double angle)
Compute periodic point/cell data, using provided angle.
void AppendPeriodicPiece(double angle, vtkIdType iPiece, vtkDataObject *inputNode, vtkMultiPieceDataSet *multiPiece)
Append a periodic piece to dataset, by computing rotated mesh and data.
void CreatePeriodicDataSet(vtkCompositeDataIterator *loc, vtkCompositeDataSet *output, vtkCompositeDataSet *input) override
Create a periodic data, leaf of the tree.
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
general representation of visualization data
Definition: vtkDataObject.h:60
represent and manipulate attribute data in a dataset
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
composite dataset to encapsulates pieces of dataset.
A filter to produce mapped periodic multiblock dataset from a single block.
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:63
@ data
Definition: vtkX3D.h:321
#define VTK_ROTATION_MODE_ARRAY_VALUE
#define VTK_ROTATION_MODE_DIRECT_ANGLE
int vtkIdType
Definition: vtkType.h:338