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) 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,vtkTypeBool);
116  vtkGetMacro(CloseSurface,vtkTypeBool);
117  vtkBooleanMacro(CloseSurface,vtkTypeBool);
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,vtkTypeBool);
156  vtkGetMacro(PassLines,vtkTypeBool);
157  vtkBooleanMacro(PassLines,vtkTypeBool);
159 
161 
167  vtkSetMacro(OrientLoops,vtkTypeBool);
168  vtkGetMacro(OrientLoops,vtkTypeBool);
169  vtkBooleanMacro(OrientLoops,vtkTypeBool);
171 
172 protected:
174  ~vtkRuledSurfaceFilter() override;
175 
176  // Usual data generation method
178 
180  int OnRatio;
181  int Offset;
184  int Resolution[2];
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:
200  void operator=(const vtkRuledSurfaceFilter&) = delete;
201 };
202 
203 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:169
void SetRuledModeToResample()
Set the mode by which to create the ruled surface.
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:159
int vtkIdType
Definition: vtkType.h:347
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
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
void SetRuledModeToPointWalk()
Set the mode by which to create the ruled surface.
Store zero or more vtkInformation instances.
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.