VTK  9.1.0
vtkLinearExtrusionFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkLinearExtrusionFilter.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 =========================================================================*/
131 #ifndef vtkLinearExtrusionFilter_h
132 #define vtkLinearExtrusionFilter_h
133 
134 #include "vtkFiltersModelingModule.h" // For export macro
135 #include "vtkPolyDataAlgorithm.h"
136 
137 class vtkDataArray;
138 
139 #define VTK_VECTOR_EXTRUSION 1
140 #define VTK_NORMAL_EXTRUSION 2
141 #define VTK_POINT_EXTRUSION 3
142 
143 class VTKFILTERSMODELING_EXPORT vtkLinearExtrusionFilter : public vtkPolyDataAlgorithm
144 {
145 public:
147  void PrintSelf(ostream& os, vtkIndent indent) override;
148 
154 
156 
159  vtkSetClampMacro(ExtrusionType, int, VTK_VECTOR_EXTRUSION, VTK_POINT_EXTRUSION);
160  vtkGetMacro(ExtrusionType, int);
161  void SetExtrusionTypeToVectorExtrusion() { this->SetExtrusionType(VTK_VECTOR_EXTRUSION); }
162  void SetExtrusionTypeToNormalExtrusion() { this->SetExtrusionType(VTK_NORMAL_EXTRUSION); }
163  void SetExtrusionTypeToPointExtrusion() { this->SetExtrusionType(VTK_POINT_EXTRUSION); }
165 
167 
170  vtkSetMacro(Capping, vtkTypeBool);
171  vtkGetMacro(Capping, vtkTypeBool);
172  vtkBooleanMacro(Capping, vtkTypeBool);
174 
176 
179  vtkSetMacro(ScaleFactor, double);
180  vtkGetMacro(ScaleFactor, double);
182 
184 
188  vtkSetVector3Macro(Vector, double);
189  vtkGetVectorMacro(Vector, double, 3);
191 
193 
197  vtkSetVector3Macro(ExtrusionPoint, double);
198  vtkGetVectorMacro(ExtrusionPoint, double, 3);
200 
201 protected:
203  ~vtkLinearExtrusionFilter() override = default;
204 
208  double ScaleFactor;
209  double Vector[3];
210  double ExtrusionPoint[3];
211 
212  void (vtkLinearExtrusionFilter::*ExtrudePoint)(double x[3], vtkIdType id, vtkDataArray* normals);
213  void ViaNormal(double x[3], vtkIdType id, vtkDataArray* normals);
214  void ViaVector(double x[3], vtkIdType id, vtkDataArray* normals = nullptr);
215  void ViaPoint(double x[3], vtkIdType id, vtkDataArray* normals = nullptr);
216 
217 private:
219  void operator=(const vtkLinearExtrusionFilter&) = delete;
220 };
221 
222 #endif
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
sweep polygonal data creating a "skirt" from free edges and lines, and lines from vertices
void SetExtrusionTypeToPointExtrusion()
Set/Get the type of extrusion.
void SetExtrusionTypeToNormalExtrusion()
Set/Get the type of extrusion.
~vtkLinearExtrusionFilter() override=default
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ViaVector(double x[3], vtkIdType id, vtkDataArray *normals=nullptr)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void ViaPoint(double x[3], vtkIdType id, vtkDataArray *normals=nullptr)
void ViaNormal(double x[3], vtkIdType id, vtkDataArray *normals)
void SetExtrusionTypeToVectorExtrusion()
Set/Get the type of extrusion.
static vtkLinearExtrusionFilter * New()
Create object with normal extrusion type, capping on, scale factor=1.0, vector (0,...
Superclass for algorithms that produce only polydata as output.
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_NORMAL_EXTRUSION
#define VTK_POINT_EXTRUSION
#define VTK_VECTOR_EXTRUSION
int vtkIdType
Definition: vtkType.h:332