VTK
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
49class 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
54class VTKFILTERSPARALLEL_EXPORT vtkAngularPeriodicFilter : public vtkPeriodicFilter
55{
56public:
59 void PrintSelf(ostream& os, vtkIndent indent);
60
62
67 vtkSetMacro(ComputeRotationsOnTheFly, bool);
68 vtkGetMacro(ComputeRotationsOnTheFly, bool);
69 vtkBooleanMacro(ComputeRotationsOnTheFly, bool);
71
73
78 vtkSetClampMacro(RotationMode, int,
80 vtkGetMacro(RotationMode, int);
82 { this->SetRotationMode(VTK_ROTATION_MODE_DIRECT_ANGLE); }
84 { this->SetRotationMode(VTK_ROTATION_MODE_ARRAY_VALUE); }
86
88
93 vtkSetMacro(RotationAngle, double);
94 vtkGetMacro(RotationAngle, double);
96
98
102 vtkSetStringMacro(RotationArrayName);
103 vtkGetStringMacro(RotationArrayName);
105
107
110 vtkSetClampMacro(RotationAxis, int, 0, 2);
111 vtkGetMacro(RotationAxis, int);
116
118
121 vtkSetVector3Macro(Center, double);
122 vtkGetVector3Macro(Center, double);
124
125protected:
128
132
137 double angle,
138 bool useCenter = true,
139 bool normalize = false);
140
144 void AppendPeriodicPiece(double angle, vtkIdType iPiece,
145 vtkDataObject* inputNode,
146 vtkMultiPieceDataSet* multiPiece);
147
152 vtkCompositeDataSet* output,
153 int nbPeriod);
154
158 void ComputePeriodicMesh(vtkPointSet* dataset, vtkPointSet* rotatedDataset,
159 double angle);
160
165 vtkDataSetAttributes* rotatedData,
166 double angle);
167
172 vtkCompositeDataSet* output,
173 vtkCompositeDataSet* input);
174
179 vtkCompositeDataIterator* inputLoc,
180 vtkMultiPieceDataSet* output,
181 vtkIdType outputId);
182
183private:
184 vtkAngularPeriodicFilter(const vtkAngularPeriodicFilter&) VTK_DELETE_FUNCTION;
185 void operator=(const vtkAngularPeriodicFilter&) VTK_DELETE_FUNCTION;
186
187 bool ComputeRotationsOnTheFly;
188
189 int RotationMode;
190 char* RotationArrayName; // user-provided array name to use as angle, for ROTATION_MODE_ARRAY_VALUE
191
192 // Transform parameters
193 double RotationAngle;
194 int RotationAxis; // Axis to rotate around, 0 for X, 1 for Y, 2 for Z
195 double Center[3]; // Center of rotation
196};
197
198#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 ComputePeriodicMesh(vtkPointSet *dataset, vtkPointSet *rotatedDataset, double angle)
Compute periodic pointset, rotating point, using provided angle.
vtkDataArray * TransformDataArray(vtkDataArray *inputArray, double angle, bool useCenter=true, bool normalize=false)
Create a transform copy of the provided data array.
void CreatePeriodicDataSet(vtkCompositeDataIterator *loc, vtkCompositeDataSet *output, vtkCompositeDataSet *input)
Create a periodic data, leaf of the tree.
void ComputeAngularPeriodicData(vtkDataSetAttributes *data, vtkDataSetAttributes *rotatedData, double angle)
Compute periodic point/cell data, using provided angle.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
void AppendPeriodicPiece(double angle, vtkIdType iPiece, vtkDataObject *inputNode, vtkMultiPieceDataSet *multiPiece)
Append a periodic piece to dataset, by computing rotated mesh and data.
virtual void SetPeriodNumber(vtkCompositeDataIterator *loc, vtkCompositeDataSet *output, int nbPeriod)
Manually set the number of period on a specific leaf.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
general representation of visualization data
Definition: vtkDataObject.h:65
represent and manipulate attribute data in a dataset
a simple class to control print indentation
Definition: vtkIndent.h:40
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:43
@ data
Definition: vtkX3D.h:315
#define VTK_ROTATION_MODE_ARRAY_VALUE
#define VTK_ROTATION_MODE_DIRECT_ANGLE
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
int vtkIdType
Definition: vtkType.h:287