LARS
LARS (Light Augmented Reality System) is an open-source framework for light-based interaction and real-time tracking in multi-robot experiments. Inspired by ARK, LARS extends the augmented reality paradigm to robotic collectives by projecting dynamic visual cues and environments onto the arena, enabling new experimental possibilities for collective robotics research, education, and outreach. LARS features integrated tracking, light projection, and modular experiment control with a user-friendly Qt GUI.
Loading...
Searching...
No Matches
rcsc::ConvexHull Class Reference

Public Types

enum  MethodType { DirectMethod , WrappingMethod , GrahamScan }
 algoritym type
typedef std::vector< Vector2DPointCont
 input point container
typedef std::vector< Vector2DVertexCont
 result vertex container
typedef std::vector< Segment2DEdgeCont
 result edge container

Public Member Functions

 ConvexHull ()
 create empty convex hull
 ConvexHull (const PointCont &v)
 create convex hull with given points
void clear ()
 clear all data.
void clearResults ()
 clear result variables.
void addPoint (const Vector2D &p)
 add a new point to the set of input point
void addPoints (const PointCont &v)
 add new points to the set of input pointc
void compute (const MethodType type=WrappingMethod)
 generate convex hull by default method.
const PointContinputPoints () const
 get the reference to the input point container
const VertexContvertices () const
 get the reference to the vertex container ordered by counter clockwise
const EdgeContedges () const
 get the reference to the result edge container
Polygon2D toPolygon () const
 get the convex hull polygon
std::ostream & printInputPoints (std::ostream &os) const
 output input points to the stream in gnuplot format.
std::ostream & printVertices (std::ostream &os) const
 output vertices to the stream in gnuplot format.
std::ostream & printEdges (std::ostream &os) const
 output edges to the stream in gnuplot format.

Constructor & Destructor Documentation

◆ ConvexHull()

rcsc::ConvexHull::ConvexHull ( const PointCont & v)

create convex hull with given points

Parameters
varray of input points

Member Function Documentation

◆ addPoint()

void rcsc::ConvexHull::addPoint ( const Vector2D & p)
inline

add a new point to the set of input point

Parameters
pnew point

◆ addPoints()

void rcsc::ConvexHull::addPoints ( const PointCont & v)
inline

add new points to the set of input pointc

Parameters
vinput point container

◆ compute()

void rcsc::ConvexHull::compute ( const MethodType type = WrappingMethod)

generate convex hull by default method.

generate convex hull by specified method

Parameters
typemethod type id

◆ edges()

const EdgeCont & rcsc::ConvexHull::edges ( ) const
inline

get the reference to the result edge container

Returns
const reference to the result edge container

◆ inputPoints()

const PointCont & rcsc::ConvexHull::inputPoints ( ) const
inline

get the reference to the input point container

Returns
const reference to the input point container

◆ printEdges()

std::ostream & rcsc::ConvexHull::printEdges ( std::ostream & os) const

output edges to the stream in gnuplot format.

Parameters
osreference to the output stream
Returns
reference to the output stream

◆ printInputPoints()

std::ostream & rcsc::ConvexHull::printInputPoints ( std::ostream & os) const

output input points to the stream in gnuplot format.

Parameters
osreference to the output stream
Returns
reference to the output stream

◆ printVertices()

std::ostream & rcsc::ConvexHull::printVertices ( std::ostream & os) const

output vertices to the stream in gnuplot format.

Parameters
osreference to the output stream
Returns
reference to the output stream

◆ toPolygon()

Polygon2D rcsc::ConvexHull::toPolygon ( ) const

get the convex hull polygon

Returns
new 2d polygon object

◆ vertices()

const VertexCont & rcsc::ConvexHull::vertices ( ) const
inline

get the reference to the vertex container ordered by counter clockwise

Returns
const reference to the ordered vertex container

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