Homogenous vector. More...
#include <vecmath.h>
Public Member Functions | |
CVec () | |
CVec (PRECISION x, PRECISION y, PRECISION z) | |
PRECISION | length () const |
void | normalize () |
CVec | operator* (PRECISION s) const |
Scalar multiplication. | |
CVec & | operator*= (PRECISION s) |
CVec | operator+ (const CVec &v) const |
Vector addition. | |
CVec & | operator+= (const CVec &v) |
CVec | operator- (const CVec &v) const |
Vector difference. | |
CVec | operator- () const |
Vector negation. | |
CVec & | operator-= (const CVec &v) |
CVec | operator/ (PRECISION s) const |
CVec & | operator/= (PRECISION s) |
CVec & | operator= (const CVec &v) |
Assigns values of vector v to vector. | |
PRECISION | operator[] (unsigned int i) const |
Array access (read) | |
PRECISION & | operator[] (unsigned int i) |
Array access (write) | |
CVec | operator^ (const CVec &v) const |
Cross product. | |
PRECISION | operator| (const CVec &v) const |
Dot product. | |
void | print () const |
Prints vector as (x,y,z) to console. | |
void | set (PRECISION x, PRECISION y, PRECISION z) |
std::string | toString () |
Public Attributes | |
PRECISION | w |
PRECISION | x |
PRECISION | y |
PRECISION | z |
robotLibPbD::CVec::CVec | ( | ) | [inline] |
robotLibPbD::CVec::CVec | ( | PRECISION | x, |
PRECISION | y, | ||
PRECISION | z | ||
) | [inline] |
PRECISION robotLibPbD::CVec::length | ( | ) | const [inline] |
void robotLibPbD::CVec::normalize | ( | ) | [inline] |
CVec robotLibPbD::CVec::operator- | ( | ) | const [inline] |
PRECISION robotLibPbD::CVec::operator[] | ( | unsigned int | i | ) | const [inline] |
PRECISION& robotLibPbD::CVec::operator[] | ( | unsigned int | i | ) | [inline] |
void robotLibPbD::CVec::print | ( | ) | const |
Prints vector as (x,y,z) to console.
Definition at line 60 of file vecmath.cpp.
void robotLibPbD::CVec::set | ( | PRECISION | x, |
PRECISION | y, | ||
PRECISION | z | ||
) |
Definition at line 51 of file vecmath.cpp.
std::string robotLibPbD::CVec::toString | ( | ) |
Definition at line 65 of file vecmath.cpp.