Data structure to assign values to each endeffector. More...
#include <endeffectors.h>
Public Member Functions | |
T & | at (EndeffectorID ee) |
Read/write access to the endeffector stored at index ee. | |
const T & | at (EndeffectorID ee) const |
Read access to the endeffector stored at index ee. | |
Endeffectors (int n_ee=0) | |
int | GetEECount () const |
std::vector< EndeffectorID > | GetEEsOrdered () const |
bool | operator!= (const Endeffectors &other) const |
const EndeffectorsT | operator- (const EndeffectorsT &rhs) const |
const EndeffectorsT | operator/ (double scalar) const |
void | SetAll (const T &value) |
Sets each endeffector to the same value. | |
void | SetCount (int n_ee) |
Sets the number of endeffectors. | |
Container | ToImpl () const |
virtual | ~Endeffectors () |
Private Attributes | |
Container | ee_ |
Data structure to assign values to each endeffector.
Common values are xyz-positions (Vector3d), contact-flags (bool), or joints angles of each leg.
This gives a unified interface, and also holds for boolean values (which is not possible using an std::vector). It allows to restrict default constructors, define addition and subtraction of all endeffectors and other convenience functions associated specifically to endeffectors.
The idea is that this class is an enhanced STL container, but complies to the same interface, (e.g at()). However, in case this unified interface is burdensome, you can always access the underlying STL-deque container directly.
Definition at line 59 of file endeffectors.h.
xpp::Endeffectors< T >::Endeffectors | ( | int | n_ee = 0 | ) |
Definition at line 176 of file endeffectors.h.
virtual xpp::Endeffectors< T >::~Endeffectors | ( | ) | [virtual] |
T & xpp::Endeffectors< T >::at | ( | EndeffectorID | ee | ) |
Read/write access to the endeffector stored at index ee.
ee | Endeffector index/position. |
Definition at line 197 of file endeffectors.h.
const T & xpp::Endeffectors< T >::at | ( | EndeffectorID | ee | ) | const |
Read access to the endeffector stored at index ee.
ee | Endeffector index/position. |
Definition at line 204 of file endeffectors.h.
int xpp::Endeffectors< T >::GetEECount | ( | ) | const |
Definition at line 211 of file endeffectors.h.
std::vector< EndeffectorID > xpp::Endeffectors< T >::GetEEsOrdered | ( | ) | const |
Definition at line 225 of file endeffectors.h.
bool xpp::Endeffectors< T >::operator!= | ( | const Endeffectors< T > & | other | ) | const |
Definition at line 267 of file endeffectors.h.
const Endeffectors< T >::EndeffectorsT xpp::Endeffectors< T >::operator- | ( | const EndeffectorsT & | rhs | ) | const |
Definition at line 236 of file endeffectors.h.
const Endeffectors< T >::EndeffectorsT xpp::Endeffectors< T >::operator/ | ( | double | scalar | ) | const |
Definition at line 247 of file endeffectors.h.
void xpp::Endeffectors< T >::SetAll | ( | const T & | value | ) |
Sets each endeffector to the same value.
Definition at line 190 of file endeffectors.h.
void xpp::Endeffectors< T >::SetCount | ( | int | n_ee | ) |
Sets the number of endeffectors.
Definition at line 183 of file endeffectors.h.
Endeffectors< T >::Container xpp::Endeffectors< T >::ToImpl | ( | ) | const |
Definition at line 218 of file endeffectors.h.
Container xpp::Endeffectors< T >::ee_ [private] |
Definition at line 113 of file endeffectors.h.