VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkRuledSurfaceFilter.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 =========================================================================*/ 00059 #ifndef __vtkRuledSurfaceFilter_h 00060 #define __vtkRuledSurfaceFilter_h 00061 00062 #include "vtkFiltersModelingModule.h" // For export macro 00063 #include "vtkPolyDataAlgorithm.h" 00064 00065 class vtkIdList; 00066 class vtkPoints; 00067 class vtkPolyData; 00068 00069 #define VTK_RULED_MODE_RESAMPLE 0 00070 #define VTK_RULED_MODE_POINT_WALK 1 00071 00072 class VTKFILTERSMODELING_EXPORT vtkRuledSurfaceFilter : public vtkPolyDataAlgorithm 00073 { 00074 public: 00075 vtkTypeMacro(vtkRuledSurfaceFilter,vtkPolyDataAlgorithm); 00076 void PrintSelf(ostream& os, vtkIndent indent); 00077 00080 static vtkRuledSurfaceFilter *New(); 00081 00083 00084 vtkSetClampMacro(DistanceFactor,double,1.0,VTK_DOUBLE_MAX); 00085 vtkGetMacro(DistanceFactor,double); 00087 00089 00092 vtkSetClampMacro(OnRatio,int,1,VTK_INT_MAX); 00093 vtkGetMacro(OnRatio,int); 00095 00097 00100 vtkSetClampMacro(Offset,int,0,VTK_INT_MAX); 00101 vtkGetMacro(Offset,int); 00103 00105 00110 vtkSetMacro(CloseSurface,int); 00111 vtkGetMacro(CloseSurface,int); 00112 vtkBooleanMacro(CloseSurface,int); 00114 00116 00121 vtkSetClampMacro(RuledMode,int, 00122 VTK_RULED_MODE_RESAMPLE,VTK_RULED_MODE_POINT_WALK); 00123 vtkGetMacro(RuledMode,int); 00124 void SetRuledModeToResample() 00125 {this->SetRuledMode(VTK_RULED_MODE_RESAMPLE);} 00126 void SetRuledModeToPointWalk() 00127 {this->SetRuledMode(VTK_RULED_MODE_POINT_WALK);} 00128 const char *GetRuledModeAsString(); 00130 00132 00137 vtkSetVector2Macro(Resolution, int); 00138 vtkGetVectorMacro(Resolution, int, 2); 00140 00142 00144 vtkSetMacro(PassLines,int); 00145 vtkGetMacro(PassLines,int); 00146 vtkBooleanMacro(PassLines,int); 00148 00150 00154 vtkSetMacro(OrientLoops,int); 00155 vtkGetMacro(OrientLoops,int); 00156 vtkBooleanMacro(OrientLoops,int); 00158 00159 protected: 00160 vtkRuledSurfaceFilter(); 00161 ~vtkRuledSurfaceFilter(); 00162 00163 // Usual data generation method 00164 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00165 00166 double DistanceFactor; 00167 int OnRatio; 00168 int Offset; 00169 int CloseSurface; 00170 int RuledMode; 00171 int Resolution[2]; 00172 int PassLines; 00173 int OrientLoops; 00174 00175 private: 00176 vtkIdList *Ids; 00177 double Weights[4]; 00178 00179 void Resample(vtkPolyData *output, vtkPolyData *input, 00180 vtkPoints *inPts, vtkPoints *newPts, 00181 int npts, vtkIdType *pts, int npts2, vtkIdType *pts2); 00182 void PointWalk(vtkPolyData *output, vtkPoints *inPts, 00183 int npts, vtkIdType *pts, int npts2, vtkIdType *pts2); 00184 00185 private: 00186 vtkRuledSurfaceFilter(const vtkRuledSurfaceFilter&); // Not implemented. 00187 void operator=(const vtkRuledSurfaceFilter&); // Not implemented. 00188 }; 00189 00190 #endif