libalmath  2.5.11.14a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
AL::Math::PositionAndVelocity Struct Reference

Create and play with a PositionAndVelocity. More...

#include <alpositionandvelocity.h>

Public Member Functions

 PositionAndVelocity (const float pq=0.0f, const float pdq=0.0f)
 Create a PositionAndVelocity initialize with explicit value. More...
 
bool isNear (const PositionAndVelocity &pDat2, const float &pEpsilon=0.0001f) const
 Check if the actual PositionAndVelocity is near the one give in argument. More...
 
void toVector (std::vector< float > &pReturnVector) const
 Return the PositionAndVelocity as a vector of float [q, dq]. More...
 
std::vector< float > toVector (void) const
 

Public Attributes

float q
 
float dq
 

Detailed Description

Create and play with a PositionAndVelocity.

A PositionAndVelocity is just defined by q and dq.

Definition at line 23 of file alpositionandvelocity.h.

Constructor & Destructor Documentation

AL::Math::PositionAndVelocity::PositionAndVelocity ( const float  pq = 0.0f,
const float  pdq = 0.0f 
)

Create a PositionAndVelocity initialize with explicit value.

$ \left[\begin{array}{c} q \\ dq \end{array}\right] = \left[\begin{array}{c} pq \\ pdq \end{array}\right]$

Parameters
pqthe float value for q
pdqthe float value for dq

Member Function Documentation

bool AL::Math::PositionAndVelocity::isNear ( const PositionAndVelocity pDat2,
const float &  pEpsilon = 0.0001f 
) const

Check if the actual PositionAndVelocity is near the one give in argument.

Parameters
pDat2the second PositionAndVelocity
pEpsilonan optional epsilon distance (default = 0.0001f)
Returns
true if the difference of each float of the two PositionAndVelocity is less than pEpsilon
void AL::Math::PositionAndVelocity::toVector ( std::vector< float > &  pReturnVector) const

Return the PositionAndVelocity as a vector of float [q, dq].

std::vector<float> AL::Math::PositionAndVelocity::toVector ( void  ) const

Member Data Documentation

float AL::Math::PositionAndVelocity::dq

Definition at line 28 of file alpositionandvelocity.h.

float AL::Math::PositionAndVelocity::q

Definition at line 26 of file alpositionandvelocity.h.


The documentation for this struct was generated from the following file: