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 "vtkPolyDataAlgorithm.h" 00063 00064 class vtkIdList; 00065 class vtkPoints; 00066 class vtkPolyData; 00067 00068 #define VTK_RULED_MODE_RESAMPLE 0 00069 #define VTK_RULED_MODE_POINT_WALK 1 00070 00071 class VTK_GRAPHICS_EXPORT vtkRuledSurfaceFilter : public vtkPolyDataAlgorithm 00072 { 00073 public: 00074 vtkTypeMacro(vtkRuledSurfaceFilter,vtkPolyDataAlgorithm); 00075 void PrintSelf(ostream& os, vtkIndent indent); 00076 00079 static vtkRuledSurfaceFilter *New(); 00080 00082 00083 vtkSetClampMacro(DistanceFactor,double,1.0,VTK_DOUBLE_MAX); 00084 vtkGetMacro(DistanceFactor,double); 00086 00088 00091 vtkSetClampMacro(OnRatio,int,1,VTK_LARGE_INTEGER); 00092 vtkGetMacro(OnRatio,int); 00094 00096 00099 vtkSetClampMacro(Offset,int,0,VTK_LARGE_INTEGER); 00100 vtkGetMacro(Offset,int); 00102 00104 00109 vtkSetMacro(CloseSurface,int); 00110 vtkGetMacro(CloseSurface,int); 00111 vtkBooleanMacro(CloseSurface,int); 00113 00115 00120 vtkSetClampMacro(RuledMode,int, 00121 VTK_RULED_MODE_RESAMPLE,VTK_RULED_MODE_POINT_WALK); 00122 vtkGetMacro(RuledMode,int); 00123 void SetRuledModeToResample() 00124 {this->SetRuledMode(VTK_RULED_MODE_RESAMPLE);} 00125 void SetRuledModeToPointWalk() 00126 {this->SetRuledMode(VTK_RULED_MODE_POINT_WALK);} 00127 const char *GetRuledModeAsString(); 00129 00131 00136 vtkSetVector2Macro(Resolution, int); 00137 vtkGetVectorMacro(Resolution, int, 2); 00139 00141 00143 vtkSetMacro(PassLines,int); 00144 vtkGetMacro(PassLines,int); 00145 vtkBooleanMacro(PassLines,int); 00147 00149 00153 vtkSetMacro(OrientLoops,int); 00154 vtkGetMacro(OrientLoops,int); 00155 vtkBooleanMacro(OrientLoops,int); 00157 00158 protected: 00159 vtkRuledSurfaceFilter(); 00160 ~vtkRuledSurfaceFilter(); 00161 00162 // Usual data generation method 00163 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00164 00165 double DistanceFactor; 00166 int OnRatio; 00167 int Offset; 00168 int CloseSurface; 00169 int RuledMode; 00170 int Resolution[2]; 00171 int PassLines; 00172 int OrientLoops; 00173 00174 private: 00175 vtkIdList *Ids; 00176 double Weights[4]; 00177 00178 void Resample(vtkPolyData *output, vtkPolyData *input, 00179 vtkPoints *inPts, vtkPoints *newPts, 00180 int npts, vtkIdType *pts, int npts2, vtkIdType *pts2); 00181 void PointWalk(vtkPolyData *output, vtkPoints *inPts, 00182 int npts, vtkIdType *pts, int npts2, vtkIdType *pts2); 00183 00184 private: 00185 vtkRuledSurfaceFilter(const vtkRuledSurfaceFilter&); // Not implemented. 00186 void operator=(const vtkRuledSurfaceFilter&); // Not implemented. 00187 }; 00188 00189 #endif