Represents position, velocity and acceleration in x-dimensions.
More...
#include <state.h>
Represents position, velocity and acceleration in x-dimensions.
Definition at line 58 of file state.h.
◆ StateLinXd() [1/3]
xpp::StateLinXd::StateLinXd |
( |
int |
_dim = 0 | ) |
|
|
explicit |
Constructs an object of dimensions _dim.
Be careful of default value, as zero dimensional object is bound to cause seg-fault at some point.
Definition at line 36 of file state.cc.
◆ StateLinXd() [2/3]
Constructs object with specific position, velocity and acceleration.
- Parameters
-
p | Position of the state. |
v | Velocity of the state. |
a | Acceleration of the state. |
The dimensions are set to the number of rows of p.
Definition at line 44 of file state.cc.
◆ StateLinXd() [3/3]
xpp::StateLinXd::StateLinXd |
( |
const VectorXd & |
p | ) |
|
Constructs object with position p, zeroing velocity and acc.
Definition at line 54 of file state.cc.
◆ ~StateLinXd()
virtual xpp::StateLinXd::~StateLinXd |
( |
| ) |
|
|
virtualdefault |
◆ GetByIndex() [1/2]
Read either position, velocity of acceleration by index.
- Parameters
-
deriv | Index for that specific derivative (pos=0, vel=1, acc=2). |
- Returns
- Read only n-dimensional position, velocity or acceleration.
Definition at line 61 of file state.cc.
◆ GetByIndex() [2/2]
Read and write either position, velocity of acceleration by index.
- Parameters
-
deriv | Index for that specific derivative (pos=0, vel=1, acc=2). |
- Returns
- Read/write n-dimensional position, velocity or acceleration.
Definition at line 72 of file state.cc.
◆ operator!=()
bool xpp::StateLinXd::operator!= |
( |
const StateLinXd & |
other | ) |
const |
|
inline |
Returns true if just one value in this state differs from other.
Definition at line 268 of file state.h.
◆ operator==()
bool xpp::StateLinXd::operator== |
( |
const StateLinXd & |
other | ) |
const |
|
inline |
Returns true if this state has all same pos,vel and acc as other.
Definition at line 260 of file state.h.
◆ a_
position, velocity and acceleration
Definition at line 60 of file state.h.
◆ kNumDim
int xpp::StateLinXd::kNumDim = 0 |
the number of dimenions this state represents.
Definition at line 110 of file state.h.
◆ p_
◆ v_
The documentation for this class was generated from the following files: