VTK  9.2.6
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 =========================================================================*/
55 #ifndef vtkLinearExtrusionFilter_h
56 #define vtkLinearExtrusionFilter_h
57 
58 #include "vtkFiltersModelingModule.h" // For export macro
59 #include "vtkPolyDataAlgorithm.h"
60 
61 class vtkDataArray;
62 
63 #define VTK_VECTOR_EXTRUSION 1
64 #define VTK_NORMAL_EXTRUSION 2
65 #define VTK_POINT_EXTRUSION 3
66 
67 class VTKFILTERSMODELING_EXPORT vtkLinearExtrusionFilter : public vtkPolyDataAlgorithm
68 {
69 public:
71  void PrintSelf(ostream& os, vtkIndent indent) override;
72 
77  static vtkLinearExtrusionFilter* New();
78 
80 
83  vtkSetClampMacro(ExtrusionType, int, VTK_VECTOR_EXTRUSION, VTK_POINT_EXTRUSION);
84  vtkGetMacro(ExtrusionType, int);
85  void SetExtrusionTypeToVectorExtrusion() { this->SetExtrusionType(VTK_VECTOR_EXTRUSION); }
86  void SetExtrusionTypeToNormalExtrusion() { this->SetExtrusionType(VTK_NORMAL_EXTRUSION); }
87  void SetExtrusionTypeToPointExtrusion() { this->SetExtrusionType(VTK_POINT_EXTRUSION); }
89 
91 
94  vtkSetMacro(Capping, vtkTypeBool);
95  vtkGetMacro(Capping, vtkTypeBool);
96  vtkBooleanMacro(Capping, vtkTypeBool);
98 
100 
103  vtkSetMacro(ScaleFactor, double);
104  vtkGetMacro(ScaleFactor, double);
106 
108 
112  vtkSetVector3Macro(Vector, double);
113  vtkGetVectorMacro(Vector, double, 3);
115 
117 
121  vtkSetVector3Macro(ExtrusionPoint, double);
122  vtkGetVectorMacro(ExtrusionPoint, double, 3);
124 
125 protected:
127  ~vtkLinearExtrusionFilter() override = default;
128 
132  double ScaleFactor;
133  double Vector[3];
134  double ExtrusionPoint[3];
135 
136  void (vtkLinearExtrusionFilter::*ExtrudePoint)(double x[3], vtkIdType id, vtkDataArray* normals);
137  void ViaNormal(double x[3], vtkIdType id, vtkDataArray* normals);
138  void ViaVector(double x[3], vtkIdType id, vtkDataArray* normals = nullptr);
139  void ViaPoint(double x[3], vtkIdType id, vtkDataArray* normals = nullptr);
140 
141 private:
143  void operator=(const vtkLinearExtrusionFilter&) = delete;
144 };
145 
146 #endif
#define VTK_POINT_EXTRUSION
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
int vtkIdType
Definition: vtkType.h:332
#define VTK_VECTOR_EXTRUSION
#define VTK_NORMAL_EXTRUSION
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
void SetExtrusionTypeToVectorExtrusion()
Set/Get the type of extrusion.
void SetExtrusionTypeToPointExtrusion()
Set/Get the type of extrusion.
void SetExtrusionTypeToNormalExtrusion()
Set/Get the type of extrusion.
sweep polygonal data creating a "skirt" from free edges and lines, and lines from vertices ...
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.