VTK  9.2.6
vtkConvexHull2D.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkConvexHull2D.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14 =========================================================================*/
15
51#ifndef vtkConvexHull2D_h
52#define vtkConvexHull2D_h
53
55#include "vtkRenderingAnnotationModule.h" // For export macro
56#include "vtkSmartPointer.h" // needed for ivars
57
58class vtkCoordinate;
59class vtkPoints;
60class vtkPolygon;
61class vtkPolyLine;
62class vtkRenderer;
63class vtkTransform;
65
66class VTKRENDERINGANNOTATION_EXPORT vtkConvexHull2D : public vtkPolyDataAlgorithm
67{
68public:
71 void PrintSelf(ostream& os, vtkIndent indent) override;
72
74
77 vtkGetMacro(ScaleFactor, double);
78 vtkSetMacro(ScaleFactor, double);
80
82
85 vtkGetMacro(Outline, bool);
86 vtkSetMacro(Outline, bool);
87 vtkBooleanMacro(Outline, bool);
89
91 {
92 BoundingRectangle = 0,
93 ConvexHull
94 };
95
97
100 vtkGetMacro(HullShape, int);
101 vtkSetClampMacro(HullShape, int, 0, 1);
103
105
109 vtkSetClampMacro(MinHullSizeInWorld, double, 0.0, VTK_DOUBLE_MAX);
110 vtkGetMacro(MinHullSizeInWorld, double);
112
114
118 vtkSetClampMacro(MinHullSizeInDisplay, int, 0, VTK_INT_MAX);
119 vtkGetMacro(MinHullSizeInDisplay, int);
121
123
126 void SetRenderer(vtkRenderer* renderer);
129
134
136
140 vtkPoints* inPoints, vtkPoints* outPoints, double minimumHullSize = 1.0);
142 vtkPoints* inPoints, vtkPoints* outPoints, double minimumHullSize = 1.0);
144
145protected:
148
153
154private:
155 vtkConvexHull2D(const vtkConvexHull2D&) = delete;
156 void operator=(const vtkConvexHull2D&) = delete;
157
158 void ResizeHullToMinimumInDisplay(vtkPolyData* hullPolyData);
159
160 double ScaleFactor;
161 bool Outline;
162 int HullShape;
163 int MinHullSizeInDisplay;
164 double MinHullSizeInWorld;
165 vtkRenderer* Renderer;
166
169 vtkSmartPointer<vtkTransform> OutputTransform;
171 vtkSmartPointer<vtkPolyLine> OutlineSource;
173};
174
175#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
Definition: vtkCoordinate.h:80
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:40
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:91
cell represents a set of 1D lines
Definition: vtkPolyLine.h:40
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:43
abstract specification for renderers
Definition: vtkRenderer.h:73
Hold a reference to a vtkObjectBase instance.
transform points and associated normals and vectors for polygonal dataset
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:61
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
#define VTK_INT_MAX
Definition: vtkType.h:155