libalmath  1.14
 All Classes Namespaces Functions Variables Typedefs Groups Pages
Public Member Functions | Public Attributes
AL::Math::Rotation3D Struct Reference

A Rotation3D give 3 composed angles in radians. More...

#include <alrotation3d.h>

List of all members.

Public Member Functions

 Rotation3D ()
 Create a Rotation3D initialized with 0.0f.
 Rotation3D (float pInit)
 Create a Rotation3D initialized with the same float.
 Rotation3D (float pWx, float pWy, float pWz)
 Create a Rotation3D initialized with explicit value.
 Rotation3D (const std::vector< float > &pFloats)
 Create a Rotation3D with an std::vector.
Rotation3D operator+ (const Rotation3D &pRot2) const
 Overloading of operator + for Rotation3D.
Rotation3D operator- (const Rotation3D &pRot2) const
 Overloading of operator - for Rotation3D.
Rotation3Doperator+= (const Rotation3D &pRot2)
 Overloading of operator += for Rotation3D.
Rotation3Doperator-= (const Rotation3D &pRot2)
 Overloading of operator -= for Rotation3D.
bool operator== (const Rotation3D &pRot2) const
 Overloading of operator == for Rotation3D.
bool operator!= (const Rotation3D &pRot2) const
 Overloading of operator != for Rotation3D.
Rotation3D operator* (const float pVal) const
 Overloading of operator * for Rotation3D.
Rotation3D operator/ (const float pVal) const
 Overloading of operator / for Rotation3D.
Rotation3Doperator*= (const float pVal)
 Overloading of operator *= for Rotation3D.
Rotation3Doperator/= (const float pVal)
 Overloading of operator /= for Rotation3D.
bool isNear (const Rotation3D &pRot2, const float &pEpsilon=0.0001f) const
 Check if the actual Rotation3D is near the one given in argument.
float norm () const
 Compute the norm of the actual Position6D:
std::vector< float > toVector () const
 Return the Rotation3D as a vector of float [wx, wy, wz].

Public Attributes

float wx
float wy
float wz

Detailed Description

A Rotation3D give 3 composed angles in radians.

Definition at line 21 of file alrotation3d.h.


Constructor & Destructor Documentation

AL::Math::Rotation3D::Rotation3D ( )

Create a Rotation3D initialized with 0.0f.

$ \left[\begin{array}{c} wx \\ wy \\ wz \end{array}\right] = \left[\begin{array}{c} 0.0 \\ 0.0 \\ 0.0 \end{array}\right]$

AL::Math::Rotation3D::Rotation3D ( float  pInit)
explicit

Create a Rotation3D initialized with the same float.

Parameters:
pInitthe float value for each member

$ \left[\begin{array}{c} wx \\ wy \\ wz \end{array}\right] = \left[\begin{array}{c} pInit \\ pInit \\ pInit \end{array}\right]$

AL::Math::Rotation3D::Rotation3D ( float  pWx,
float  pWy,
float  pWz 
)

Create a Rotation3D initialized with explicit value.

$ \left[\begin{array}{c} wx \\ wy \\ wz \end{array}\right] = \left[\begin{array}{c} pWx \\ pWy \\ pWz \end{array}\right]$

Parameters:
pWxthe float value for wx
pWythe float value for wy
pWzthe float value for wz
AL::Math::Rotation3D::Rotation3D ( const std::vector< float > &  pFloats)

Create a Rotation3D with an std::vector.

$ \left[\begin{array}{c} wx \\ wy \\ wz \end{array}\right] = \left[\begin{array}{c} pFloats[0] \\ pFloats[1] \\ pFloats[2] \end{array}\right]$

Parameters:
pFloatsAn std::vector<float> of size 3 for respectively: wx, wy and wz

Member Function Documentation

bool AL::Math::Rotation3D::isNear ( const Rotation3D pRot2,
const float &  pEpsilon = 0.0001f 
) const

Check if the actual Rotation3D is near the one given in argument.

Parameters:
pRot2the second Rotation3D
pEpsilonan optional epsilon distance
Returns:
true if the difference of each float of the two Rotation3D is less than pEpsilon
float AL::Math::Rotation3D::norm ( ) const

Compute the norm of the actual Position6D:

$\sqrt{pRot.wx^2 + pRot.wy^2 + pRot.wz^2}$

Returns:
the float norm of the Position6D
bool AL::Math::Rotation3D::operator!= ( const Rotation3D pRot2) const

Overloading of operator != for Rotation3D.

Parameters:
pRot2the second Rotation3D
Rotation3D AL::Math::Rotation3D::operator* ( const float  pVal) const

Overloading of operator * for Rotation3D.

Parameters:
pValthe float factor
Rotation3D& AL::Math::Rotation3D::operator*= ( const float  pVal)

Overloading of operator *= for Rotation3D.

Parameters:
pValthe float factor
Rotation3D AL::Math::Rotation3D::operator+ ( const Rotation3D pRot2) const

Overloading of operator + for Rotation3D.

Parameters:
pRot2the second Rotation3D
Rotation3D& AL::Math::Rotation3D::operator+= ( const Rotation3D pRot2)

Overloading of operator += for Rotation3D.

Parameters:
pRot2the second Rotation3D
Rotation3D AL::Math::Rotation3D::operator- ( const Rotation3D pRot2) const

Overloading of operator - for Rotation3D.

Parameters:
pRot2the second Rotation3D
Rotation3D& AL::Math::Rotation3D::operator-= ( const Rotation3D pRot2)

Overloading of operator -= for Rotation3D.

Parameters:
pRot2the second Rotation3D
Rotation3D AL::Math::Rotation3D::operator/ ( const float  pVal) const

Overloading of operator / for Rotation3D.

Parameters:
pValthe float factor
Rotation3D& AL::Math::Rotation3D::operator/= ( const float  pVal)

Overloading of operator /= for Rotation3D.

Parameters:
pValthe float factor
bool AL::Math::Rotation3D::operator== ( const Rotation3D pRot2) const

Overloading of operator == for Rotation3D.

Parameters:
pRot2the second Rotation3D
std::vector<float> AL::Math::Rotation3D::toVector ( ) const

Return the Rotation3D as a vector of float [wx, wy, wz].


Member Data Documentation

float AL::Math::Rotation3D::wx

Definition at line 23 of file alrotation3d.h.

float AL::Math::Rotation3D::wy

Definition at line 25 of file alrotation3d.h.

float AL::Math::Rotation3D::wz

Definition at line 27 of file alrotation3d.h.


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