VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkRuledSurfaceFilter.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 =========================================================================*/ 00056 #ifndef __vtkRuledSurfaceFilter_h 00057 #define __vtkRuledSurfaceFilter_h 00058 00059 #include "vtkPolyDataAlgorithm.h" 00060 00061 class vtkIdList; 00062 class vtkPoints; 00063 class vtkPolyData; 00064 00065 #define VTK_RULED_MODE_RESAMPLE 0 00066 #define VTK_RULED_MODE_POINT_WALK 1 00067 00068 class VTK_GRAPHICS_EXPORT vtkRuledSurfaceFilter : public vtkPolyDataAlgorithm 00069 { 00070 public: 00071 vtkTypeRevisionMacro(vtkRuledSurfaceFilter,vtkPolyDataAlgorithm); 00072 void PrintSelf(ostream& os, vtkIndent indent); 00073 00076 static vtkRuledSurfaceFilter *New(); 00077 00079 00080 vtkSetClampMacro(DistanceFactor,double,1.0,VTK_DOUBLE_MAX); 00081 vtkGetMacro(DistanceFactor,double); 00083 00085 00088 vtkSetClampMacro(OnRatio,int,1,VTK_LARGE_INTEGER); 00089 vtkGetMacro(OnRatio,int); 00091 00093 00096 vtkSetClampMacro(Offset,int,0,VTK_LARGE_INTEGER); 00097 vtkGetMacro(Offset,int); 00099 00101 00106 vtkSetMacro(CloseSurface,int); 00107 vtkGetMacro(CloseSurface,int); 00108 vtkBooleanMacro(CloseSurface,int); 00110 00112 00117 vtkSetClampMacro(RuledMode,int, 00118 VTK_RULED_MODE_RESAMPLE,VTK_RULED_MODE_POINT_WALK); 00119 vtkGetMacro(RuledMode,int); 00120 void SetRuledModeToResample() 00121 {this->SetRuledMode(VTK_RULED_MODE_RESAMPLE);} 00122 void SetRuledModeToPointWalk() 00123 {this->SetRuledMode(VTK_RULED_MODE_POINT_WALK);} 00124 const char *GetRuledModeAsString(); 00126 00128 00133 vtkSetVector2Macro(Resolution, int); 00134 vtkGetVectorMacro(Resolution, int, 2); 00136 00138 00140 vtkSetMacro(PassLines,int); 00141 vtkGetMacro(PassLines,int); 00142 vtkBooleanMacro(PassLines,int); 00144 00146 00150 vtkSetMacro(OrientLoops,int); 00151 vtkGetMacro(OrientLoops,int); 00152 vtkBooleanMacro(OrientLoops,int); 00154 00155 protected: 00156 vtkRuledSurfaceFilter(); 00157 ~vtkRuledSurfaceFilter(); 00158 00159 // Usual data generation method 00160 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00161 00162 double DistanceFactor; 00163 int OnRatio; 00164 int Offset; 00165 int CloseSurface; 00166 int RuledMode; 00167 int Resolution[2]; 00168 int PassLines; 00169 int OrientLoops; 00170 00171 private: 00172 vtkIdList *Ids; 00173 double Weights[4]; 00174 00175 void Resample(vtkPolyData *output, vtkPolyData *input, 00176 vtkPoints *inPts, vtkPoints *newPts, 00177 int npts, vtkIdType *pts, int npts2, vtkIdType *pts2); 00178 void PointWalk(vtkPolyData *output, vtkPoints *inPts, 00179 int npts, vtkIdType *pts, int npts2, vtkIdType *pts2); 00180 00181 private: 00182 vtkRuledSurfaceFilter(const vtkRuledSurfaceFilter&); // Not implemented. 00183 void operator=(const vtkRuledSurfaceFilter&); // Not implemented. 00184 }; 00185 00186 #endif