VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkLinearExtrusionFilter.h 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 =========================================================================*/ 00056 #ifndef __vtkLinearExtrusionFilter_h 00057 #define __vtkLinearExtrusionFilter_h 00058 00059 #include "vtkFiltersModelingModule.h" // For export macro 00060 #include "vtkPolyDataAlgorithm.h" 00061 00062 class vtkDataArray; 00063 00064 #define VTK_VECTOR_EXTRUSION 1 00065 #define VTK_NORMAL_EXTRUSION 2 00066 #define VTK_POINT_EXTRUSION 3 00067 00068 class VTKFILTERSMODELING_EXPORT vtkLinearExtrusionFilter : public vtkPolyDataAlgorithm 00069 { 00070 public: 00071 vtkTypeMacro(vtkLinearExtrusionFilter,vtkPolyDataAlgorithm); 00072 void PrintSelf(ostream& os, vtkIndent indent); 00073 00076 static vtkLinearExtrusionFilter *New(); 00077 00079 00080 vtkSetClampMacro(ExtrusionType,int,VTK_VECTOR_EXTRUSION,VTK_POINT_EXTRUSION); 00081 vtkGetMacro(ExtrusionType,int); 00082 void SetExtrusionTypeToVectorExtrusion() 00083 {this->SetExtrusionType(VTK_VECTOR_EXTRUSION);}; 00084 void SetExtrusionTypeToNormalExtrusion() 00085 {this->SetExtrusionType(VTK_NORMAL_EXTRUSION);}; 00086 void SetExtrusionTypeToPointExtrusion() 00087 {this->SetExtrusionType(VTK_POINT_EXTRUSION);}; 00089 00091 00092 vtkSetMacro(Capping,int); 00093 vtkGetMacro(Capping,int); 00094 vtkBooleanMacro(Capping,int); 00096 00098 00099 vtkSetMacro(ScaleFactor,double); 00100 vtkGetMacro(ScaleFactor,double); 00102 00104 00106 vtkSetVector3Macro(Vector,double); 00107 vtkGetVectorMacro(Vector,double,3); 00109 00111 00113 vtkSetVector3Macro(ExtrusionPoint,double); 00114 vtkGetVectorMacro(ExtrusionPoint,double,3); 00116 00117 protected: 00118 vtkLinearExtrusionFilter(); 00119 ~vtkLinearExtrusionFilter() {} 00120 00121 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00122 int ExtrusionType; 00123 int Capping; 00124 double ScaleFactor; 00125 double Vector[3]; 00126 double ExtrusionPoint[3]; 00127 00128 //BTX 00129 void (vtkLinearExtrusionFilter::*ExtrudePoint)(double x[3], vtkIdType id, 00130 vtkDataArray *normals); 00131 void ViaNormal(double x[3], vtkIdType id, vtkDataArray *normals); 00132 void ViaVector(double x[3], vtkIdType id, vtkDataArray *normals=0); 00133 void ViaPoint(double x[3], vtkIdType id, vtkDataArray *normals=0); 00134 //ETX 00135 00136 private: 00137 vtkLinearExtrusionFilter(const vtkLinearExtrusionFilter&); // Not implemented. 00138 void operator=(const vtkLinearExtrusionFilter&); // Not implemented. 00139 }; 00140 00141 #endif