VTK
vtkRuledSurfaceFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRuledSurfaceFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
54 #ifndef vtkRuledSurfaceFilter_h
55 #define vtkRuledSurfaceFilter_h
56 
57 #include "vtkFiltersModelingModule.h" // For export macro
58 #include "vtkPolyDataAlgorithm.h"
59 
60 class vtkIdList;
61 class vtkPoints;
62 class vtkPolyData;
63 
64 #define VTK_RULED_MODE_RESAMPLE 0
65 #define VTK_RULED_MODE_POINT_WALK 1
66 
67 class VTKFILTERSMODELING_EXPORT vtkRuledSurfaceFilter : public vtkPolyDataAlgorithm
68 {
69 public:
71  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
72 
77  static vtkRuledSurfaceFilter *New();
78 
80 
83  vtkSetClampMacro(DistanceFactor,double,1.0,VTK_DOUBLE_MAX);
84  vtkGetMacro(DistanceFactor,double);
86 
88 
93  vtkSetClampMacro(OnRatio,int,1,VTK_INT_MAX);
94  vtkGetMacro(OnRatio,int);
96 
98 
103  vtkSetClampMacro(Offset,int,0,VTK_INT_MAX);
104  vtkGetMacro(Offset,int);
106 
108 
115  vtkSetMacro(CloseSurface,int);
116  vtkGetMacro(CloseSurface,int);
117  vtkBooleanMacro(CloseSurface,int);
119 
121 
128  vtkSetClampMacro(RuledMode,int,
130  vtkGetMacro(RuledMode,int);
132  {this->SetRuledMode(VTK_RULED_MODE_RESAMPLE);}
134  {this->SetRuledMode(VTK_RULED_MODE_POINT_WALK);}
135  const char *GetRuledModeAsString();
137 
139 
146  vtkSetVector2Macro(Resolution, int);
147  vtkGetVectorMacro(Resolution, int, 2);
149 
151 
155  vtkSetMacro(PassLines,int);
156  vtkGetMacro(PassLines,int);
157  vtkBooleanMacro(PassLines,int);
159 
161 
167  vtkSetMacro(OrientLoops,int);
168  vtkGetMacro(OrientLoops,int);
169  vtkBooleanMacro(OrientLoops,int);
171 
172 protected:
174  ~vtkRuledSurfaceFilter() VTK_OVERRIDE;
175 
176  // Usual data generation method
177  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
178 
179  double DistanceFactor;
180  int OnRatio;
181  int Offset;
182  int CloseSurface;
183  int RuledMode;
184  int Resolution[2];
185  int PassLines;
186  int OrientLoops;
187 
188 private:
189  vtkIdList *Ids;
190  double Weights[4];
191 
192  void Resample(vtkPolyData *output, vtkPolyData *input,
193  vtkPoints *inPts, vtkPoints *newPts,
194  int npts, vtkIdType *pts, int npts2, vtkIdType *pts2);
195  void PointWalk(vtkPolyData *output, vtkPoints *inPts,
196  int npts, vtkIdType *pts, int npts2, vtkIdType *pts2);
197 
198 private:
199  vtkRuledSurfaceFilter(const vtkRuledSurfaceFilter&) VTK_DELETE_FUNCTION;
200  void operator=(const vtkRuledSurfaceFilter&) VTK_DELETE_FUNCTION;
201 };
202 
203 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:167
void SetRuledModeToResample()
Set the mode by which to create the ruled surface.
Store vtkAlgorithm input/output information.
#define VTK_INT_MAX
Definition: vtkType.h:157
int vtkIdType
Definition: vtkType.h:345
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
#define VTK_RULED_MODE_POINT_WALK
a simple class to control print indentation
Definition: vtkIndent.h:33
list of point or cell ids
Definition: vtkIdList.h:30
#define VTK_RULED_MODE_RESAMPLE
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetRuledModeToPointWalk()
Set the mode by which to create the ruled surface.
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
generates a surface from a set of lines
represent and manipulate 3D points
Definition: vtkPoints.h:33
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.