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:
57  static vtkAngularPeriodicFilter* New();
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);
110  void SetRotationAxisToX();
111  void SetRotationAxisToY();
112  void SetRotationAxisToZ();
114 
116 
119  vtkSetVector3Macro(Center, double);
120  vtkGetVector3Macro(Center, double);
122 
123 protected:
125  ~vtkAngularPeriodicFilter() override;
126 
128 
132  vtkDataArray* TransformDataArray(
133  vtkDataArray* inputArray, double angle, bool useCenter = true, bool normalize = false);
134 
138  void AppendPeriodicPiece(
139  double angle, vtkIdType iPiece, vtkDataObject* inputNode, vtkMultiPieceDataSet* multiPiece);
140 
144  void SetPeriodNumber(
145  vtkCompositeDataIterator* loc, vtkCompositeDataSet* output, int nbPeriod) override;
146 
150  void ComputePeriodicMesh(vtkPointSet* dataset, vtkPointSet* rotatedDataset, double angle);
151 
155  void ComputeAngularPeriodicData(
156  vtkDataSetAttributes* data, vtkDataSetAttributes* rotatedData, double angle);
157 
162  vtkCompositeDataSet* input) override;
163 
167  virtual void GeneratePieceName(vtkCompositeDataSet* input, vtkCompositeDataIterator* inputLoc,
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
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:69
#define VTK_ROTATION_MODE_DIRECT_ANGLE
int vtkIdType
Definition: vtkType.h:332
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:39
composite dataset to encapsulates pieces of dataset.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
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:65