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 =========================================================================*/
57 #ifndef vtkRuledSurfaceFilter_h
58 #define vtkRuledSurfaceFilter_h
59 
60 #include "vtkFiltersModelingModule.h" // For export macro
61 #include "vtkPolyDataAlgorithm.h"
62 
63 class vtkIdList;
64 class vtkPoints;
65 class vtkPolyData;
66 
67 #define VTK_RULED_MODE_RESAMPLE 0
68 #define VTK_RULED_MODE_POINT_WALK 1
69 
70 class VTKFILTERSMODELING_EXPORT vtkRuledSurfaceFilter : public vtkPolyDataAlgorithm
71 {
72 public:
74  void PrintSelf(ostream& os, vtkIndent indent) override;
75 
80  static vtkRuledSurfaceFilter* New();
81 
83 
86  vtkSetClampMacro(DistanceFactor, double, 1.0, VTK_DOUBLE_MAX);
87  vtkGetMacro(DistanceFactor, double);
89 
91 
96  vtkSetClampMacro(OnRatio, int, 1, VTK_INT_MAX);
97  vtkGetMacro(OnRatio, int);
99 
101 
106  vtkSetClampMacro(Offset, int, 0, VTK_INT_MAX);
107  vtkGetMacro(Offset, int);
109 
111 
118  vtkSetMacro(CloseSurface, vtkTypeBool);
119  vtkGetMacro(CloseSurface, vtkTypeBool);
120  vtkBooleanMacro(CloseSurface, vtkTypeBool);
122 
124 
131  vtkSetClampMacro(RuledMode, int, VTK_RULED_MODE_RESAMPLE, VTK_RULED_MODE_POINT_WALK);
132  vtkGetMacro(RuledMode, int);
133  void SetRuledModeToResample() { this->SetRuledMode(VTK_RULED_MODE_RESAMPLE); }
134  void SetRuledModeToPointWalk() { 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, vtkPoints* inPts, vtkPoints* newPts,
193  int npts, const vtkIdType* pts, int npts2, const vtkIdType* pts2);
194  void PointWalk(vtkPolyData* output, vtkPoints* inPts, int npts, const vtkIdType* pts, int npts2,
195  const vtkIdType* pts2);
196 
197 private:
199  void operator=(const vtkRuledSurfaceFilter&) = delete;
200 };
201 
202 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
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:155
int vtkIdType
Definition: vtkType.h:332
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
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:33
#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.