VTK  9.4.20241124
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
122#ifndef vtkLinearExtrusionFilter_h
123#define vtkLinearExtrusionFilter_h
124
125#include "vtkFiltersModelingModule.h" // For export macro
126#include "vtkPolyDataAlgorithm.h"
127
128VTK_ABI_NAMESPACE_BEGIN
129class vtkDataArray;
130
131#define VTK_VECTOR_EXTRUSION 1
132#define VTK_NORMAL_EXTRUSION 2
133#define VTK_POINT_EXTRUSION 3
134
135class VTKFILTERSMODELING_EXPORT vtkLinearExtrusionFilter : public vtkPolyDataAlgorithm
136{
137public:
139 void PrintSelf(ostream& os, vtkIndent indent) override;
140
146
148
151 vtkSetClampMacro(ExtrusionType, int, VTK_VECTOR_EXTRUSION, VTK_POINT_EXTRUSION);
152 vtkGetMacro(ExtrusionType, int);
153 void SetExtrusionTypeToVectorExtrusion() { this->SetExtrusionType(VTK_VECTOR_EXTRUSION); }
154 void SetExtrusionTypeToNormalExtrusion() { this->SetExtrusionType(VTK_NORMAL_EXTRUSION); }
155 void SetExtrusionTypeToPointExtrusion() { this->SetExtrusionType(VTK_POINT_EXTRUSION); }
157
159
162 vtkSetMacro(Capping, vtkTypeBool);
163 vtkGetMacro(Capping, vtkTypeBool);
164 vtkBooleanMacro(Capping, vtkTypeBool);
166
168
171 vtkSetMacro(ScaleFactor, double);
172 vtkGetMacro(ScaleFactor, double);
174
176
180 vtkSetVector3Macro(Vector, double);
181 vtkGetVectorMacro(Vector, double, 3);
183
185
189 vtkSetVector3Macro(ExtrusionPoint, double);
190 vtkGetVectorMacro(ExtrusionPoint, double, 3);
192
193protected:
195 ~vtkLinearExtrusionFilter() override = default;
196
201 double Vector[3];
202 double ExtrusionPoint[3];
203
204 void (vtkLinearExtrusionFilter::*ExtrudePoint)(double x[3], vtkIdType id, vtkDataArray* normals);
205 void ViaNormal(double x[3], vtkIdType id, vtkDataArray* normals);
206 void ViaVector(double x[3], vtkIdType id, vtkDataArray* normals = nullptr);
207 void ViaPoint(double x[3], vtkIdType id, vtkDataArray* normals = nullptr);
208
209private:
211 void operator=(const vtkLinearExtrusionFilter&) = delete;
212};
213
214VTK_ABI_NAMESPACE_END
215#endif
abstract superclass for arrays of numeric data
a simple class to control print indentation
Definition vtkIndent.h:108
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