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 
40 #ifndef vtkAngularPeriodicFilter_h
41 #define vtkAngularPeriodicFilter_h
42 
43 #include "vtkFiltersParallelModule.h" // For export macro
44 #include "vtkPeriodicFilter.h"
45 
48 class vtkPointSet;
49 
50 #define VTK_ROTATION_MODE_DIRECT_ANGLE 0 // Use user-provided angle
51 #define VTK_ROTATION_MODE_ARRAY_VALUE 1 // Use array from input data as angle
52 
54 {
55 public:
58  void PrintSelf(ostream& os, vtkIndent indent);
59 
61 
64  vtkSetClampMacro(RotationMode, int,
66  vtkGetMacro(RotationMode, int);
68  { this->SetRotationMode(VTK_ROTATION_MODE_DIRECT_ANGLE); }
70  { this->SetRotationMode(VTK_ROTATION_MODE_ARRAY_VALUE); }
72 
74 
76  vtkSetMacro(RotationAngle, double);
77  vtkGetMacro(RotationAngle, double);
79 
81 
83  vtkSetStringMacro(RotationArrayName);
84  vtkGetStringMacro(RotationArrayName);
86 
88 
89  vtkSetClampMacro(RotationAxis, int, 0, 2);
90  vtkGetMacro(RotationAxis, int);
95 
97 
98  vtkSetVector3Macro(Center, double);
99  vtkGetVector3Macro(Center, double);
101 
102 protected:
105 
109 
111 
113  double angle,
114  bool useCenter = true,
115  bool normalize = false);
117 
119 
121  void AppendPeriodicPiece(double angle, vtkIdType iPiece,
122  vtkDataObject* inputNode,
123  vtkMultiPieceDataSet* multiPiece);
125 
127 
129  vtkCompositeDataSet* output,
130  int nbPeriod);
132 
134 
135  void ComputePeriodicMesh(vtkPointSet* dataset, vtkPointSet* rotatedDataset,
136  double angle);
138 
140 
142  vtkDataSetAttributes* rotatedData,
143  double angle);
145 
147 
149  vtkCompositeDataSet* output,
152 
154 
157  vtkCompositeDataIterator* inputLoc,
158  vtkMultiPieceDataSet* output,
159  vtkIdType outputId);
160 private:
161  vtkAngularPeriodicFilter(const vtkAngularPeriodicFilter&); // Not implemented.
162  void operator=(const vtkAngularPeriodicFilter&); // Not implemented.
164 
165  int RotationMode;
166  char* RotationArrayName; // user-provided array name to use as angle, for ROTATION_MODE_ARRAY_VALUE
167 
168  // Transform parameters
169  double RotationAngle;
170  int RotationAxis; // Axis to rotate around, 0 for X, 1 for Y, 2 for Z
171  double Center[3]; // Center of rotation
172 };
173 
174 #endif
vtkgl::data
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: vtkgl.h:11339
vtkAngularPeriodicFilter
A filter to produce mapped angular periodic multiblock dataset from a single block,...
Definition: vtkAngularPeriodicFilter.h:54
vtkAngularPeriodicFilter::CreatePeriodicDataSet
void CreatePeriodicDataSet(vtkCompositeDataIterator *loc, vtkCompositeDataSet *output, vtkCompositeDataSet *input)
VTKFILTERSPARALLEL_EXPORT
#define VTKFILTERSPARALLEL_EXPORT
Definition: vtkFiltersParallelModule.h:15
vtkMultiPieceDataSet
composite dataset to encapsulates pieces of dataset.
Definition: vtkMultiPieceDataSet.h:43
vtkAngularPeriodicFilter::SetRotationAxisToZ
void SetRotationAxisToZ()
vtkSetVector3Macro
#define vtkSetVector3Macro(name, type)
Definition: vtkSetGet.h:287
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkAngularPeriodicFilter::ComputeAngularPeriodicData
void ComputeAngularPeriodicData(vtkDataSetAttributes *data, vtkDataSetAttributes *rotatedData, double angle)
vtkPeriodicFilter
A filter to produce mapped periodic multiblock dataset from a single block.
Definition: vtkPeriodicFilter.h:52
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:58
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkAngularPeriodicFilter::~vtkAngularPeriodicFilter
~vtkAngularPeriodicFilter()
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkgl::input
GLenum GLenum GLenum input
Definition: vtkgl.h:15941
vtkFiltersParallelModule.h
vtkCompositeDataSet
abstract superclass for composite (multi-block or AMR) datasets
Definition: vtkCompositeDataSet.h:51
vtkPeriodicFilter.h
vtkAngularPeriodicFilter::SetRotationAxisToY
void SetRotationAxisToY()
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkAngularPeriodicFilter::SetRotationModeToArrayValue
void SetRotationModeToArrayValue()
Definition: vtkAngularPeriodicFilter.h:69
vtkGetVector3Macro
#define vtkGetVector3Macro(name, type)
Definition: vtkSetGet.h:304
VTK_ROTATION_MODE_DIRECT_ANGLE
#define VTK_ROTATION_MODE_DIRECT_ANGLE
Definition: vtkAngularPeriodicFilter.h:50
vtkAngularPeriodicFilter::SetRotationModeToDirectAngle
void SetRotationModeToDirectAngle()
Definition: vtkAngularPeriodicFilter.h:67
vtkCompositeDataIterator
superclass for composite data iterators
Definition: vtkCompositeDataIterator.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSetStringMacro
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:104
vtkAngularPeriodicFilter::AppendPeriodicPiece
void AppendPeriodicPiece(double angle, vtkIdType iPiece, vtkDataObject *inputNode, vtkMultiPieceDataSet *multiPiece)
vtkAngularPeriodicFilter::New
static vtkAngularPeriodicFilter * New()
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkAngularPeriodicFilter::vtkAngularPeriodicFilter
vtkAngularPeriodicFilter()
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkAngularPeriodicFilter::TransformDataArray
vtkDataArray * TransformDataArray(vtkDataArray *inputArray, double angle, bool useCenter=true, bool normalize=false)
vtkAngularPeriodicFilter::SetRotationAxisToX
void SetRotationAxisToX()
vtkAngularPeriodicFilter::SetPeriodNumber
virtual void SetPeriodNumber(vtkCompositeDataIterator *loc, vtkCompositeDataSet *output, int nbPeriod)
vtkPointSet
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:45
vtkAngularPeriodicFilter::ComputePeriodicMesh
void ComputePeriodicMesh(vtkPointSet *dataset, vtkPointSet *rotatedDataset, double angle)
vtkgl::angle
GLfloat angle
Definition: vtkgl.h:18174
vtkAngularPeriodicFilter::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkAngularPeriodicFilter::GeneratePieceName
virtual void GeneratePieceName(vtkCompositeDataSet *input, vtkCompositeDataIterator *inputLoc, vtkMultiPieceDataSet *output, vtkIdType outputId)
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
VTK_ROTATION_MODE_ARRAY_VALUE
#define VTK_ROTATION_MODE_ARRAY_VALUE
Definition: vtkAngularPeriodicFilter.h:51
vtkAngularPeriodicFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)