VPTissue Reference Manual
SimPT_Editor::VoronoiTesselation Class Reference

Graphics item for Voronoi tesselation of a polygon. More...

#include <VoronoiTesselation.h>

Inheritance diagram for SimPT_Editor::VoronoiTesselation:
Inheritance graph
Collaboration diagram for SimPT_Editor::VoronoiTesselation:
Collaboration graph

Public Member Functions

 VoronoiTesselation (const QPolygonF &boundaryPolygon, QGraphicsItem *parent=nullptr)
 Constructor. More...
 
virtual ~VoronoiTesselation ()
 Destructor.
 
std::list< QPolygonF > GetCellPolygons ()
 Returns the polygons of cell of the Voronoi tesselation. More...
 

Protected Member Functions

virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)
 Reimplementation of QGraphicsItem::mouseDoubleClickEvent to add a point to the tesselation.
 
virtual void mousePressEvent (QGraphicsSceneMouseEvent *event)
 Reimplementation of QGraphicsItem::mousePressEvent to remove a point from the tesselation.
 

Detailed Description

Graphics item for Voronoi tesselation of a polygon.

Definition at line 42 of file VoronoiTesselation.h.

Constructor & Destructor Documentation

SimPT_Editor::VoronoiTesselation::VoronoiTesselation ( const QPolygonF &  boundaryPolygon,
QGraphicsItem parent = nullptr 
)

Constructor.

Parameters
boundaryPolygonThe polygon inside which to generate the cell complex
parentThe QGraphicsItem parent

Definition at line 46 of file VoronoiTesselation.cpp.

Member Function Documentation

std::list< QPolygonF > SimPT_Editor::VoronoiTesselation::GetCellPolygons ( )

Returns the polygons of cell of the Voronoi tesselation.

Returns
list<QPolygonF> The cell polygons of the tesselation. The returned polygons will be open and have their point in counterclockwise order (in a standard righthanded coordinate system)

Definition at line 56 of file VoronoiTesselation.cpp.

References SimPT_Editor::PolygonUtils::ClipPolygon().

Referenced by SimPT_Editor::VoronoiGeneratorDialog::GetGeneratedPolygons().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: