#include <util.h>
Static Public Member Functions | |
| static double | calcDotProduct (double firstVector[], double secondVector[], int size) |
| Calculates dot product of two double vectors of the stated size. | |
| static void | calcMatrixResult (double matrix[], double vector[], int rows, int columns, double resultVector[]) |
| Calculates vector-matrix product. | |
| static void | getRotationFromMatrix (CMatrix &mat, CVec &axis, float &angle) |
| Transforms homogenous matrix into axis-angle representation. | |
| static void | transposeMatrix (double *matrix, double *resultMatrix, int size) |
| Transposes a matrix. | |
| static void | multiplyMatrices (double *firstMatrix, double *secondMatrix, int firstRows, int firstColumns, int secondColumns, double *resultMatrix) |
| Multiplies two matrices. | |
| static void | quaternionFromMatrix (CMatrix &mat, CVec &quaternion) |
| Transforms a homogenous matrix into quaternion representation. | |
| static void | matrixFromQuaternion (CVec &quaternion, CMatrix &matrix) |
| Transforms a quaternion into homogenous matrix representation. | |
| static void | getMatrixFromRotation (CMatrix &mat, CVec &axis, float angle) |
| Transforms axis-angle representation into homogenous matrix representation. | |
| static void | getOrientation (CMatrix &mat, CVec &first, CVec &second) |
| Transforms homogenous matrix into Euler angle (YZX) representation (two solutions). | |
| static void | getRotation (CMatrix &mat, CVec &vec) |
| ransforms Euler angle (YZX) representation into homogenous matrix representation | |
| static void | getRotation (CMatrix &mat, float x, float y, float z) |
| Transforms Euler angle (YZX) representation into homogenous matrix representation. | |
| static void | calcAngles (float leg1, float leg2, float x, float y, float &first, float &second) |
| Calculates inverse kinematics of a standard two link leg. | |
| double CMathLib::calcDotProduct | ( | double | firstVector[], | |
| double | secondVector[], | |||
| int | size | |||
| ) | [static] |
Calculates dot product of two double vectors of the stated size.
| void CMathLib::calcMatrixResult | ( | double | matrix[], | |
| double | vector[], | |||
| int | rows, | |||
| int | columns, | |||
| double | resultVector[] | |||
| ) | [static] |
Calculates vector-matrix product.
| resultVector | Has to be allocated |
Transforms homogenous matrix into axis-angle representation.
| void CMathLib::transposeMatrix | ( | double * | matrix, | |
| double * | resultMatrix, | |||
| int | size | |||
| ) | [static] |
Transposes a matrix.
Set resultMatrix to matrix if you want to transpose the matrix
| resultMatrix | Has to be allocated |
| void CMathLib::multiplyMatrices | ( | double * | firstMatrix, | |
| double * | secondMatrix, | |||
| int | firstRows, | |||
| int | firstColumns, | |||
| int | secondColumns, | |||
| double * | resultMatrix | |||
| ) | [static] |
Multiplies two matrices.
| resultMatrix | Has to be allocated |
Transforms a homogenous matrix into quaternion representation.
| quaternion | XYZ is the rotation axis part, W the angle part |
Transforms a quaternion into homogenous matrix representation.
Transforms axis-angle representation into homogenous matrix representation.
Transforms homogenous matrix into Euler angle (YZX) representation (two solutions).
ransforms Euler angle (YZX) representation into homogenous matrix representation
| void CMathLib::getRotation | ( | CMatrix & | mat, | |
| float | x, | |||
| float | y, | |||
| float | z | |||
| ) | [static] |
Transforms Euler angle (YZX) representation into homogenous matrix representation.
| void CMathLib::calcAngles | ( | float | leg1, | |
| float | leg2, | |||
| float | x, | |||
| float | y, | |||
| float & | first, | |||
| float & | second | |||
| ) | [static] |
Calculates inverse kinematics of a standard two link leg.
| leg1 | Length of leg connected to base | |
| leg2 | Length of leg connected to hand | |
| x | Cartesian x position of hand | |
| y | Cartesian y position of hand | |
| first | Angle between base and leg1 | |
| second | Angle between leg1 and leg2 (elbow) |
1.5.2