mathutils.cpp File Reference

#include <math.h>
#include <osg/Matrix>
#include "mathutils.h"
#include "axis.h"

Include dependency graph for mathutils.cpp:

Include dependency graph

Namespaces

namespace  lpzrobots

Functions

osg::Matrix osgRotate (const double &alpha, const double &beta, const double &gamma)
 returns a rotation matrix (osg) with the given angles alpha, beta and gamma
Matrix osgMatrix2Matrixlib (const osg::Matrix &m)
 converts osg matrix to matrix of matrixlib
osg::Matrix rotationMatrixFromAxisX (const Axis &axis)
 returns a Rotation matrix that rotates the x-axis along with the given axis.
osg::Matrix rotationMatrixFromAxisZ (const Axis &axis)
 returns a Rotation matrix that rotates the z-axis along with the given axis.
double getAngle (const osg::Vec3 &a, const osg::Vec3 &b)
 returns the angle between two vectors (in rad)
matrix::Matrix odeRto3x3RotationMatrixT (const double R[12])
 converts an ode rotation matrix into a 3x3 rotation matrix (matrixlib)
matrix::Matrix odeRto3x3RotationMatrix (const double R[12])
 converts an ode rotation matrix into a 3x3 rotation matrix (matrixlib)
Position multMatrixPosition (const Matrix &r, Position &p)
 Multiplies 3x3 matrix with position.
Matrix getRotationMatrix (const double &angle)
 returns a rotation matrix with the given angle
Matrix getTranslationMatrix (const Position &p)
 returns a translation matrix with the given Position
Matrix removeTranslationInMatrix (const Matrix &pose)
 removes the translation in the matrix
Matrix removeRotationInMatrix (const Matrix &pose)
 removes the rotation in the matrix
double getAngle (Position a, Position b)
 returns the angle between two vectors

Function Documentation

double getAngle Position  a,
Position  b
 

returns the angle between two vectors

double getAngle const osg::Vec3 a,
const osg::Vec3 b
 

returns the angle between two vectors (in rad)

matrix::Matrix getRotationMatrix const double &  angle  ) 
 

returns a rotation matrix with the given angle

matrix::Matrix getTranslationMatrix const Position p  ) 
 

returns a translation matrix with the given Position

Position multMatrixPosition const matrix::Matrix r,
Position p
 

Multiplies 3x3 matrix with position.

matrix::Matrix odeRto3x3RotationMatrix const double  R[12]  ) 
 

converts an ode rotation matrix into a 3x3 rotation matrix (matrixlib)

Examples:
sphererobot3masses.cpp.

matrix::Matrix odeRto3x3RotationMatrixT const double  R[12]  ) 
 

converts an ode rotation matrix into a 3x3 rotation matrix (matrixlib)

matrix::Matrix osgMatrix2Matrixlib const osg::Matrix m  ) 
 

converts osg matrix to matrix of matrixlib

osg::Matrix osgRotate const double &  alpha,
const double &  beta,
const double &  gamma
 

returns a rotation matrix (osg) with the given angles alpha, beta and gamma

Matrix removeRotationInMatrix const matrix::Matrix pose  ) 
 

removes the rotation in the matrix

Matrix removeTranslationInMatrix const matrix::Matrix pose  ) 
 

removes the translation in the matrix

osg::Matrix rotationMatrixFromAxisX const Axis &  axis  ) 
 

returns a Rotation matrix that rotates the x-axis along with the given axis.

The other 2 axis (y,z) are ambiguous.

osg::Matrix rotationMatrixFromAxisZ const Axis &  axis  ) 
 

returns a Rotation matrix that rotates the z-axis along with the given axis.

The other 2 axis (x,y) are ambiguous.


Generated on Tue Jan 16 02:14:41 2007 for Robotsystem of the Robot Group Leipzig by doxygen 1.3.8