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
52#ifndef vtkLinearExtrusionFilter_h
53#define vtkLinearExtrusionFilter_h
54
55#include "vtkFiltersModelingModule.h" // For export macro
57
58VTK_ABI_NAMESPACE_BEGIN
59class vtkDataArray;
60
61#define VTK_VECTOR_EXTRUSION 1
62#define VTK_NORMAL_EXTRUSION 2
63#define VTK_POINT_EXTRUSION 3
64
65class VTKFILTERSMODELING_EXPORT vtkLinearExtrusionFilter : public vtkPolyDataAlgorithm
66{
67public:
69 void PrintSelf(ostream& os, vtkIndent indent) override;
70
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
123protected:
125 ~vtkLinearExtrusionFilter() override = default;
126
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
139private:
141 void operator=(const vtkLinearExtrusionFilter&) = delete;
142};
143
144VTK_ABI_NAMESPACE_END
145#endif
abstract superclass for arrays of numeric data
a simple class to control print indentation
Definition vtkIndent.h:38
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