VTK: Filters/Modeling/vtkLinearExtrusionFilter.h Source File

| VTK 9.3.1

vtkLinearExtrusionFilter.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
52 #ifndef vtkLinearExtrusionFilter_h
53 #define vtkLinearExtrusionFilter_h
54
55 #include "vtkFiltersModelingModule.h" // For export macro
56 #include "vtkPolyDataAlgorithm.h"
57
58 VTK_ABI_NAMESPACE_BEGIN
59 class vtkDataArray;
60
61 #define VTK_VECTOR_EXTRUSION 1
62 #define VTK_NORMAL_EXTRUSION 2
63 #define VTK_POINT_EXTRUSION 3
64
65 class VTKFILTERSMODELING_EXPORT vtkLinearExtrusionFilter : public vtkPolyDataAlgorithm
66 {
67 public:
68 vtkTypeMacro(vtkLinearExtrusionFilter, vtkPolyDataAlgorithm);
69 void PrintSelf(ostream& os, vtkIndent indent) override;
70
75 static vtkLinearExtrusionFilter* New();
76
78
81 vtkSetClampMacro(ExtrusionType, int, VTK_VECTOR_EXTRUSION, VTK_POINT_EXTRUSION);
82 vtkGetMacro(ExtrusionType, int);
83 void SetExtrusionTypeToVectorExtrusion() { this->SetExtrusionType(VTK_VECTOR_EXTRUSION); }
84 void SetExtrusionTypeToNormalExtrusion() { this->SetExtrusionType(VTK_NORMAL_EXTRUSION); }
85 void SetExtrusionTypeToPointExtrusion() { this->SetExtrusionType(VTK_POINT_EXTRUSION); }
87
89
92 vtkSetMacro(Capping, vtkTypeBool);
93 vtkGetMacro(Capping, vtkTypeBool);
94 vtkBooleanMacro(Capping, vtkTypeBool);
96
98
101 vtkSetMacro(ScaleFactor, double);
102 vtkGetMacro(ScaleFactor, double);
104
106
110 vtkSetVector3Macro(Vector, double);
111 vtkGetVectorMacro(Vector, double, 3);
113
115
119 vtkSetVector3Macro(ExtrusionPoint, double);
120 vtkGetVectorMacro(ExtrusionPoint, double, 3);
122
123 protected:
124 vtkLinearExtrusionFilter();
125 ~vtkLinearExtrusionFilter() override = default;
126
127 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
128 int ExtrusionType;
129 vtkTypeBool Capping;
130 double ScaleFactor;
131 double Vector[3];
132 double ExtrusionPoint[3];
133
134 void (vtkLinearExtrusionFilter::*ExtrudePoint)(double x[3], vtkIdType id, vtkDataArray* normals);
135 void ViaNormal(double x[3], vtkIdType id, vtkDataArray* normals);
136 void ViaVector(double x[3], vtkIdType id, vtkDataArray* normals = nullptr);
137 void ViaPoint(double x[3], vtkIdType id, vtkDataArray* normals = nullptr);
138
139 private:
140 vtkLinearExtrusionFilter(const vtkLinearExtrusionFilter&) = delete;
141 void operator=(const vtkLinearExtrusionFilter&) = delete;
142 };
143
144 VTK_ABI_NAMESPACE_END
145 #endif
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkLinearExtrusionFilter
sweep polygonal data creating a "skirt" from free edges and lines, and lines from vertices
Definition: vtkLinearExtrusionFilter.h:66
vtkLinearExtrusionFilter::vtkLinearExtrusionFilter
vtkLinearExtrusionFilter()
vtkLinearExtrusionFilter::SetExtrusionTypeToPointExtrusion
void SetExtrusionTypeToPointExtrusion()
Set/Get the type of extrusion.
Definition: vtkLinearExtrusionFilter.h:85
vtkLinearExtrusionFilter::SetExtrusionTypeToNormalExtrusion
void SetExtrusionTypeToNormalExtrusion()
Set/Get the type of extrusion.
Definition: vtkLinearExtrusionFilter.h:84
vtkLinearExtrusionFilter::~vtkLinearExtrusionFilter
~vtkLinearExtrusionFilter() override=default
vtkLinearExtrusionFilter::ExtrusionType
int ExtrusionType
Definition: vtkLinearExtrusionFilter.h:128
vtkLinearExtrusionFilter::ScaleFactor
double ScaleFactor
Definition: vtkLinearExtrusionFilter.h:130
vtkLinearExtrusionFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkLinearExtrusionFilter::ViaVector
void ViaVector(double x[3], vtkIdType id, vtkDataArray *normals=nullptr)
vtkLinearExtrusionFilter::Capping
vtkTypeBool Capping
Definition: vtkLinearExtrusionFilter.h:129
vtkLinearExtrusionFilter::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkLinearExtrusionFilter::ViaPoint
void ViaPoint(double x[3], vtkIdType id, vtkDataArray *normals=nullptr)
vtkLinearExtrusionFilter::ViaNormal
void ViaNormal(double x[3], vtkIdType id, vtkDataArray *normals)
vtkLinearExtrusionFilter::SetExtrusionTypeToVectorExtrusion
void SetExtrusionTypeToVectorExtrusion()
Set/Get the type of extrusion.
Definition: vtkLinearExtrusionFilter.h:83
vtkLinearExtrusionFilter::New
static vtkLinearExtrusionFilter * New()
Create object with normal extrusion type, capping on, scale factor=1.0, vector (0,...
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:43
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
VTK_NORMAL_EXTRUSION
#define VTK_NORMAL_EXTRUSION
Definition: vtkLinearExtrusionFilter.h:62
VTK_POINT_EXTRUSION
#define VTK_POINT_EXTRUSION
Definition: vtkLinearExtrusionFilter.h:63
VTK_VECTOR_EXTRUSION
#define VTK_VECTOR_EXTRUSION
Definition: vtkLinearExtrusionFilter.h:61
vtkPolyDataAlgorithm.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315