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::Circle2D Class Reference

2d circle class More...

#include <circle_2d.h>

Inheritance diagram for rcsc::Circle2D:
rcsc::Region2D

Public Member Functions

 Circle2D ()
 create a zero area circle at (0,0)
 Circle2D (const Vector2D &c, const double &r)
 construct with center point and radius value.
const Circle2Dassign (const Vector2D &c, const double &r)
 assign new value.
virtual double area () const
 get the area value of this circle
virtual bool contains (const Vector2D &point) const
 check if point is within this region
const Vector2Dcenter () const
 get the center point
const double & radius () const
 get the radius value
int intersection (const Line2D &line, Vector2D *sol1, Vector2D *sol2) const
 caluclate the intersection with straight line
int intersection (const Ray2D &ray, Vector2D *sol1, Vector2D *sol2) const
 calculate the intersection with ray line
int intersection (const Segment2D &segment, Vector2D *sol1, Vector2D *sol2) const
 calculate the intersection with segment line
int intersection (const Circle2D &circle, Vector2D *sol1, Vector2D *sol2) const
 calculate the intersection with another circle
bool HasIntersection (Line2D line)
 HasIntersection : check that this Line2D Has Intersection with circle or not.
bool HasIntersection (Line2D line, float SF)
 HasIntersection( : check that this line Has Intersection with this circle or not , and a safety factor for distance to center.
bool HasIntersection (Segment2D Seg)
 HasIntersection : check that this segment Has Intersection with circle or not.
bool HasIntersection (Segment2D Seg, float SF)
 HasIntersection( : check that this segment Has Intersection with this circle or not , and a safety factor for distance to center.
Vector2D nearestpoint (Vector2D pnt)
 Intersect : If HasIntersection, return intersec point.
Public Member Functions inherited from rcsc::Region2D
virtual ~Region2D ()
 virtual destructor.

Static Public Member Functions

static Circle2D circumcircle (const Vector2D &p0, const Vector2D &p1, const Vector2D &p2)
 get the circle through three points (circumcircle of the triangle).
static bool contains (const Vector2D &point, const Vector2D &p0, const Vector2D &p1, const Vector2D &p2)
 check if the circumcircle contains the input point

Additional Inherited Members

Protected Member Functions inherited from rcsc::Region2D
 Region2D ()
 accessible only from derived classes

Detailed Description

2d circle class

Constructor & Destructor Documentation

◆ Circle2D()

rcsc::Circle2D::Circle2D ( const Vector2D & c,
const double & r )
inline

construct with center point and radius value.

Parameters
ccenter point
rradius value

Member Function Documentation

◆ area()

virtual double rcsc::Circle2D::area ( ) const
inlinevirtual

get the area value of this circle

Returns
value of the area

Implements rcsc::Region2D.

◆ assign()

const Circle2D & rcsc::Circle2D::assign ( const Vector2D & c,
const double & r )
inline

assign new value.

Parameters
ccenter point
rradius value
Returns
const reference to this

◆ center()

const Vector2D & rcsc::Circle2D::center ( ) const
inline

get the center point

Returns
center point coordinate value

◆ circumcircle()

Circle2D rcsc::Circle2D::circumcircle ( const Vector2D & p0,
const Vector2D & p1,
const Vector2D & p2 )
static

get the circle through three points (circumcircle of the triangle).

Parameters
p0triangle's 1st vertex
p1triangle's 2nd vertex
p2triangle's 3rd vertex
Returns
coordinates of circumcenter

◆ contains() [1/2]

virtual bool rcsc::Circle2D::contains ( const Vector2D & point) const
inlinevirtual

check if point is within this region

Parameters
pointconsidered point
Returns
true if point is contained by this circle

Implements rcsc::Region2D.

◆ contains() [2/2]

bool rcsc::Circle2D::contains ( const Vector2D & point,
const Vector2D & p0,
const Vector2D & p1,
const Vector2D & p2 )
static

check if the circumcircle contains the input point

Parameters
pointinput point
p0triangle's 1st vertex
p1triangle's 2nd vertex
p2triangle's 3rd vertex
Returns
true if circumcircle contains the point, otherwise false.

◆ HasIntersection() [1/4]

bool rcsc::Circle2D::HasIntersection ( Line2D line)

HasIntersection : check that this Line2D Has Intersection with circle or not.

Parameters
point
Returns

◆ HasIntersection() [2/4]

bool rcsc::Circle2D::HasIntersection ( Line2D line,
float SF )

HasIntersection( : check that this line Has Intersection with this circle or not , and a safety factor for distance to center.

Parameters
point,SafetyFactor
Returns

◆ HasIntersection() [3/4]

bool rcsc::Circle2D::HasIntersection ( Segment2D Seg)

HasIntersection : check that this segment Has Intersection with circle or not.

Parameters
point
Returns

◆ HasIntersection() [4/4]

bool rcsc::Circle2D::HasIntersection ( Segment2D Seg,
float SF )

HasIntersection( : check that this segment Has Intersection with this circle or not , and a safety factor for distance to center.

Parameters
point,SafetyFactor
Returns

◆ intersection() [1/4]

int rcsc::Circle2D::intersection ( const Circle2D & circle,
Vector2D * sol1,
Vector2D * sol2 ) const

calculate the intersection with another circle

Parameters
circleconsiderd circle
sol1pointer to the 1st solution variable
sol2pointer to the 2nd solution variable
Returns
the number of solution

◆ intersection() [2/4]

int rcsc::Circle2D::intersection ( const Line2D & line,
Vector2D * sol1,
Vector2D * sol2 ) const

caluclate the intersection with straight line

Parameters
lineconsiderd line
sol1pointer to the 1st solution variable
sol2pointer to the 2nd solution variable
Returns
the number of solution

◆ intersection() [3/4]

int rcsc::Circle2D::intersection ( const Ray2D & ray,
Vector2D * sol1,
Vector2D * sol2 ) const

calculate the intersection with ray line

Parameters
rayconsiderd ray
sol1pointer to the 1st solution variable
sol2pointer to the 2nd solution variable
Returns
the number of solution

◆ intersection() [4/4]

int rcsc::Circle2D::intersection ( const Segment2D & segment,
Vector2D * sol1,
Vector2D * sol2 ) const

calculate the intersection with segment line

Parameters
segmentconsiderd segment line
sol1pointer to the 1st solution variable
sol2pointer to the 2nd solution variable
Returns
the number of solution

◆ nearestpoint()

Vector2D rcsc::Circle2D::nearestpoint ( Vector2D pnt)

Intersect : If HasIntersection, return intersec point.

Parameters
pnt
Returns
intersection Point

◆ radius()

const double & rcsc::Circle2D::radius ( ) const
inline

get the radius value

Returns
radius value

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