VTK  9.3.0
vtkRuledSurfaceFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
54 #ifndef vtkRuledSurfaceFilter_h
55 #define vtkRuledSurfaceFilter_h
56 
57 #include "vtkFiltersModelingModule.h" // For export macro
58 #include "vtkPolyDataAlgorithm.h"
59 
60 VTK_ABI_NAMESPACE_BEGIN
61 class vtkIdList;
62 class vtkPoints;
63 class vtkPolyData;
64 
65 #define VTK_RULED_MODE_RESAMPLE 0
66 #define VTK_RULED_MODE_POINT_WALK 1
67 
68 class VTKFILTERSMODELING_EXPORT vtkRuledSurfaceFilter : public vtkPolyDataAlgorithm
69 {
70 public:
72  void PrintSelf(ostream& os, vtkIndent indent) override;
73 
79 
81 
84  vtkSetClampMacro(DistanceFactor, double, 1.0, VTK_DOUBLE_MAX);
85  vtkGetMacro(DistanceFactor, double);
87 
89 
94  vtkSetClampMacro(OnRatio, int, 1, VTK_INT_MAX);
95  vtkGetMacro(OnRatio, int);
97 
99 
104  vtkSetClampMacro(Offset, int, 0, VTK_INT_MAX);
105  vtkGetMacro(Offset, int);
107 
109 
116  vtkSetMacro(CloseSurface, vtkTypeBool);
117  vtkGetMacro(CloseSurface, vtkTypeBool);
118  vtkBooleanMacro(CloseSurface, vtkTypeBool);
120 
122 
129  vtkSetClampMacro(RuledMode, int, VTK_RULED_MODE_RESAMPLE, VTK_RULED_MODE_POINT_WALK);
130  vtkGetMacro(RuledMode, int);
131  void SetRuledModeToResample() { this->SetRuledMode(VTK_RULED_MODE_RESAMPLE); }
132  void SetRuledModeToPointWalk() { this->SetRuledMode(VTK_RULED_MODE_POINT_WALK); }
133  const char* GetRuledModeAsString();
135 
137 
144  vtkSetVector2Macro(Resolution, int);
145  vtkGetVectorMacro(Resolution, int, 2);
147 
149 
153  vtkSetMacro(PassLines, vtkTypeBool);
154  vtkGetMacro(PassLines, vtkTypeBool);
155  vtkBooleanMacro(PassLines, vtkTypeBool);
157 
159 
165  vtkSetMacro(OrientLoops, vtkTypeBool);
166  vtkGetMacro(OrientLoops, vtkTypeBool);
167  vtkBooleanMacro(OrientLoops, vtkTypeBool);
169 
170 protected:
173 
174  // Usual data generation method
176 
178  int OnRatio;
179  int Offset;
182  int Resolution[2];
185 
186 private:
187  vtkIdList* Ids;
188  double Weights[4];
189 
190  void Resample(vtkPolyData* output, vtkPolyData* input, vtkPoints* inPts, vtkPoints* newPts,
191  int npts, const vtkIdType* pts, int npts2, const vtkIdType* pts2);
192  void PointWalk(vtkPolyData* output, vtkPoints* inPts, int npts, const vtkIdType* pts, int npts2,
193  const vtkIdType* pts2);
194 
196  void operator=(const vtkRuledSurfaceFilter&) = delete;
197 };
198 
199 VTK_ABI_NAMESPACE_END
200 #endif
list of point or cell ids
Definition: vtkIdList.h:32
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:38
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
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:64
#define VTK_RULED_MODE_RESAMPLE
#define VTK_RULED_MODE_POINT_WALK
int vtkIdType
Definition: vtkType.h:315
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154
#define VTK_INT_MAX
Definition: vtkType.h:144