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::DelaunayTriangulation::Triangle Class Reference

triangle data More...

#include <delaunay_triangulation.h>

Public Member Functions

 Triangle (const int id, EdgePtr e0, EdgePtr e1, EdgePtr e2)
 create triangle with index and edges
 ~Triangle ()
 remove this triangle from all edges.
void updateVoronoiVertex ()
 update the voronoi vertex point (intersection of perpendicular bisectors)
int id () const
 get the Id of this triangle
const Vertexvertex (std::size_t i) const
 get the raw pointer to the vertex that this triangle has
Edgeedge (std::size_t i) const
 get the raw pointer to the edge that this triangle has
const Vector2Dcircumcenter () const
 get the circumcenter point of this triangle
const double & circumradius () const
 get the radius of the circumcircle of this triangle
const Vector2DvoronoiVertex () const
 get the voronoi vertex point
bool contains (const Vector2D &pos) const
 check if circumcircle contains the specified point
bool hasVertex (const Vertex *v) const
 check if this triangle has the specified vertex.
bool hasEdge (const EdgePtr e) const
 check if this triangle has the specified edge.
const VertexgetVertexExclude (const Vertex *v1, const Vertex *v2) const
 get the pointer to the vertex that is different from the specified vertices.
const VertexgetVertexExclude (const Edge *edge) const
 get the pointer to the vertex that does not belong to the specified edge.
EdgegetEdgeInclude (const Vertex *v1, const Vertex *v2) const
 get the pointer to the edge that has the specified vertices.
EdgegetEdgeExclude (const Vertex *v) const
 get the pointer to the edge that does not have the specified vertex.

Detailed Description

triangle data

Constructor & Destructor Documentation

◆ Triangle()

rcsc::DelaunayTriangulation::Triangle::Triangle ( const int id,
EdgePtr e0,
EdgePtr e1,
EdgePtr e2 )

create triangle with index and edges

Parameters
idId number of this triangle
e0raw pointer to the first edge instance
e1raw pointer to the second edge instance
e2raw pointer to the third edge instance

pointers to the vertices are automatically set from edges.

Member Function Documentation

◆ circumcenter()

const Vector2D & rcsc::DelaunayTriangulation::Triangle::circumcenter ( ) const
inline

get the circumcenter point of this triangle

Returns
coordinates of the circumcenter

◆ circumradius()

const double & rcsc::DelaunayTriangulation::Triangle::circumradius ( ) const
inline

get the radius of the circumcircle of this triangle

Returns
radius value

◆ contains()

bool rcsc::DelaunayTriangulation::Triangle::contains ( const Vector2D & pos) const
inline

check if circumcircle contains the specified point

Parameters
postarget point
Returns
true if target point is contained

◆ edge()

Edge * rcsc::DelaunayTriangulation::Triangle::edge ( std::size_t i) const
inline

get the raw pointer to the edge that this triangle has

Parameters
ispecifies array index
Returns
raw pointer to the edge

◆ getEdgeExclude()

Edge * rcsc::DelaunayTriangulation::Triangle::getEdgeExclude ( const Vertex * v) const
inline

get the pointer to the edge that does not have the specified vertex.

Parameters
vtarget vertex
Returns
if exist, raw pointer to the edge, else NULL is returned.

◆ getEdgeInclude()

Edge * rcsc::DelaunayTriangulation::Triangle::getEdgeInclude ( const Vertex * v1,
const Vertex * v2 ) const
inline

get the pointer to the edge that has the specified vertices.

Parameters
v1first vertex
v2second vertex
Returns
if exist, raw pointer to the edge, else NULL is returned.

◆ getVertexExclude() [1/2]

const Vertex * rcsc::DelaunayTriangulation::Triangle::getVertexExclude ( const Edge * edge) const
inline

get the pointer to the vertex that does not belong to the specified edge.

Parameters
edgetarget edge
Returns
if exist, const pointer to the vertex, else NULL is returned.

◆ getVertexExclude() [2/2]

const Vertex * rcsc::DelaunayTriangulation::Triangle::getVertexExclude ( const Vertex * v1,
const Vertex * v2 ) const
inline

get the pointer to the vertex that is different from the specified vertices.

Parameters
v1first vertex
v2second vertex
Returns
if exist, const pointer to the vertex. else NULL is returned.

◆ hasEdge()

bool rcsc::DelaunayTriangulation::Triangle::hasEdge ( const EdgePtr e) const
inline

check if this triangle has the specified edge.

Parameters
eraw pointer to the edge.
Returns
true if edge is contained.

◆ hasVertex()

bool rcsc::DelaunayTriangulation::Triangle::hasVertex ( const Vertex * v) const
inline

check if this triangle has the specified vertex.

Parameters
vraw pointer to the vertex.
Returns
true if vertex is contained.

◆ id()

int rcsc::DelaunayTriangulation::Triangle::id ( ) const
inline

get the Id of this triangle

Returns
Id number

◆ vertex()

const Vertex * rcsc::DelaunayTriangulation::Triangle::vertex ( std::size_t i) const
inline

get the raw pointer to the vertex that this triangle has

Parameters
ispecifies array index
Returns
const pointer to the vertex

◆ voronoiVertex()

const Vector2D & rcsc::DelaunayTriangulation::Triangle::voronoiVertex ( ) const
inline

get the voronoi vertex point

Returns
coordinate of the voronoi vertex point. if illegal data, invalid vector is returned.

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