VTK  9.3.20240424
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
54#ifndef vtkExtractPolyDataGeometry_h
55#define vtkExtractPolyDataGeometry_h
56
57#include "vtkFiltersExtractionModule.h" // For export macro
59
60VTK_ABI_NAMESPACE_BEGIN
62
63class VTKFILTERSEXTRACTION_EXPORT vtkExtractPolyDataGeometry : public vtkPolyDataAlgorithm
64{
65public:
67 void PrintSelf(ostream& os, vtkIndent indent) override;
68
73
78
80
84 vtkGetObjectMacro(ImplicitFunction, vtkImplicitFunction);
86
88
93 vtkSetMacro(ExtractInside, vtkTypeBool);
94 vtkGetMacro(ExtractInside, vtkTypeBool);
95 vtkBooleanMacro(ExtractInside, vtkTypeBool);
97
99
103 vtkSetMacro(ExtractBoundaryCells, vtkTypeBool);
104 vtkGetMacro(ExtractBoundaryCells, vtkTypeBool);
105 vtkBooleanMacro(ExtractBoundaryCells, vtkTypeBool);
107
109
113 vtkSetMacro(PassPoints, vtkTypeBool);
114 vtkGetMacro(PassPoints, vtkTypeBool);
115 vtkBooleanMacro(PassPoints, vtkTypeBool);
117
118protected:
121
122 // Usual data generation method
124
129
130 vtkIdType InsertPointInMap(vtkIdType i, vtkPoints* inPts, vtkPoints* newPts, vtkIdType* pointMap);
131
132private:
134 void operator=(const vtkExtractPolyDataGeometry&) = delete;
135};
136
138
142 vtkIdType i, vtkPoints* inPts, vtkPoints* newPts, vtkIdType* pointMap)
143{
144 double x[3];
145 inPts->GetPoint(i, x);
146 pointMap[i] = newPts->InsertNextPoint(x);
147 return pointMap[i];
148}
150
151VTK_ABI_NAMESPACE_END
152#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:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:139
double * GetPoint(vtkIdType id)
Return a pointer to a double point x[3] for a specific id.
Definition vtkPoints.h:239
vtkIdType InsertNextPoint(const float x[3])
Insert point into next available slot.
Definition vtkPoints.h:310
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