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

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.
Vector2Dassign (const double &xx, const double &yy)
 assign XY value directly.
Vector2DsetPolar (const double &radius, const AngleDeg &dir)
 assign XY value from POLAR value.
const Vector2Dinvalidate ()
 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
Vector2Dadd (const Vector2D &v)
 add vector.
Vector2Dadd (const double &xx, const double &yy)
 add XY values respectively.
Vector2Dscale (const double &scalar)
 scale this vector
const Vector2Doperator+ () const
 return this vector
Vector2D operator- () const
 create reversed vector
const Vector2Doperator+= (const Vector2D &v)
 add vector to itself
const Vector2Doperator-= (const Vector2D &v)
 subtract vector to itself
const Vector2Doperator*= (const double &scalar)
 multiplied by 'scalar'
const Vector2Doperator/= (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'.
Vector2Dreverse ()
 reverse vector components
Vector2D reversedVector () const
 get reversed vector.
Vector2DsetLength (const double &len)
 set vector length to 'len'.
Vector2D setLengthVector (const double &len) const
 get new vector that the length is set to 'len'
Vector2Dnormalize ()
 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
Vector2Drotate (const double &deg)
 rotate this vector with 'deg'
Vector2Drotate (const AngleDeg &angle)
 rotate this vector with 'angle'.
Vector2D rotatedVector (const double &deg) const
 get new vector that is rotated by 'deg'.
Vector2D rotatedVector (const AngleDeg &angle) const
 get new vector that is rotated by 'angle'.
Vector2DsetDir (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.
Vector2Dassign (const double &xx, const double &yy)
 assign XY value directly.
Vector2DsetPolar (const double &radius, const AngleDeg &dir)
 assign XY value from POLAR value.
const Vector2Dinvalidate ()
 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
Vector2Dadd (const Vector2D &v)
 add vector.
Vector2Dadd (const double &xx, const double &yy)
 add XY values respectively.
Vector2Dscale (const double &scalar)
 scale this vector
const Vector2Doperator+ () const
 return this vector
Vector2D operator- () const
 create reversed vector
const Vector2Doperator+= (const Vector2D &v)
 add vector to itself
const Vector2Doperator-= (const Vector2D &v)
 subtract vector to itself
const Vector2Doperator*= (const double &scalar)
 multiplied by 'scalar'
const Vector2Doperator/= (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'.
Vector2Dreverse ()
 reverse vector components
Vector2D reversedVector () const
 get reversed vector.
Vector2DsetLength (const double &len)
 set vector length to 'len'.
Vector2D setLengthVector (const double &len) const
 get new vector that the length is set to 'len'
Vector2Dnormalize ()
 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
Vector2Drotate (const double &deg)
 rotate this vector with 'deg'
Vector2Drotate (const AngleDeg &angle)
 rotate this vector with 'angle'.
Vector2D rotatedVector (const double &deg) const
 get new vector that is rotated by 'deg'.
Vector2D rotatedVector (const AngleDeg &angle) const
 get new vector that is rotated by 'angle'.
Vector2DsetDir (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

Detailed Description

2D point vector class

Constructor & Destructor Documentation

◆ Vector2D() [1/2]

rcsc::Vector2D::Vector2D ( const double & xx,
const double & yy )
inline

create Vector with XY value directly.

Parameters
xxassigned x value
yyassigned x value

◆ Vector2D() [2/2]

rcsc::Vector2D::Vector2D ( const double & xx,
const double & yy )
inline

create Vector with XY value directly.

Parameters
xxassigned x value
yyassigned x value

Member Function Documentation

◆ abs() [1/2]

Vector2D rcsc::Vector2D::abs ( ) const
inline

get new vector that XY values were set to absolute value.

Returns
new vector that all values are absolute.

◆ abs() [2/2]

Vector2D rcsc::Vector2D::abs ( ) const
inline

get new vector that XY values were set to absolute value.

Returns
new vector that all values are absolute.

◆ absX() [1/2]

double rcsc::Vector2D::absX ( ) const
inline

get absolute x value

Returns
absolute x value

◆ absX() [2/2]

double rcsc::Vector2D::absX ( ) const
inline

get absolute x value

Returns
absolute x value

◆ absY() [1/2]

double rcsc::Vector2D::absY ( ) const
inline

get absolute y value

Returns
absolute y value

◆ absY() [2/2]

double rcsc::Vector2D::absY ( ) const
inline

get absolute y value

Returns
absolute y value

◆ add() [1/4]

Vector2D & rcsc::Vector2D::add ( const double & xx,
const double & yy )
inline

add XY values respectively.

Parameters
xxadded x value
yyadded y value
Returns
reference to itself

◆ add() [2/4]

Vector2D & rcsc::Vector2D::add ( const double & xx,
const double & yy )
inline

add XY values respectively.

Parameters
xxadded x value
yyadded y value
Returns
reference to itself

◆ add() [3/4]

Vector2D & rcsc::Vector2D::add ( const Vector2D & v)
inline

add vector.

Parameters
vadded vector
Returns
reference to itself

◆ add() [4/4]

Vector2D & rcsc::Vector2D::add ( const Vector2D & v)
inline

add vector.

Parameters
vadded vector
Returns
reference to itself

◆ assign() [1/2]

Vector2D & rcsc::Vector2D::assign ( const double & xx,
const double & yy )
inline

assign XY value directly.

Parameters
xxassigned x value
yyassigned y value
Returns
reference to itself

◆ assign() [2/2]

Vector2D & rcsc::Vector2D::assign ( const double & xx,
const double & yy )
inline

assign XY value directly.

Parameters
xxassigned x value
yyassigned y value
Returns
reference to itself

◆ dir() [1/2]

AngleDeg rcsc::Vector2D::dir ( ) const
inline

get the angle of vector. this method is equivalent to th().

Returns
angle

◆ dir() [2/2]

AngleDeg rcsc::Vector2D::dir ( ) const
inline

get the angle of vector. this method is equivalent to th().

Returns
angle

◆ dist() [1/2]

double rcsc::Vector2D::dist ( const Vector2D & p) const
inline

get the distance from this to 'p'.

Parameters
ptarget point
Returns
distance to 'p'

◆ dist() [2/2]

double rcsc::Vector2D::dist ( const Vector2D & p) const
inline

get the distance from this to 'p'.

Parameters
ptarget point
Returns
distance to 'p'

◆ dist2() [1/2]

double rcsc::Vector2D::dist2 ( const Vector2D & p) const
inline

get the squared distance from this to 'p'.

Parameters
ptarget point
Returns
squared distance to 'p'

◆ dist2() [2/2]

double rcsc::Vector2D::dist2 ( const Vector2D & p) const
inline

get the squared distance from this to 'p'.

Parameters
ptarget point
Returns
squared distance to 'p'

◆ equals() [1/2]

bool rcsc::Vector2D::equals ( const Vector2D & other) const
inline

check if this vector is strictly same as given vector.

Parameters
othercompared vector
Returns
true if strictly same, otherwise false.

◆ equals() [2/2]

bool rcsc::Vector2D::equals ( const Vector2D & other) const
inline

check if this vector is strictly same as given vector.

Parameters
othercompared vector
Returns
true if strictly same, otherwise false.

◆ equalsWeakly() [1/2]

bool rcsc::Vector2D::equalsWeakly ( const Vector2D & other) const
inline

check if this vector is weakly same as given vector.

Parameters
othercompared vector.
Returns
true if weakly same, otherwise false.

◆ equalsWeakly() [2/2]

bool rcsc::Vector2D::equalsWeakly ( const Vector2D & other) const
inline

check if this vector is weakly same as given vector.

Parameters
othercompared vector.
Returns
true if weakly same, otherwise false.

◆ from_polar() [1/2]

Vector2D rcsc::Vector2D::from_polar ( const double & mag,
const AngleDeg & theta )
inlinestatic

get new Vector created by POLAR value.

Parameters
maglength of vector
thetaangle of vector
Returns
new vector object

◆ from_polar() [2/2]

Vector2D rcsc::Vector2D::from_polar ( const double & mag,
const AngleDeg & theta )
inlinestatic

get new Vector created by POLAR value.

Parameters
maglength of vector
thetaangle of vector
Returns
new vector object

◆ inner_product() [1/2]

double rcsc::Vector2D::inner_product ( const Vector2D & v1,
const Vector2D & v2 )
inlinestatic

get inner(dot) product for v1 and v2.

Parameters
v1input 1
v2input 2
Returns
value of inner product

◆ inner_product() [2/2]

double rcsc::Vector2D::inner_product ( const Vector2D & v1,
const Vector2D & v2 )
inlinestatic

get inner(dot) product for v1 and v2.

Parameters
v1input 1
v2input 2
Returns
value of inner product

◆ innerProduct() [1/2]

double rcsc::Vector2D::innerProduct ( const Vector2D & v) const
inline

get inner(dot) product with 'v'.

Parameters
vtarget vector
Returns
value of inner product

◆ innerProduct() [2/2]

double rcsc::Vector2D::innerProduct ( const Vector2D & v) const
inline

get inner(dot) product with 'v'.

Parameters
vtarget vector
Returns
value of inner product

◆ invalidate() [1/2]

const Vector2D & rcsc::Vector2D::invalidate ( )
inline

invalidate this object

Returns
this

◆ invalidate() [2/2]

const Vector2D & rcsc::Vector2D::invalidate ( )
inline

invalidate this object

Returns
this

◆ isValid() [1/2]

bool rcsc::Vector2D::isValid ( ) const
inline

check if this vector is valid or not.

Returns
true if component values are validate.

◆ isValid() [2/2]

bool rcsc::Vector2D::isValid ( ) const
inline

check if this vector is valid or not.

Returns
true if component values are validate.

◆ length() [1/2]

double rcsc::Vector2D::length ( ) const
inline

get the length of vector. this method is equivalent to r().

Returns
length value

◆ length() [2/2]

double rcsc::Vector2D::length ( ) const
inline

get the length of vector. this method is equivalent to r().

Returns
length value

◆ length2() [1/2]

double rcsc::Vector2D::length2 ( ) const
inline

get the squared length value. this method is equivalent to r2().

Returns
squared length value

◆ length2() [2/2]

double rcsc::Vector2D::length2 ( ) const
inline

get the squared length value. this method is equivalent to r2().

Returns
squared length value

◆ norm() [1/2]

double rcsc::Vector2D::norm ( ) const
inline

get the norm value. this method is equivalent to r().

Returns
norm value

◆ norm() [2/2]

double rcsc::Vector2D::norm ( ) const
inline

get the norm value. this method is equivalent to r().

Returns
norm value

◆ norm2() [1/2]

double rcsc::Vector2D::norm2 ( ) const
inline

get the squared norm value. this method is equivalent to r2().

Returns
squared norm value

◆ norm2() [2/2]

double rcsc::Vector2D::norm2 ( ) const
inline

get the squared norm value. this method is equivalent to r2().

Returns
squared norm value

◆ normalize() [1/2]

Vector2D & rcsc::Vector2D::normalize ( )
inline

normalize vector. length is set to 1.0.

Returns
const reference to itself

◆ normalize() [2/2]

Vector2D & rcsc::Vector2D::normalize ( )
inline

normalize vector. length is set to 1.0.

Returns
const reference to itself

◆ normalizedVector() [1/2]

Vector2D rcsc::Vector2D::normalizedVector ( ) const
inline

get new normalized vector that the length is set to 1.0 but angle is same

Returns
new normalized vector

◆ normalizedVector() [2/2]

Vector2D rcsc::Vector2D::normalizedVector ( ) const
inline

get new normalized vector that the length is set to 1.0 but angle is same

Returns
new normalized vector

◆ operator*=() [1/2]

const Vector2D & rcsc::Vector2D::operator*= ( const double & scalar)
inline

multiplied by 'scalar'

Parameters
scalarmultiplication argument
Returns
const reference to itself

◆ operator*=() [2/2]

const Vector2D & rcsc::Vector2D::operator*= ( const double & scalar)
inline

multiplied by 'scalar'

Parameters
scalarmultiplication argument
Returns
const reference to itself

◆ operator+() [1/2]

const Vector2D & rcsc::Vector2D::operator+ ( ) const
inline

return this vector

Returns
const reference of this vector

◆ operator+() [2/2]

const Vector2D & rcsc::Vector2D::operator+ ( ) const
inline

return this vector

Returns
const reference of this vector

◆ operator+=() [1/2]

const Vector2D & rcsc::Vector2D::operator+= ( const Vector2D & v)
inline

add vector to itself

Parameters
vadded vector
Returns
const reference to itself

◆ operator+=() [2/2]

const Vector2D & rcsc::Vector2D::operator+= ( const Vector2D & v)
inline

add vector to itself

Parameters
vadded vector
Returns
const reference to itself

◆ operator-() [1/2]

Vector2D rcsc::Vector2D::operator- ( ) const
inline

create reversed vector

Returns
new vector that XY values are reversed.

◆ operator-() [2/2]

Vector2D rcsc::Vector2D::operator- ( ) const
inline

create reversed vector

Returns
new vector that XY values are reversed.

◆ operator-=() [1/2]

const Vector2D & rcsc::Vector2D::operator-= ( const Vector2D & v)
inline

subtract vector to itself

Parameters
vsubtract argument
Returns
const reference to itself

◆ operator-=() [2/2]

const Vector2D & rcsc::Vector2D::operator-= ( const Vector2D & v)
inline

subtract vector to itself

Parameters
vsubtract argument
Returns
const reference to itself

◆ operator/=() [1/2]

const Vector2D & rcsc::Vector2D::operator/= ( const double & scalar)
inline

divided by 'scalar'.

Parameters
scalardivision argument
Returns
const reference to itself

◆ operator/=() [2/2]

const Vector2D & rcsc::Vector2D::operator/= ( const double & scalar)
inline

divided by 'scalar'.

Parameters
scalardivision argument
Returns
const reference to itself

◆ outer_product() [1/2]

double rcsc::Vector2D::outer_product ( const Vector2D & v1,
const Vector2D & v2 )
inlinestatic

get outer(cross) product for v1 and v2.

Parameters
v1input 1
v2input 2
Returns
value of outer product

◆ outer_product() [2/2]

double rcsc::Vector2D::outer_product ( const Vector2D & v1,
const Vector2D & v2 )
inlinestatic

get outer(cross) product for v1 and v2.

Parameters
v1input 1
v2input 2
Returns
value of outer product

◆ outerProduct() [1/2]

double rcsc::Vector2D::outerProduct ( const Vector2D & v) const
inline

get virtal outer(cross) product with 'v'.

Parameters
vtarget vector
Returns
value of outer product

◆ outerProduct() [2/2]

double rcsc::Vector2D::outerProduct ( const Vector2D & v) const
inline

get virtal outer(cross) product with 'v'.

Parameters
vtarget vector
Returns
value of outer product

◆ polar2vector() [1/2]

Vector2D rcsc::Vector2D::polar2vector ( const double & mag,
const AngleDeg & theta )
inlinestatic

get new Vector created by POLAR value.

Parameters
maglength of vector
thetaangle of vector
Returns
new vector object

◆ polar2vector() [2/2]

Vector2D rcsc::Vector2D::polar2vector ( const double & mag,
const AngleDeg & theta )
inlinestatic

get new Vector created by POLAR value.

Parameters
maglength of vector
thetaangle of vector
Returns
new vector object

◆ print() [1/2]

std::ostream & rcsc::Vector2D::print ( std::ostream & os) const
inline

output XY values to ostream.

Parameters
osreference to ostream
Returns
reference to ostream

◆ print() [2/2]

std::ostream & rcsc::Vector2D::print ( std::ostream & os) const
inline

output XY values to ostream.

Parameters
osreference to ostream
Returns
reference to ostream

◆ printRound() [1/2]

std::ostream & rcsc::Vector2D::printRound ( std::ostream & os,
const double & prec = 0.1 ) const
inline

output rounded XY values to ostream.

Parameters
osreference to ostream
precprecision of output value
Returns
reference to ostream

◆ printRound() [2/2]

std::ostream & rcsc::Vector2D::printRound ( std::ostream & os,
const double & prec = 0.1 ) const
inline

output rounded XY values to ostream.

Parameters
osreference to ostream
precprecision of output value
Returns
reference to ostream

◆ r() [1/2]

double rcsc::Vector2D::r ( ) const
inline

get the length of vector.

Returns
length value

◆ r() [2/2]

double rcsc::Vector2D::r ( ) const
inline

get the length of vector.

Returns
length value

◆ r2() [1/2]

double rcsc::Vector2D::r2 ( ) const
inline

get the squared length of vector.

Returns
squared length

◆ r2() [2/2]

double rcsc::Vector2D::r2 ( ) const
inline

get the squared length of vector.

Returns
squared length

◆ reverse() [1/2]

Vector2D & rcsc::Vector2D::reverse ( )
inline

reverse vector components

Returns
*this.

◆ reverse() [2/2]

Vector2D & rcsc::Vector2D::reverse ( )
inline

reverse vector components

Returns
*this.

◆ reversedVector() [1/2]

Vector2D rcsc::Vector2D::reversedVector ( ) const
inline

get reversed vector.

Returns
new vector object

◆ reversedVector() [2/2]

Vector2D rcsc::Vector2D::reversedVector ( ) const
inline

get reversed vector.

Returns
new vector object

◆ rotate() [1/4]

Vector2D & rcsc::Vector2D::rotate ( const AngleDeg & angle)
inline

rotate this vector with 'angle'.

Parameters
anglerotated angle
Returns
reference to itself

◆ rotate() [2/4]

Vector2D & rcsc::Vector2D::rotate ( const AngleDeg & angle)
inline

rotate this vector with 'angle'.

Parameters
anglerotated angle
Returns
reference to itself

◆ rotate() [3/4]

Vector2D & rcsc::Vector2D::rotate ( const double & deg)
inline

rotate this vector with 'deg'

Parameters
degrotated angle by double type
Returns
reference to itself

◆ rotate() [4/4]

Vector2D & rcsc::Vector2D::rotate ( const double & deg)
inline

rotate this vector with 'deg'

Parameters
degrotated angle by double type
Returns
reference to itself

◆ rotatedVector() [1/4]

Vector2D rcsc::Vector2D::rotatedVector ( const AngleDeg & angle) const
inline

get new vector that is rotated by 'angle'.

Parameters
anglerotated angle.
Returns
new vector rotated by 'angle'

◆ rotatedVector() [2/4]

Vector2D rcsc::Vector2D::rotatedVector ( const AngleDeg & angle) const
inline

get new vector that is rotated by 'angle'.

Parameters
anglerotated angle.
Returns
new vector rotated by 'angle'

◆ rotatedVector() [3/4]

Vector2D rcsc::Vector2D::rotatedVector ( const double & deg) const
inline

get new vector that is rotated by 'deg'.

Parameters
degrotated angle. double type.
Returns
new vector rotated by 'deg'

◆ rotatedVector() [4/4]

Vector2D rcsc::Vector2D::rotatedVector ( const double & deg) const
inline

get new vector that is rotated by 'deg'.

Parameters
degrotated angle. double type.
Returns
new vector rotated by 'deg'

◆ scale() [1/2]

Vector2D & rcsc::Vector2D::scale ( const double & scalar)
inline

scale this vector

Parameters
scalarscaling factor
Returns
*this.

◆ scale() [2/2]

Vector2D & rcsc::Vector2D::scale ( const double & scalar)
inline

scale this vector

Parameters
scalarscaling factor
Returns
*this.

◆ setDir() [1/2]

Vector2D & rcsc::Vector2D::setDir ( const AngleDeg & dir)
inline

set vector's angle to 'angle'

Parameters
dirnew angle to be set
Returns
reference to itself

◆ setDir() [2/2]

Vector2D & rcsc::Vector2D::setDir ( const AngleDeg & dir)
inline

set vector's angle to 'angle'

Parameters
dirnew angle to be set
Returns
reference to itself

◆ setLength() [1/2]

Vector2D & rcsc::Vector2D::setLength ( const double & len)
inline

set vector length to 'len'.

Parameters
lennew length to be set
Returns
reference to itself

◆ setLength() [2/2]

Vector2D & rcsc::Vector2D::setLength ( const double & len)
inline

set vector length to 'len'.

Parameters
lennew length to be set
Returns
reference to itself

◆ setLengthVector() [1/2]

Vector2D rcsc::Vector2D::setLengthVector ( const double & len) const
inline

get new vector that the length is set to 'len'

Parameters
lennew length to be set
Returns
new vector that the length is set to 'len'

◆ setLengthVector() [2/2]

Vector2D rcsc::Vector2D::setLengthVector ( const double & len) const
inline

get new vector that the length is set to 'len'

Parameters
lennew length to be set
Returns
new vector that the length is set to 'len'

◆ setPolar() [1/2]

Vector2D & rcsc::Vector2D::setPolar ( const double & radius,
const AngleDeg & dir )
inline

assign XY value from POLAR value.

Parameters
radiusvector's radius
dirvector's angle
Returns
reference to itself

◆ setPolar() [2/2]

Vector2D & rcsc::Vector2D::setPolar ( const double & radius,
const AngleDeg & dir )
inline

assign XY value from POLAR value.

Parameters
radiusvector's radius
dirvector's angle
Returns
reference to itself

◆ th() [1/2]

AngleDeg rcsc::Vector2D::th ( ) const
inline

get the angle of vector.

Returns
angle

◆ th() [2/2]

AngleDeg rcsc::Vector2D::th ( ) const
inline

get the angle of vector.

Returns
angle

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