VTK  9.3.20240423
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
46
47VTK_ABI_NAMESPACE_BEGIN
48class vtkCoordinate;
49class vtkPoints;
50class vtkPolygon;
51class vtkPolyLine;
52class vtkRenderer;
53class vtkTransform;
55
56class VTKRENDERINGANNOTATION_EXPORT VTK_MARSHALAUTO vtkConvexHull2D : public vtkPolyDataAlgorithm
57{
58public:
61 void PrintSelf(ostream& os, vtkIndent indent) override;
62
64
67 vtkGetMacro(ScaleFactor, double);
68 vtkSetMacro(ScaleFactor, double);
70
72
75 vtkGetMacro(Outline, bool);
76 vtkSetMacro(Outline, bool);
77 vtkBooleanMacro(Outline, bool);
79
81 {
82 BoundingRectangle = 0,
83 ConvexHull
84 };
85
87
90 vtkGetMacro(HullShape, int);
91 vtkSetClampMacro(HullShape, int, 0, 1);
93
95
99 vtkSetClampMacro(MinHullSizeInWorld, double, 0.0, VTK_DOUBLE_MAX);
100 vtkGetMacro(MinHullSizeInWorld, double);
102
104
108 vtkSetClampMacro(MinHullSizeInDisplay, int, 0, VTK_INT_MAX);
109 vtkGetMacro(MinHullSizeInDisplay, int);
111
113
116 void SetRenderer(vtkRenderer* renderer);
119
124
126
130 vtkPoints* inPoints, vtkPoints* outPoints, double minimumHullSize = 1.0);
132 vtkPoints* inPoints, vtkPoints* outPoints, double minimumHullSize = 1.0);
134
135protected:
138
143
144private:
145 vtkConvexHull2D(const vtkConvexHull2D&) = delete;
146 void operator=(const vtkConvexHull2D&) = delete;
147
148 void ResizeHullToMinimumInDisplay(vtkPolyData* hullPolyData);
149
150 double ScaleFactor;
151 bool Outline;
152 int HullShape;
153 int MinHullSizeInDisplay;
154 double MinHullSizeInWorld;
155 vtkRenderer* Renderer;
156
159 vtkSmartPointer<vtkTransform> OutputTransform;
161 vtkSmartPointer<vtkPolyLine> OutlineSource;
163};
164
165VTK_ABI_NAMESPACE_END
166#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:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:139
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
cell represents a set of 1D lines
a cell that represents an n-sided polygon
Definition vtkPolygon.h:132
abstract specification for renderers
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
#define VTK_MARSHALAUTO