VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkQuadRotationalExtrusionFilter.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00064 #ifndef __vtkQuadRotationalExtrusionFilter_h 00065 #define __vtkQuadRotationalExtrusionFilter_h 00066 00067 #include "vtkFiltersModelingModule.h" // For export macro 00068 #include "vtkMultiBlockDataSetAlgorithm.h" 00069 #include <vtksys/stl/map> // STL vector need for per block angles 00070 00071 class vtkPoints; 00072 class vtkPointData; 00073 00074 class VTKFILTERSMODELING_EXPORT vtkQuadRotationalExtrusionFilter : public vtkMultiBlockDataSetAlgorithm 00075 { 00076 public: 00077 vtkTypeMacro(vtkQuadRotationalExtrusionFilter,vtkMultiBlockDataSetAlgorithm); 00078 void PrintSelf(ostream& os, vtkIndent indent); 00079 00082 static vtkQuadRotationalExtrusionFilter *New(); 00083 00084 //BTX 00085 enum RotationAxis 00086 { 00087 USE_X = 0, 00088 USE_Y = 1, 00089 USE_Z = 2 00090 }; 00091 //ETX 00092 00094 00095 vtkSetClampMacro(Axis, int, 0, 2); 00096 vtkGetMacro(Axis, int); 00097 void SetAxisToX() { this->SetAxis(USE_X); }; 00098 void SetAxisToY() { this->SetAxis(USE_Y); }; 00099 void SetAxisToZ() { this->SetAxis(USE_Z); }; 00101 00103 00105 vtkSetClampMacro(Resolution,int,1,VTK_INT_MAX); 00106 vtkGetMacro(Resolution,int); 00108 00110 00111 vtkSetMacro(Capping,int); 00112 vtkGetMacro(Capping,int); 00113 vtkBooleanMacro(Capping,int); 00115 00117 00118 vtkSetMacro(DefaultAngle,double); 00119 vtkGetMacro(DefaultAngle,double); 00121 00123 00124 void RemoveAllPerBlockAngles(); 00125 void AddPerBlockAngle(vtkIdType blockId, double angle); 00127 00129 00130 vtkSetMacro(Translation,double); 00131 vtkGetMacro(Translation,double); 00133 00135 00136 vtkSetMacro(DeltaRadius,double); 00137 vtkGetMacro(DeltaRadius,double); 00139 00140 protected: 00141 vtkQuadRotationalExtrusionFilter(); 00142 ~vtkQuadRotationalExtrusionFilter() {} 00143 00144 int FillInputPortInformation( int , vtkInformation* ); 00145 int RequestData( vtkInformation*, 00146 vtkInformationVector**, 00147 vtkInformationVector* ); 00148 00149 int RotateAroundAxis( double, 00150 vtkIdType, 00151 vtkPoints*, 00152 vtkPoints*, 00153 vtkPointData*, 00154 vtkPointData* ); 00155 int Axis; 00156 int Resolution; 00157 int Capping; 00158 double DefaultAngle; 00159 double Translation; 00160 double DeltaRadius; 00161 00162 //BTX 00163 vtksys_stl::map<vtkIdType,double> PerBlockAngles; 00164 //ETX 00165 00166 private: 00167 vtkQuadRotationalExtrusionFilter(const vtkQuadRotationalExtrusionFilter&); // Not implemented. 00168 void operator=(const vtkQuadRotationalExtrusionFilter&); // Not implemented. 00169 }; 00170 00171 #endif