Public Member Functions | Public Attributes | List of all members
xpp::StateLinXd Class Reference

Represents position, velocity and acceleration in x-dimensions. More...

#include <state.h>

Inheritance diagram for xpp::StateLinXd:
Inheritance graph
[legend]

Public Member Functions

VectorXdGetByIndex (MotionDerivative deriv)
 Read and write either position, velocity of acceleration by index. More...
 
const VectorXd GetByIndex (MotionDerivative deriv) const
 Read either position, velocity of acceleration by index. More...
 
bool operator!= (const StateLinXd &other) const
 Returns true if just one value in this state differs from other. More...
 
bool operator== (const StateLinXd &other) const
 Returns true if this state has all same pos,vel and acc as other. More...
 
 StateLinXd (const VectorXd &p)
 Constructs object with position p, zeroing velocity and acc. More...
 
 StateLinXd (const VectorXd &p, const VectorXd &v, const VectorXd &a)
 Constructs object with specific position, velocity and acceleration. More...
 
 StateLinXd (int _dim=0)
 Constructs an object of dimensions _dim. More...
 
virtual ~StateLinXd ()=default
 

Public Attributes

VectorXd a_
 position, velocity and acceleration More...
 
int kNumDim = 0
 the number of dimenions this state represents. More...
 
VectorXd p_
 
VectorXd v_
 

Detailed Description

Represents position, velocity and acceleration in x-dimensions.

Definition at line 85 of file state.h.

Constructor & Destructor Documentation

◆ 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 63 of file state.cc.

◆ StateLinXd() [2/3]

xpp::StateLinXd::StateLinXd ( const VectorXd p,
const VectorXd v,
const VectorXd a 
)
explicit

Constructs object with specific position, velocity and acceleration.

Parameters
pPosition of the state.
vVelocity of the state.
aAcceleration of the state.

The dimensions are set to the number of rows of p.

Definition at line 71 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 81 of file state.cc.

◆ ~StateLinXd()

virtual xpp::StateLinXd::~StateLinXd ( )
virtualdefault

Member Function Documentation

◆ GetByIndex() [1/2]

VectorXd & xpp::StateLinXd::GetByIndex ( MotionDerivative  deriv)

Read and write either position, velocity of acceleration by index.

Parameters
derivIndex for that specific derivative (pos=0, vel=1, acc=2).
Returns
Read/write n-dimensional position, velocity or acceleration.

Definition at line 99 of file state.cc.

◆ GetByIndex() [2/2]

const VectorXd xpp::StateLinXd::GetByIndex ( MotionDerivative  deriv) const

Read either position, velocity of acceleration by index.

Parameters
derivIndex for that specific derivative (pos=0, vel=1, acc=2).
Returns
Read only n-dimensional position, velocity or acceleration.

Definition at line 88 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 295 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 287 of file state.h.

Member Data Documentation

◆ a_

VectorXd xpp::StateLinXd::a_

position, velocity and acceleration

Definition at line 87 of file state.h.

◆ kNumDim

int xpp::StateLinXd::kNumDim = 0

the number of dimenions this state represents.

Definition at line 137 of file state.h.

◆ p_

VectorXd xpp::StateLinXd::p_

Definition at line 87 of file state.h.

◆ v_

VectorXd xpp::StateLinXd::v_

Definition at line 87 of file state.h.


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


xpp_states
Author(s): Alexander W. Winkler
autogenerated on Wed Mar 2 2022 01:14:14