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
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:159
vtkRuledSurfaceFilter::CloseSurface
vtkTypeBool CloseSurface
Definition: vtkRuledSurfaceFilter.h:188
vtkRuledSurfaceFilter::SetRuledModeToPointWalk
void SetRuledModeToPointWalk()
Definition: vtkRuledSurfaceFilter.h:139
vtkRuledSurfaceFilter::RuledMode
int RuledMode
Definition: vtkRuledSurfaceFilter.h:189
vtkIdType
int vtkIdType
Definition: vtkType.h:347
VTK_RULED_MODE_POINT_WALK
#define VTK_RULED_MODE_POINT_WALK
Definition: vtkRuledSurfaceFilter.h:71
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataAlgorithm.h
vtkRuledSurfaceFilter::SetRuledModeToResample
void SetRuledModeToResample()
Definition: vtkRuledSurfaceFilter.h:137
vtkRuledSurfaceFilter::OrientLoops
vtkTypeBool OrientLoops
Definition: vtkRuledSurfaceFilter.h:192
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkRuledSurfaceFilter::OnRatio
int OnRatio
Definition: vtkRuledSurfaceFilter.h:186
vtkRuledSurfaceFilter
generates a surface from a set of lines
Definition: vtkRuledSurfaceFilter.h:73
vtkRuledSurfaceFilter::DistanceFactor
double DistanceFactor
Definition: vtkRuledSurfaceFilter.h:185
vtkRuledSurfaceFilter::Offset
int Offset
Definition: vtkRuledSurfaceFilter.h:187
VTK_RULED_MODE_RESAMPLE
#define VTK_RULED_MODE_RESAMPLE
Definition: vtkRuledSurfaceFilter.h:70
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:169
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkRuledSurfaceFilter::PassLines
vtkTypeBool PassLines
Definition: vtkRuledSurfaceFilter.h:191
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44