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
44#ifndef vtkExtractPolyDataGeometry_h
45#define vtkExtractPolyDataGeometry_h
46
47#include "vtkFiltersExtractionModule.h" // For export macro
49
50VTK_ABI_NAMESPACE_BEGIN
52
53class VTKFILTERSEXTRACTION_EXPORT vtkExtractPolyDataGeometry : public vtkPolyDataAlgorithm
54{
55public:
57 void PrintSelf(ostream& os, vtkIndent indent) override;
58
63
68
70
74 vtkGetObjectMacro(ImplicitFunction, vtkImplicitFunction);
76
78
83 vtkSetMacro(ExtractInside, vtkTypeBool);
84 vtkGetMacro(ExtractInside, vtkTypeBool);
85 vtkBooleanMacro(ExtractInside, vtkTypeBool);
87
89
93 vtkSetMacro(ExtractBoundaryCells, vtkTypeBool);
94 vtkGetMacro(ExtractBoundaryCells, vtkTypeBool);
95 vtkBooleanMacro(ExtractBoundaryCells, vtkTypeBool);
97
99
103 vtkSetMacro(PassPoints, vtkTypeBool);
104 vtkGetMacro(PassPoints, vtkTypeBool);
105 vtkBooleanMacro(PassPoints, vtkTypeBool);
107
108protected:
111
112 // Usual data generation method
114
119
120 vtkIdType InsertPointInMap(vtkIdType i, vtkPoints* inPts, vtkPoints* newPts, vtkIdType* pointMap);
121
122private:
124 void operator=(const vtkExtractPolyDataGeometry&) = delete;
125};
126
128
132 vtkIdType i, vtkPoints* inPts, vtkPoints* newPts, vtkIdType* pointMap)
133{
134 double x[3];
135 inPts->GetPoint(i, x);
136 pointMap[i] = newPts->InsertNextPoint(x);
137 return pointMap[i];
138}
140
141VTK_ABI_NAMESPACE_END
142#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:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:38
double * GetPoint(vtkIdType id)
Return a pointer to a double point x[3] for a specific id.
Definition vtkPoints.h:138
vtkIdType InsertNextPoint(const float x[3])
Insert point into next available slot.
Definition vtkPoints.h:209
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