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 =========================================================================*/
60 #ifndef vtkRuledSurfaceFilter_h
61 #define vtkRuledSurfaceFilter_h
62 
63 #include "vtkFiltersModelingModule.h" // For export macro
64 #include "vtkPolyDataAlgorithm.h"
65 
66 class vtkIdList;
67 class vtkPoints;
68 class vtkPolyData;
69 
70 #define VTK_RULED_MODE_RESAMPLE 0
71 #define VTK_RULED_MODE_POINT_WALK 1
72 
73 class VTKFILTERSMODELING_EXPORT vtkRuledSurfaceFilter : public vtkPolyDataAlgorithm
74 {
75 public:
77  void PrintSelf(ostream& os, vtkIndent indent) override;
78 
83  static vtkRuledSurfaceFilter *New();
84 
86 
89  vtkSetClampMacro(DistanceFactor,double,1.0,VTK_DOUBLE_MAX);
90  vtkGetMacro(DistanceFactor,double);
92 
94 
99  vtkSetClampMacro(OnRatio,int,1,VTK_INT_MAX);
100  vtkGetMacro(OnRatio,int);
102 
104 
109  vtkSetClampMacro(Offset,int,0,VTK_INT_MAX);
110  vtkGetMacro(Offset,int);
112 
114 
121  vtkSetMacro(CloseSurface,vtkTypeBool);
122  vtkGetMacro(CloseSurface,vtkTypeBool);
123  vtkBooleanMacro(CloseSurface,vtkTypeBool);
125 
127 
134  vtkSetClampMacro(RuledMode,int,
136  vtkGetMacro(RuledMode,int);
138  {this->SetRuledMode(VTK_RULED_MODE_RESAMPLE);}
140  {this->SetRuledMode(VTK_RULED_MODE_POINT_WALK);}
141  const char *GetRuledModeAsString();
143 
145 
152  vtkSetVector2Macro(Resolution, int);
153  vtkGetVectorMacro(Resolution, int, 2);
155 
157 
161  vtkSetMacro(PassLines,vtkTypeBool);
162  vtkGetMacro(PassLines,vtkTypeBool);
163  vtkBooleanMacro(PassLines,vtkTypeBool);
165 
167 
173  vtkSetMacro(OrientLoops,vtkTypeBool);
174  vtkGetMacro(OrientLoops,vtkTypeBool);
175  vtkBooleanMacro(OrientLoops,vtkTypeBool);
177 
178 protected:
180  ~vtkRuledSurfaceFilter() override;
181 
182  // Usual data generation method
184 
186  int OnRatio;
187  int Offset;
190  int Resolution[2];
193 
194 private:
195  vtkIdList *Ids;
196  double Weights[4];
197 
198  void Resample(vtkPolyData *output, vtkPolyData *input,
199  vtkPoints *inPts, vtkPoints *newPts,
200  int npts, vtkIdType *pts, int npts2, vtkIdType *pts2);
201  void PointWalk(vtkPolyData *output, vtkPoints *inPts,
202  int npts, vtkIdType *pts, int npts2, vtkIdType *pts2);
203 
204 private:
206  void operator=(const vtkRuledSurfaceFilter&) = delete;
207 };
208 
209 #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:85
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:39
list of point or cell ids
Definition: vtkIdList.h:36
#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:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.