VTK  9.3.1
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
39 #include "vtkPolyDataAlgorithm.h"
40 
41 VTK_ABI_NAMESPACE_BEGIN
43 
44 class VTKFILTERSEXTRACTION_EXPORT vtkExtractPolyDataGeometry : public vtkPolyDataAlgorithm
45 {
46 public:
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
54 
58  vtkMTimeType GetMTime() override;
59 
61 
64  virtual void SetImplicitFunction(vtkImplicitFunction*);
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 
99 protected:
101  ~vtkExtractPolyDataGeometry() override;
102 
103  // Usual data generation method
105 
110 
111  vtkIdType InsertPointInMap(vtkIdType i, vtkPoints* inPts, vtkPoints* newPts, vtkIdType* pointMap);
112 
113 private:
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 
132 VTK_ABI_NAMESPACE_END
133 #endif
abstract interface for implicit functions
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
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.
vtkIdType InsertNextPoint(const float x[3])
Insert point into next available slot.
Definition: vtkPoints.h:200
int vtkIdType
Definition: vtkType.h:315
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:64
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual vtkMTimeType GetMTime()
Return this object's modified time.
double * GetPoint(vtkIdType id)
Return a pointer to a double point x[3] for a specific id.
Definition: vtkPoints.h:129
Store zero or more vtkInformation instances.
extract vtkPolyData cells that lies either entirely inside or outside of a specified implicit functio...
represent and manipulate 3D points
Definition: vtkPoints.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.