VTK  9.3.0
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
43#ifndef vtkLinearExtrusionFilter_h
44#define vtkLinearExtrusionFilter_h
45
46#include "vtkFiltersModelingModule.h" // For export macro
48
49VTK_ABI_NAMESPACE_BEGIN
50class vtkDataArray;
51
52#define VTK_VECTOR_EXTRUSION 1
53#define VTK_NORMAL_EXTRUSION 2
54#define VTK_POINT_EXTRUSION 3
55
56class VTKFILTERSMODELING_EXPORT vtkLinearExtrusionFilter : public vtkPolyDataAlgorithm
57{
58public:
60 void PrintSelf(ostream& os, vtkIndent indent) override;
61
67
69
72 vtkSetClampMacro(ExtrusionType, int, VTK_VECTOR_EXTRUSION, VTK_POINT_EXTRUSION);
73 vtkGetMacro(ExtrusionType, int);
74 void SetExtrusionTypeToVectorExtrusion() { this->SetExtrusionType(VTK_VECTOR_EXTRUSION); }
75 void SetExtrusionTypeToNormalExtrusion() { this->SetExtrusionType(VTK_NORMAL_EXTRUSION); }
76 void SetExtrusionTypeToPointExtrusion() { this->SetExtrusionType(VTK_POINT_EXTRUSION); }
78
80
83 vtkSetMacro(Capping, vtkTypeBool);
84 vtkGetMacro(Capping, vtkTypeBool);
85 vtkBooleanMacro(Capping, vtkTypeBool);
87
89
92 vtkSetMacro(ScaleFactor, double);
93 vtkGetMacro(ScaleFactor, double);
95
97
101 vtkSetVector3Macro(Vector, double);
102 vtkGetVectorMacro(Vector, double, 3);
104
106
110 vtkSetVector3Macro(ExtrusionPoint, double);
111 vtkGetVectorMacro(ExtrusionPoint, double, 3);
113
114protected:
116 ~vtkLinearExtrusionFilter() override = default;
117
122 double Vector[3];
123 double ExtrusionPoint[3];
124
125 void (vtkLinearExtrusionFilter::*ExtrudePoint)(double x[3], vtkIdType id, vtkDataArray* normals);
126 void ViaNormal(double x[3], vtkIdType id, vtkDataArray* normals);
127 void ViaVector(double x[3], vtkIdType id, vtkDataArray* normals = nullptr);
128 void ViaPoint(double x[3], vtkIdType id, vtkDataArray* normals = nullptr);
129
130private:
132 void operator=(const vtkLinearExtrusionFilter&) = delete;
133};
134
135VTK_ABI_NAMESPACE_END
136#endif
abstract superclass for arrays of numeric data
a simple class to control print indentation
Definition vtkIndent.h:29
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)
static vtkLinearExtrusionFilter * New()
Create object with normal extrusion type, capping on, scale factor=1.0, vector (0,...
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.
Superclass for algorithms that produce only polydata as output.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_NORMAL_EXTRUSION
#define VTK_POINT_EXTRUSION
#define VTK_VECTOR_EXTRUSION
int vtkIdType
Definition vtkType.h:315