VTK  9.0.1
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 =========================================================================*/
54 #ifndef vtkRuledSurfaceFilter_h
55 #define vtkRuledSurfaceFilter_h
56 
57 #include "vtkFiltersModelingModule.h" // For export macro
58 #include "vtkPolyDataAlgorithm.h"
59 
60 class vtkIdList;
61 class vtkPoints;
62 class vtkPolyData;
63 
64 #define VTK_RULED_MODE_RESAMPLE 0
65 #define VTK_RULED_MODE_POINT_WALK 1
66 
67 class VTKFILTERSMODELING_EXPORT vtkRuledSurfaceFilter : public vtkPolyDataAlgorithm
68 {
69 public:
71  void PrintSelf(ostream& os, vtkIndent indent) override;
72 
77  static vtkRuledSurfaceFilter* New();
78 
80 
83  vtkSetClampMacro(DistanceFactor, double, 1.0, VTK_DOUBLE_MAX);
84  vtkGetMacro(DistanceFactor, double);
86 
88 
93  vtkSetClampMacro(OnRatio, int, 1, VTK_INT_MAX);
94  vtkGetMacro(OnRatio, int);
96 
98 
103  vtkSetClampMacro(Offset, int, 0, VTK_INT_MAX);
104  vtkGetMacro(Offset, int);
106 
108 
115  vtkSetMacro(CloseSurface, vtkTypeBool);
116  vtkGetMacro(CloseSurface, vtkTypeBool);
117  vtkBooleanMacro(CloseSurface, vtkTypeBool);
119 
121 
128  vtkSetClampMacro(RuledMode, int, VTK_RULED_MODE_RESAMPLE, VTK_RULED_MODE_POINT_WALK);
129  vtkGetMacro(RuledMode, int);
130  void SetRuledModeToResample() { this->SetRuledMode(VTK_RULED_MODE_RESAMPLE); }
131  void SetRuledModeToPointWalk() { this->SetRuledMode(VTK_RULED_MODE_POINT_WALK); }
132  const char* GetRuledModeAsString();
134 
136 
143  vtkSetVector2Macro(Resolution, int);
144  vtkGetVectorMacro(Resolution, int, 2);
146 
148 
152  vtkSetMacro(PassLines, vtkTypeBool);
153  vtkGetMacro(PassLines, vtkTypeBool);
154  vtkBooleanMacro(PassLines, vtkTypeBool);
156 
158 
164  vtkSetMacro(OrientLoops, vtkTypeBool);
165  vtkGetMacro(OrientLoops, vtkTypeBool);
166  vtkBooleanMacro(OrientLoops, vtkTypeBool);
168 
169 protected:
171  ~vtkRuledSurfaceFilter() override;
172 
173  // Usual data generation method
175 
177  int OnRatio;
178  int Offset;
181  int Resolution[2];
184 
185 private:
186  vtkIdList* Ids;
187  double Weights[4];
188 
189  void Resample(vtkPolyData* output, vtkPolyData* input, vtkPoints* inPts, vtkPoints* newPts,
190  int npts, const vtkIdType* pts, int npts2, const vtkIdType* pts2);
191  void PointWalk(vtkPolyData* output, vtkPoints* inPts, int npts, const vtkIdType* pts, int npts2,
192  const vtkIdType* pts2);
193 
194 private:
196  void operator=(const vtkRuledSurfaceFilter&) = delete;
197 };
198 
199 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:155
vtkRuledSurfaceFilter::CloseSurface
vtkTypeBool CloseSurface
Definition: vtkRuledSurfaceFilter.h:179
vtkRuledSurfaceFilter::SetRuledModeToPointWalk
void SetRuledModeToPointWalk()
Definition: vtkRuledSurfaceFilter.h:131
vtkRuledSurfaceFilter::RuledMode
int RuledMode
Definition: vtkRuledSurfaceFilter.h:180
vtkIdType
int vtkIdType
Definition: vtkType.h:338
VTK_RULED_MODE_POINT_WALK
#define VTK_RULED_MODE_POINT_WALK
Definition: vtkRuledSurfaceFilter.h:65
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
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:130
vtkRuledSurfaceFilter::OrientLoops
vtkTypeBool OrientLoops
Definition: vtkRuledSurfaceFilter.h:183
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:33
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:30
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkRuledSurfaceFilter::OnRatio
int OnRatio
Definition: vtkRuledSurfaceFilter.h:177
vtkRuledSurfaceFilter
generates a surface from a set of lines
Definition: vtkRuledSurfaceFilter.h:67
vtkRuledSurfaceFilter::DistanceFactor
double DistanceFactor
Definition: vtkRuledSurfaceFilter.h:176
vtkRuledSurfaceFilter::Offset
int Offset
Definition: vtkRuledSurfaceFilter.h:178
VTK_RULED_MODE_RESAMPLE
#define VTK_RULED_MODE_RESAMPLE
Definition: vtkRuledSurfaceFilter.h:64
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkRuledSurfaceFilter::PassLines
vtkTypeBool PassLines
Definition: vtkRuledSurfaceFilter.h:182
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41