C2DPolygon Class Reference

A simple 2D polygon class. More...

#include <mia/2d/polygon.hh>

Public Member Functions

void append (const C2DFVector &point)
 
float get_hausdorff_distance (const C2DPolygon &other) const
 
float get_mimimum_distance (const C2DFVector &point) const
 
bool is_inside_closed_set (const C2DFVector &point) const
 
bool is_inside_open_set (const C2DFVector &point) const
 
size_t size () const
 

Detailed Description

A simple 2D polygon class.

This class defines a polygon in 2D space and some functions on it.

Remarks
Adding two polygons together is not done in a proper algebraic way.

Definition at line 39 of file polygon.hh.

Member Function Documentation

◆ append()

void C2DPolygon::append ( const C2DFVector point)

Append a point to the polyon

◆ get_hausdorff_distance()

float C2DPolygon::get_hausdorff_distance ( const C2DPolygon other) const

Evaluate the Hausdorff distance between this polygon and another one

Parameters
other
Returns
Hausdorff distance

◆ get_mimimum_distance()

float C2DPolygon::get_mimimum_distance ( const C2DFVector point) const

Evaluate the minimum distance of a point to the polygon

Parameters
point
Returns
distance

◆ is_inside_closed_set()

bool C2DPolygon::is_inside_closed_set ( const C2DFVector point) const

Evaluate if a given points is within the polygon if the polygon is considered to be a closed set, i.e. contains its boundary.

Parameters
point
Returns
true if the poin is inside, false otherwiese

◆ is_inside_open_set()

bool C2DPolygon::is_inside_open_set ( const C2DFVector point) const

Evaluate if a given points is within the polygon if the polygon is considered to be an open set, i.e. doesn't contain its boundary.

Parameters
point
Returns
true if the poin is inside, false otherwiese

◆ size()

size_t C2DPolygon::size ( ) const
Returns
the number of points within the polygon

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