Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkRuledSurfaceFilter.h

Go to the documentation of this file.
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 =========================================================================*/
00069 #ifndef __vtkRuledSurfaceFilter_h
00070 #define __vtkRuledSurfaceFilter_h
00071 
00072 #include "vtkPolyDataToPolyDataFilter.h"
00073 
00074 class vtkIdList;
00075 class vtkPoints;
00076 class vtkPolyData;
00077 
00078 #define VTK_RULED_MODE_RESAMPLE 0
00079 #define VTK_RULED_MODE_POINT_WALK 1
00080 
00081 class VTK_GRAPHICS_EXPORT vtkRuledSurfaceFilter : public vtkPolyDataToPolyDataFilter
00082 {
00083 public:
00084   vtkTypeRevisionMacro(vtkRuledSurfaceFilter,vtkPolyDataToPolyDataFilter);
00085   void PrintSelf(ostream& os, vtkIndent indent);
00086 
00089   static vtkRuledSurfaceFilter *New();
00090 
00092 
00093   vtkSetClampMacro(DistanceFactor,double,1.0,VTK_DOUBLE_MAX);
00094   vtkGetMacro(DistanceFactor,double);
00096 
00098 
00101   vtkSetClampMacro(OnRatio,int,1,VTK_LARGE_INTEGER);
00102   vtkGetMacro(OnRatio,int);
00104 
00106 
00109   vtkSetClampMacro(Offset,int,0,VTK_LARGE_INTEGER);
00110   vtkGetMacro(Offset,int);
00112 
00114 
00119   vtkSetMacro(CloseSurface,int);
00120   vtkGetMacro(CloseSurface,int);
00121   vtkBooleanMacro(CloseSurface,int);
00123 
00125 
00130   vtkSetClampMacro(RuledMode,int,
00131                    VTK_RULED_MODE_RESAMPLE,VTK_RULED_MODE_POINT_WALK);
00132   vtkGetMacro(RuledMode,int);
00133   void SetRuledModeToResample()
00134     {this->SetRuledMode(VTK_RULED_MODE_RESAMPLE);}
00135   void SetRuledModeToPointWalk()
00136     {this->SetRuledMode(VTK_RULED_MODE_POINT_WALK);}
00137   const char *GetRuledModeAsString();
00139 
00141 
00146   vtkSetVector2Macro(Resolution, int);
00147   vtkGetVectorMacro(Resolution, int, 2);
00149 
00151 
00153   vtkSetMacro(PassLines,int);
00154   vtkGetMacro(PassLines,int);
00155   vtkBooleanMacro(PassLines,int);
00157 
00158 protected:
00159   vtkRuledSurfaceFilter();
00160   ~vtkRuledSurfaceFilter();
00161 
00162   // Usual data generation method
00163   void Execute();
00164 
00165   double DistanceFactor;
00166   int   OnRatio;
00167   int   Offset;
00168   int   CloseSurface;
00169   int   RuledMode;
00170   int   Resolution[2];
00171   int   PassLines;
00172   
00173 private:
00174   vtkIdList *Ids;
00175   double     Weights[4];
00176 
00177   void  Resample(vtkPolyData *output, vtkPoints *inPts, vtkPoints *newPts, 
00178                  int npts, vtkIdType *pts, int npts2, vtkIdType *pts2);
00179   void  PointWalk(vtkPolyData *output, vtkPoints *inPts, 
00180                   int npts, vtkIdType *pts, int npts2, vtkIdType *pts2);
00181   
00182 private:
00183   vtkRuledSurfaceFilter(const vtkRuledSurfaceFilter&);  // Not implemented.
00184   void operator=(const vtkRuledSurfaceFilter&);  // Not implemented.
00185 };
00186 
00187 #endif
00188 
00189