VTK  9.3.0
vtkExtractPolyDataGeometry.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
35#ifndef vtkExtractPolyDataGeometry_h
36#define vtkExtractPolyDataGeometry_h
37
38#include "vtkFiltersExtractionModule.h" // For export macro
40
41VTK_ABI_NAMESPACE_BEGIN
43
44class VTKFILTERSEXTRACTION_EXPORT vtkExtractPolyDataGeometry : public vtkPolyDataAlgorithm
45{
46public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
54
59
61
65 vtkGetObjectMacro(ImplicitFunction, vtkImplicitFunction);
67
69
74 vtkSetMacro(ExtractInside, vtkTypeBool);
75 vtkGetMacro(ExtractInside, vtkTypeBool);
76 vtkBooleanMacro(ExtractInside, vtkTypeBool);
78
80
84 vtkSetMacro(ExtractBoundaryCells, vtkTypeBool);
85 vtkGetMacro(ExtractBoundaryCells, vtkTypeBool);
86 vtkBooleanMacro(ExtractBoundaryCells, vtkTypeBool);
88
90
94 vtkSetMacro(PassPoints, vtkTypeBool);
95 vtkGetMacro(PassPoints, vtkTypeBool);
96 vtkBooleanMacro(PassPoints, vtkTypeBool);
98
99protected:
102
103 // Usual data generation method
105
110
111 vtkIdType InsertPointInMap(vtkIdType i, vtkPoints* inPts, vtkPoints* newPts, vtkIdType* pointMap);
112
113private:
115 void operator=(const vtkExtractPolyDataGeometry&) = delete;
116};
117
119
123 vtkIdType i, vtkPoints* inPts, vtkPoints* newPts, vtkIdType* pointMap)
124{
125 double x[3];
126 inPts->GetPoint(i, x);
127 pointMap[i] = newPts->InsertNextPoint(x);
128 return pointMap[i];
129}
131
132VTK_ABI_NAMESPACE_END
133#endif
extract vtkPolyData cells that lies either entirely inside or outside of a specified implicit functio...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkExtractPolyDataGeometry(vtkImplicitFunction *f=nullptr)
vtkIdType InsertPointInMap(vtkIdType i, vtkPoints *inPts, vtkPoints *newPts, vtkIdType *pointMap)
When not passing points, have to use a point map to keep track of things.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
~vtkExtractPolyDataGeometry() override
vtkMTimeType GetMTime() override
Return the MTime taking into account changes to the implicit function.
virtual void SetImplicitFunction(vtkImplicitFunction *)
Specify the implicit function for inside/outside checks.
static vtkExtractPolyDataGeometry * New()
Construct object with ExtractInside turned on.
abstract interface for implicit functions
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:29
double * GetPoint(vtkIdType id)
Return a pointer to a double point x[3] for a specific id.
Definition vtkPoints.h:129
vtkIdType InsertNextPoint(const float x[3])
Insert point into next available slot.
Definition vtkPoints.h:200
Superclass for algorithms that produce only polydata as output.
int vtkTypeBool
Definition vtkABI.h:64
int vtkIdType
Definition vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270