|
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.
|
2D point vector class More...
#include <vector_2d.h>
Classes | |
| class | AbsXCmp |
| comparison predicate for absolute X value. More... | |
| class | AbsYCmp |
| comparison predicate for absolute Y value. More... | |
| class | Equal |
| check if two vectors are completely same or not. More... | |
| class | IsWithin |
| template predicate for 2D region sign detection. More... | |
| class | XCmp |
| comparison predicate for X value. More... | |
| class | XYCmp |
| comparison predicate for XY value (X -> Y order). More... | |
| class | YCmp |
| comparison predicate for Y value. More... | |
| class | YXCmp |
| comparison predicatio for XY value (Y -> X order) More... | |
Public Member Functions | |
| Vector2D () | |
| default constructor. | |
| Vector2D (const double &xx, const double &yy) | |
| create Vector with XY value directly. | |
| bool | isValid () const |
| check if this vector is valid or not. | |
| Vector2D & | assign (const double &xx, const double &yy) |
| assign XY value directly. | |
| Vector2D & | setPolar (const double &radius, const AngleDeg &dir) |
| assign XY value from POLAR value. | |
| const Vector2D & | invalidate () |
| invalidate this object | |
| double | r2 () const |
| get the squared length of vector. | |
| double | r () const |
| get the length of vector. | |
| double | norm () const |
| get the norm value. this method is equivalent to r(). | |
| double | norm2 () const |
| get the squared norm value. this method is equivalent to r2(). | |
| double | length () const |
| get the length of vector. this method is equivalent to r(). | |
| double | length2 () const |
| get the squared length value. this method is equivalent to r2(). | |
| AngleDeg | th () const |
| get the angle of vector. | |
| AngleDeg | dir () const |
| get the angle of vector. this method is equivalent to th(). | |
| Vector2D | abs () const |
| get new vector that XY values were set to absolute value. | |
| double | absX () const |
| get absolute x value | |
| double | absY () const |
| get absolute y value | |
| Vector2D & | add (const Vector2D &v) |
| add vector. | |
| Vector2D & | add (const double &xx, const double &yy) |
| add XY values respectively. | |
| Vector2D & | scale (const double &scalar) |
| scale this vector | |
| const Vector2D & | operator+ () const |
| return this vector | |
| Vector2D | operator- () const |
| create reversed vector | |
| const Vector2D & | operator+= (const Vector2D &v) |
| add vector to itself | |
| const Vector2D & | operator-= (const Vector2D &v) |
| subtract vector to itself | |
| const Vector2D & | operator*= (const double &scalar) |
| multiplied by 'scalar' | |
| const Vector2D & | operator/= (const double &scalar) |
| divided by 'scalar'. | |
| double | dist2 (const Vector2D &p) const |
| get the squared distance from this to 'p'. | |
| double | dist (const Vector2D &p) const |
| get the distance from this to 'p'. | |
| Vector2D & | reverse () |
| reverse vector components | |
| Vector2D | reversedVector () const |
| get reversed vector. | |
| Vector2D & | setLength (const double &len) |
| set vector length to 'len'. | |
| Vector2D | setLengthVector (const double &len) const |
| get new vector that the length is set to 'len' | |
| Vector2D & | normalize () |
| normalize vector. length is set to 1.0. | |
| Vector2D | normalizedVector () const |
| get new normalized vector that the length is set to 1.0 but angle is same | |
| Vector2D & | rotate (const double °) |
| rotate this vector with 'deg' | |
| Vector2D & | rotate (const AngleDeg &angle) |
| rotate this vector with 'angle'. | |
| Vector2D | rotatedVector (const double °) const |
| get new vector that is rotated by 'deg'. | |
| Vector2D | rotatedVector (const AngleDeg &angle) const |
| get new vector that is rotated by 'angle'. | |
| Vector2D & | setDir (const AngleDeg &dir) |
| set vector's angle to 'angle' | |
| double | innerProduct (const Vector2D &v) const |
| get inner(dot) product with 'v'. | |
| double | outerProduct (const Vector2D &v) const |
| get virtal outer(cross) product with 'v'. | |
| bool | equals (const Vector2D &other) const |
| check if this vector is strictly same as given vector. | |
| bool | equalsWeakly (const Vector2D &other) const |
| check if this vector is weakly same as given vector. | |
| std::ostream & | print (std::ostream &os) const |
| output XY values to ostream. | |
| std::ostream & | printRound (std::ostream &os, const double &prec=0.1) const |
| output rounded XY values to ostream. | |
| Vector2D () | |
| default constructor. | |
| Vector2D (const double &xx, const double &yy) | |
| create Vector with XY value directly. | |
| bool | isValid () const |
| check if this vector is valid or not. | |
| Vector2D & | assign (const double &xx, const double &yy) |
| assign XY value directly. | |
| Vector2D & | setPolar (const double &radius, const AngleDeg &dir) |
| assign XY value from POLAR value. | |
| const Vector2D & | invalidate () |
| invalidate this object | |
| double | r2 () const |
| get the squared length of vector. | |
| double | r () const |
| get the length of vector. | |
| double | norm () const |
| get the norm value. this method is equivalent to r(). | |
| double | norm2 () const |
| get the squared norm value. this method is equivalent to r2(). | |
| double | length () const |
| get the length of vector. this method is equivalent to r(). | |
| double | length2 () const |
| get the squared length value. this method is equivalent to r2(). | |
| AngleDeg | th () const |
| get the angle of vector. | |
| AngleDeg | dir () const |
| get the angle of vector. this method is equivalent to th(). | |
| Vector2D | abs () const |
| get new vector that XY values were set to absolute value. | |
| double | absX () const |
| get absolute x value | |
| double | absY () const |
| get absolute y value | |
| Vector2D & | add (const Vector2D &v) |
| add vector. | |
| Vector2D & | add (const double &xx, const double &yy) |
| add XY values respectively. | |
| Vector2D & | scale (const double &scalar) |
| scale this vector | |
| const Vector2D & | operator+ () const |
| return this vector | |
| Vector2D | operator- () const |
| create reversed vector | |
| const Vector2D & | operator+= (const Vector2D &v) |
| add vector to itself | |
| const Vector2D & | operator-= (const Vector2D &v) |
| subtract vector to itself | |
| const Vector2D & | operator*= (const double &scalar) |
| multiplied by 'scalar' | |
| const Vector2D & | operator/= (const double &scalar) |
| divided by 'scalar'. | |
| double | dist2 (const Vector2D &p) const |
| get the squared distance from this to 'p'. | |
| double | dist (const Vector2D &p) const |
| get the distance from this to 'p'. | |
| Vector2D & | reverse () |
| reverse vector components | |
| Vector2D | reversedVector () const |
| get reversed vector. | |
| Vector2D & | setLength (const double &len) |
| set vector length to 'len'. | |
| Vector2D | setLengthVector (const double &len) const |
| get new vector that the length is set to 'len' | |
| Vector2D & | normalize () |
| normalize vector. length is set to 1.0. | |
| Vector2D | normalizedVector () const |
| get new normalized vector that the length is set to 1.0 but angle is same | |
| Vector2D & | rotate (const double °) |
| rotate this vector with 'deg' | |
| Vector2D & | rotate (const AngleDeg &angle) |
| rotate this vector with 'angle'. | |
| Vector2D | rotatedVector (const double °) const |
| get new vector that is rotated by 'deg'. | |
| Vector2D | rotatedVector (const AngleDeg &angle) const |
| get new vector that is rotated by 'angle'. | |
| Vector2D & | setDir (const AngleDeg &dir) |
| set vector's angle to 'angle' | |
| double | innerProduct (const Vector2D &v) const |
| get inner(dot) product with 'v'. | |
| double | outerProduct (const Vector2D &v) const |
| get virtal outer(cross) product with 'v'. | |
| bool | equals (const Vector2D &other) const |
| check if this vector is strictly same as given vector. | |
| bool | equalsWeakly (const Vector2D &other) const |
| check if this vector is weakly same as given vector. | |
| std::ostream & | print (std::ostream &os) const |
| output XY values to ostream. | |
| std::ostream & | printRound (std::ostream &os, const double &prec=0.1) const |
| output rounded XY values to ostream. | |
Static Public Member Functions | |
| static Vector2D | polar2vector (const double &mag, const AngleDeg &theta) |
| get new Vector created by POLAR value. | |
| static Vector2D | from_polar (const double &mag, const AngleDeg &theta) |
| get new Vector created by POLAR value. | |
| static double | inner_product (const Vector2D &v1, const Vector2D &v2) |
| get inner(dot) product for v1 and v2. | |
| static double | outer_product (const Vector2D &v1, const Vector2D &v2) |
| get outer(cross) product for v1 and v2. | |
| static Vector2D | polar2vector (const double &mag, const AngleDeg &theta) |
| get new Vector created by POLAR value. | |
| static Vector2D | from_polar (const double &mag, const AngleDeg &theta) |
| get new Vector created by POLAR value. | |
| static double | inner_product (const Vector2D &v1, const Vector2D &v2) |
| get inner(dot) product for v1 and v2. | |
| static double | outer_product (const Vector2D &v1, const Vector2D &v2) |
| get outer(cross) product for v1 and v2. | |
Public Attributes | |
| double | x |
| X coordinate. | |
| double | y |
| Y coordinate. | |
Static Public Attributes | |
| static const double | EPSILON |
| constant threshold value for calculation error | |
| static const double | ERROR_VALUE |
| constant error value for XY (= std::numeric_limits< doulble >::max()). | |
| static const Vector2D | INVALIDATED |
| invalidated value vector | |
2D point vector class
|
inline |
create Vector with XY value directly.
| xx | assigned x value |
| yy | assigned x value |
|
inline |
create Vector with XY value directly.
| xx | assigned x value |
| yy | assigned x value |
|
inline |
get new vector that XY values were set to absolute value.
|
inline |
get new vector that XY values were set to absolute value.
|
inline |
get absolute x value
|
inline |
get absolute x value
|
inline |
get absolute y value
|
inline |
get absolute y value
|
inline |
add XY values respectively.
| xx | added x value |
| yy | added y value |
|
inline |
add XY values respectively.
| xx | added x value |
| yy | added y value |
add vector.
| v | added vector |
add vector.
| v | added vector |
|
inline |
assign XY value directly.
| xx | assigned x value |
| yy | assigned y value |
|
inline |
assign XY value directly.
| xx | assigned x value |
| yy | assigned y value |
|
inline |
get the angle of vector. this method is equivalent to th().
|
inline |
get the angle of vector. this method is equivalent to th().
|
inline |
get the distance from this to 'p'.
| p | target point |
|
inline |
get the distance from this to 'p'.
| p | target point |
|
inline |
get the squared distance from this to 'p'.
| p | target point |
|
inline |
get the squared distance from this to 'p'.
| p | target point |
|
inline |
check if this vector is strictly same as given vector.
| other | compared vector |
|
inline |
check if this vector is strictly same as given vector.
| other | compared vector |
|
inline |
check if this vector is weakly same as given vector.
| other | compared vector. |
|
inline |
check if this vector is weakly same as given vector.
| other | compared vector. |
get new Vector created by POLAR value.
| mag | length of vector |
| theta | angle of vector |
get new Vector created by POLAR value.
| mag | length of vector |
| theta | angle of vector |
get inner(dot) product for v1 and v2.
| v1 | input 1 |
| v2 | input 2 |
get inner(dot) product for v1 and v2.
| v1 | input 1 |
| v2 | input 2 |
|
inline |
get inner(dot) product with 'v'.
| v | target vector |
|
inline |
get inner(dot) product with 'v'.
| v | target vector |
|
inline |
invalidate this object
|
inline |
invalidate this object
|
inline |
check if this vector is valid or not.
|
inline |
check if this vector is valid or not.
|
inline |
get the length of vector. this method is equivalent to r().
|
inline |
get the length of vector. this method is equivalent to r().
|
inline |
get the squared length value. this method is equivalent to r2().
|
inline |
get the squared length value. this method is equivalent to r2().
|
inline |
get the norm value. this method is equivalent to r().
|
inline |
get the norm value. this method is equivalent to r().
|
inline |
get the squared norm value. this method is equivalent to r2().
|
inline |
get the squared norm value. this method is equivalent to r2().
|
inline |
normalize vector. length is set to 1.0.
|
inline |
normalize vector. length is set to 1.0.
|
inline |
get new normalized vector that the length is set to 1.0 but angle is same
|
inline |
get new normalized vector that the length is set to 1.0 but angle is same
|
inline |
multiplied by 'scalar'
| scalar | multiplication argument |
|
inline |
multiplied by 'scalar'
| scalar | multiplication argument |
|
inline |
return this vector
|
inline |
return this vector
add vector to itself
| v | added vector |
add vector to itself
| v | added vector |
|
inline |
create reversed vector
|
inline |
create reversed vector
subtract vector to itself
| v | subtract argument |
subtract vector to itself
| v | subtract argument |
|
inline |
divided by 'scalar'.
| scalar | division argument |
|
inline |
divided by 'scalar'.
| scalar | division argument |
get outer(cross) product for v1 and v2.
| v1 | input 1 |
| v2 | input 2 |
get outer(cross) product for v1 and v2.
| v1 | input 1 |
| v2 | input 2 |
|
inline |
get virtal outer(cross) product with 'v'.
| v | target vector |
|
inline |
get virtal outer(cross) product with 'v'.
| v | target vector |
get new Vector created by POLAR value.
| mag | length of vector |
| theta | angle of vector |
get new Vector created by POLAR value.
| mag | length of vector |
| theta | angle of vector |
|
inline |
output XY values to ostream.
| os | reference to ostream |
|
inline |
output XY values to ostream.
| os | reference to ostream |
|
inline |
output rounded XY values to ostream.
| os | reference to ostream |
| prec | precision of output value |
|
inline |
output rounded XY values to ostream.
| os | reference to ostream |
| prec | precision of output value |
|
inline |
get the length of vector.
|
inline |
get the length of vector.
|
inline |
get the squared length of vector.
|
inline |
get the squared length of vector.
|
inline |
reverse vector components
|
inline |
reverse vector components
|
inline |
get reversed vector.
|
inline |
get reversed vector.
rotate this vector with 'angle'.
| angle | rotated angle |
rotate this vector with 'angle'.
| angle | rotated angle |
|
inline |
rotate this vector with 'deg'
| deg | rotated angle by double type |
|
inline |
rotate this vector with 'deg'
| deg | rotated angle by double type |
get new vector that is rotated by 'angle'.
| angle | rotated angle. |
get new vector that is rotated by 'angle'.
| angle | rotated angle. |
|
inline |
get new vector that is rotated by 'deg'.
| deg | rotated angle. double type. |
|
inline |
get new vector that is rotated by 'deg'.
| deg | rotated angle. double type. |
|
inline |
scale this vector
| scalar | scaling factor |
|
inline |
scale this vector
| scalar | scaling factor |
set vector's angle to 'angle'
| dir | new angle to be set |
set vector's angle to 'angle'
| dir | new angle to be set |
|
inline |
set vector length to 'len'.
| len | new length to be set |
|
inline |
set vector length to 'len'.
| len | new length to be set |
|
inline |
get new vector that the length is set to 'len'
| len | new length to be set |
|
inline |
get new vector that the length is set to 'len'
| len | new length to be set |
assign XY value from POLAR value.
| radius | vector's radius |
| dir | vector's angle |
assign XY value from POLAR value.
| radius | vector's radius |
| dir | vector's angle |
|
inline |
get the angle of vector.
|
inline |
get the angle of vector.