VTK  9.2.6
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 
41 #ifndef vtkAngularPeriodicFilter_h
42 #define vtkAngularPeriodicFilter_h
43 
44 #include "vtkFiltersParallelModule.h" // For export macro
45 #include "vtkPeriodicFilter.h"
46 
49 class vtkPointSet;
50 
51 #define VTK_ROTATION_MODE_DIRECT_ANGLE 0 // Use user-provided angle
52 #define VTK_ROTATION_MODE_ARRAY_VALUE 1 // Use array from input data as angle
53 
54 class VTKFILTERSPARALLEL_EXPORT vtkAngularPeriodicFilter : public vtkPeriodicFilter
55 {
56 public:
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
62 
67  vtkSetMacro(ComputeRotationsOnTheFly, bool);
68  vtkGetMacro(ComputeRotationsOnTheFly, bool);
69  vtkBooleanMacro(ComputeRotationsOnTheFly, bool);
71 
73 
78  vtkSetClampMacro(
80  vtkGetMacro(RotationMode, int);
84 
86 
91  vtkSetMacro(RotationAngle, double);
92  vtkGetMacro(RotationAngle, double);
94 
96 
100  vtkSetStringMacro(RotationArrayName);
101  vtkGetStringMacro(RotationArrayName);
103 
105 
108  vtkSetClampMacro(RotationAxis, int, 0, 2);
109  vtkGetMacro(RotationAxis, int);
114 
116 
119  vtkSetVector3Macro(Center, double);
120  vtkGetVector3Macro(Center, double);
122 
123 protected:
126 
128 
133  vtkDataArray* inputArray, double angle, bool useCenter = true, bool normalize = false);
134 
139  double angle, vtkIdType iPiece, vtkDataObject* inputNode, vtkMultiPieceDataSet* multiPiece);
140 
145  vtkCompositeDataIterator* loc, vtkCompositeDataSet* output, int nbPeriod) override;
146 
150  void ComputePeriodicMesh(vtkPointSet* dataset, vtkPointSet* rotatedDataset, double angle);
151 
156  vtkDataSetAttributes* data, vtkDataSetAttributes* rotatedData, double angle);
157 
162  vtkCompositeDataSet* input) override;
163 
168  vtkMultiPieceDataSet* output, vtkIdType outputId);
169 
170 private:
172  void operator=(const vtkAngularPeriodicFilter&) = delete;
173 
174  bool ComputeRotationsOnTheFly;
175 
176  int RotationMode;
177  char*
178  RotationArrayName; // user-provided array name to use as angle, for ROTATION_MODE_ARRAY_VALUE
179 
180  // Transform parameters
181  double RotationAngle;
182  int RotationAxis; // Axis to rotate around, 0 for X, 1 for Y, 2 for Z
183  double Center[3]; // Center of rotation
184 };
185 
186 #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.
void SetRotationAxisToY()
Set/Get Rotation Axis, 0 for X, 1 for Y, 2 for Z.
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 SetRotationModeToArrayValue()
Set/Get The rotation mode.
void SetRotationModeToDirectAngle()
Set/Get The rotation mode.
void ComputeAngularPeriodicData(vtkDataSetAttributes *data, vtkDataSetAttributes *rotatedData, double angle)
Compute periodic point/cell data, using provided angle.
void SetRotationAxisToX()
Set/Get Rotation Axis, 0 for X, 1 for Y, 2 for Z.
void AppendPeriodicPiece(double angle, vtkIdType iPiece, vtkDataObject *inputNode, vtkMultiPieceDataSet *multiPiece)
Append a periodic piece to dataset, by computing rotated mesh and data.
void SetRotationAxisToZ()
Set/Get Rotation Axis, 0 for X, 1 for Y, 2 for Z.
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:165
general representation of visualization data
represent and manipulate attribute data in a dataset
a simple class to control print indentation
Definition: vtkIndent.h:119
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.
concrete class for storing a set of points
Definition: vtkPointSet.h:109
@ data
Definition: vtkX3D.h:321
#define VTK_ROTATION_MODE_ARRAY_VALUE
#define VTK_ROTATION_MODE_DIRECT_ANGLE
int vtkIdType
Definition: vtkType.h:332