VTK  9.2.6
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 =========================================================================*/
66 #ifndef vtkRuledSurfaceFilter_h
67 #define vtkRuledSurfaceFilter_h
68 
69 #include "vtkFiltersModelingModule.h" // For export macro
70 #include "vtkPolyDataAlgorithm.h"
71 
72 class vtkIdList;
73 class vtkPoints;
74 class vtkPolyData;
75 
76 #define VTK_RULED_MODE_RESAMPLE 0
77 #define VTK_RULED_MODE_POINT_WALK 1
78 
79 class VTKFILTERSMODELING_EXPORT vtkRuledSurfaceFilter : public vtkPolyDataAlgorithm
80 {
81 public:
83  void PrintSelf(ostream& os, vtkIndent indent) override;
84 
90 
92 
95  vtkSetClampMacro(DistanceFactor, double, 1.0, VTK_DOUBLE_MAX);
96  vtkGetMacro(DistanceFactor, double);
98 
100 
105  vtkSetClampMacro(OnRatio, int, 1, VTK_INT_MAX);
106  vtkGetMacro(OnRatio, int);
108 
110 
115  vtkSetClampMacro(Offset, int, 0, VTK_INT_MAX);
116  vtkGetMacro(Offset, int);
118 
120 
127  vtkSetMacro(CloseSurface, vtkTypeBool);
128  vtkGetMacro(CloseSurface, vtkTypeBool);
129  vtkBooleanMacro(CloseSurface, vtkTypeBool);
131 
133 
140  vtkSetClampMacro(RuledMode, int, VTK_RULED_MODE_RESAMPLE, VTK_RULED_MODE_POINT_WALK);
141  vtkGetMacro(RuledMode, int);
142  void SetRuledModeToResample() { this->SetRuledMode(VTK_RULED_MODE_RESAMPLE); }
143  void SetRuledModeToPointWalk() { this->SetRuledMode(VTK_RULED_MODE_POINT_WALK); }
144  const char* GetRuledModeAsString();
146 
148 
155  vtkSetVector2Macro(Resolution, int);
156  vtkGetVectorMacro(Resolution, int, 2);
158 
160 
164  vtkSetMacro(PassLines, vtkTypeBool);
165  vtkGetMacro(PassLines, vtkTypeBool);
166  vtkBooleanMacro(PassLines, vtkTypeBool);
168 
170 
176  vtkSetMacro(OrientLoops, vtkTypeBool);
177  vtkGetMacro(OrientLoops, vtkTypeBool);
178  vtkBooleanMacro(OrientLoops, vtkTypeBool);
180 
181 protected:
184 
185  // Usual data generation method
187 
189  int OnRatio;
190  int Offset;
193  int Resolution[2];
196 
197 private:
198  vtkIdList* Ids;
199  double Weights[4];
200 
201  void Resample(vtkPolyData* output, vtkPolyData* input, vtkPoints* inPts, vtkPoints* newPts,
202  int npts, const vtkIdType* pts, int npts2, const vtkIdType* pts2);
203  void PointWalk(vtkPolyData* output, vtkPoints* inPts, int npts, const vtkIdType* pts, int npts2,
204  const vtkIdType* pts2);
205 
206 private:
208  void operator=(const vtkRuledSurfaceFilter&) = delete;
209 };
210 
211 #endif
list of point or cell ids
Definition: vtkIdList.h:43
a simple class to control print indentation
Definition: vtkIndent.h:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:49
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:100
generates a surface from a set of lines
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkRuledSurfaceFilter * New()
Construct object with OnRatio=1, Offset=0.
~vtkRuledSurfaceFilter() override
void SetRuledModeToPointWalk()
Set the mode by which to create the ruled surface.
void SetRuledModeToResample()
Set the mode by which to create the ruled surface.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const char * GetRuledModeAsString()
Set the mode by which to create the ruled surface.
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_RULED_MODE_RESAMPLE
#define VTK_RULED_MODE_POINT_WALK
int vtkIdType
Definition: vtkType.h:332
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
#define VTK_INT_MAX
Definition: vtkType.h:155