VTK  9.3.0
vtkConvexHull2D.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
3
39#ifndef vtkConvexHull2D_h
40#define vtkConvexHull2D_h
41
43#include "vtkRenderingAnnotationModule.h" // For export macro
44#include "vtkSmartPointer.h" // needed for ivars
45
46VTK_ABI_NAMESPACE_BEGIN
47class vtkCoordinate;
48class vtkPoints;
49class vtkPolygon;
50class vtkPolyLine;
51class vtkRenderer;
52class vtkTransform;
54
55class VTKRENDERINGANNOTATION_EXPORT vtkConvexHull2D : public vtkPolyDataAlgorithm
56{
57public:
60 void PrintSelf(ostream& os, vtkIndent indent) override;
61
63
66 vtkGetMacro(ScaleFactor, double);
67 vtkSetMacro(ScaleFactor, double);
69
71
74 vtkGetMacro(Outline, bool);
75 vtkSetMacro(Outline, bool);
76 vtkBooleanMacro(Outline, bool);
78
80 {
81 BoundingRectangle = 0,
82 ConvexHull
83 };
84
86
89 vtkGetMacro(HullShape, int);
90 vtkSetClampMacro(HullShape, int, 0, 1);
92
94
98 vtkSetClampMacro(MinHullSizeInWorld, double, 0.0, VTK_DOUBLE_MAX);
99 vtkGetMacro(MinHullSizeInWorld, double);
101
103
107 vtkSetClampMacro(MinHullSizeInDisplay, int, 0, VTK_INT_MAX);
108 vtkGetMacro(MinHullSizeInDisplay, int);
110
112
115 void SetRenderer(vtkRenderer* renderer);
118
123
125
129 vtkPoints* inPoints, vtkPoints* outPoints, double minimumHullSize = 1.0);
131 vtkPoints* inPoints, vtkPoints* outPoints, double minimumHullSize = 1.0);
133
134protected:
137
142
143private:
144 vtkConvexHull2D(const vtkConvexHull2D&) = delete;
145 void operator=(const vtkConvexHull2D&) = delete;
146
147 void ResizeHullToMinimumInDisplay(vtkPolyData* hullPolyData);
148
149 double ScaleFactor;
150 bool Outline;
151 int HullShape;
152 int MinHullSizeInDisplay;
153 double MinHullSizeInWorld;
154 vtkRenderer* Renderer;
155
158 vtkSmartPointer<vtkTransform> OutputTransform;
160 vtkSmartPointer<vtkPolyLine> OutlineSource;
162};
163
164VTK_ABI_NAMESPACE_END
165#endif // vtkConvexHull2D_h
Produce filled convex hulls around a set of points.
vtkRenderer * GetRenderer()
Renderer needed for MinHullSizeInDisplay calculation.
~vtkConvexHull2D() override
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static void CalculateBoundingRectangle(vtkPoints *inPoints, vtkPoints *outPoints, double minimumHullSize=1.0)
Convenience methods to calculate a convex hull from a set of vtkPointS.
void SetRenderer(vtkRenderer *renderer)
Renderer needed for MinHullSizeInDisplay calculation.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static void CalculateConvexHull(vtkPoints *inPoints, vtkPoints *outPoints, double minimumHullSize=1.0)
Convenience methods to calculate a convex hull from a set of vtkPointS.
vtkMTimeType GetMTime() override
The modified time of this filter.
static vtkConvexHull2D * New()
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
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
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:80
cell represents a set of 1D lines
Definition vtkPolyLine.h:30
a cell that represents an n-sided polygon
Definition vtkPolygon.h:32
abstract specification for renderers
Definition vtkRenderer.h:59
Hold a reference to a vtkObjectBase instance.
transform points and associated normals and vectors for polygonal dataset
describes linear transformations via a 4x4 matrix
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270
#define VTK_DOUBLE_MAX
Definition vtkType.h:154
#define VTK_INT_MAX
Definition vtkType.h:144