#include <matrixutil.h>
Static Public Member Functions | |
| static void | Print (const osg::Matrix &matrix) |
| Prints a matrix. | |
| static void | Print (const osg::Vec3 &vec) |
| Prints a vector. | |
| static void | Print (const osg::Vec4 &vec) |
| Prints a vector. | |
| static float | ClampUnity (float x) |
| clamps a float from -1 to 1 | |
| static void | Transpose (osg::Matrix &dest, const osg::Matrix &src) |
| transposes a matrix | |
| static osg::Vec3 | GetRow3 (const osg::Matrix &matrix, int row) |
| static osg::Vec4 | GetRow4 (const osg::Matrix &matrix, int row) |
| static void | SetRow (osg::Matrix &matrix, const osg::Vec3 &vec, int row) |
| static void | SetRow (osg::Matrix &matrix, const osg::Vec4 &vec, int row) |
| static void | HprToMatrix (osg::Matrix &rotation, const osg::Vec3 &hpr) |
| Translates Euler angles Heading, pitch, and roll to an osg::Matrix. | |
| static void | PositionAndHprToMatrix (osg::Matrix &rotation, const osg::Vec3 &xyz, const osg::Vec3 &hpr) |
| Translates Euler angles Heading, pitch, and roll to an osg::Matrix in addition fills in the translation of the matrix. | |
| static void | MatrixToHpr (osg::Vec3 &hpr, const osg::Matrix &rotation) |
| Translates the rotation part of an osg::Matrix to Euler Angles. | |
| static void | MatrixToHprAndPosition (osg::Vec3 &xyz, osg::Vec3 &hpr, const osg::Matrix &rotation) |
| Translates the rotation part of an osg::Matrix to Euler Angles As well as the translation to a vector. | |
| static void | TransformVec3 (osg::Vec3 &xyz, const osg::Matrix &transformMat) |
| This function transforms a point by a 4x4 matrix and stores the result back in the point. | |
| static void | TransformVec3 (osg::Vec3 &vec_in, const osg::Vec3 &xyz, const osg::Matrix &transformMat) |
| This function transforms a point by a 4x4 matrix and stores the result into another vector. | |
| void MatrixUtil::Print | ( | const osg::Matrix & | matrix | ) | [static] |
Prints a matrix.
| void MatrixUtil::Print | ( | const osg::Vec3 & | vec | ) | [static] |
Prints a vector.
| void MatrixUtil::Print | ( | const osg::Vec4 & | vec | ) | [static] |
Prints a vector.
| float MatrixUtil::ClampUnity | ( | float | x | ) | [static] |
clamps a float from -1 to 1
| void MatrixUtil::Transpose | ( | osg::Matrix & | dest, | |
| const osg::Matrix & | src | |||
| ) | [static] |
transposes a matrix
| osg::Vec3 MatrixUtil::GetRow3 | ( | const osg::Matrix & | matrix, | |
| int | row | |||
| ) | [static] |
| osg::Vec4 MatrixUtil::GetRow4 | ( | const osg::Matrix & | matrix, | |
| int | row | |||
| ) | [static] |
| void MatrixUtil::SetRow | ( | osg::Matrix & | matrix, | |
| const osg::Vec3 & | vec, | |||
| int | row | |||
| ) | [static] |
| void MatrixUtil::SetRow | ( | osg::Matrix & | matrix, | |
| const osg::Vec4 & | vec, | |||
| int | row | |||
| ) | [static] |
| void MatrixUtil::HprToMatrix | ( | osg::Matrix & | rotation, | |
| const osg::Vec3 & | hpr | |||
| ) | [static] |
Translates Euler angles Heading, pitch, and roll to an osg::Matrix.
| rotation,: | the matrix whose rotation will be filled | |
| hpr,: | the current Heading, pitch, roll to translate to a matrix (values are in degrees) |
| void MatrixUtil::PositionAndHprToMatrix | ( | osg::Matrix & | rotation, | |
| const osg::Vec3 & | xyz, | |||
| const osg::Vec3 & | hpr | |||
| ) | [static] |
Translates Euler angles Heading, pitch, and roll to an osg::Matrix in addition fills in the translation of the matrix.
| rotation,: | the matrix whose rotation will be filled | |
| xyz,: | the translation to be added to the matrix | |
| hpr,: | the current Heading, pitch, roll to translate to a matrix |
| void MatrixUtil::MatrixToHpr | ( | osg::Vec3 & | hpr, | |
| const osg::Matrix & | rotation | |||
| ) | [static] |
Translates the rotation part of an osg::Matrix to Euler Angles.
| hpr,: | the vector to fill with the Euler Angles | |
| rotation,: | the current rotation matrix |
| void MatrixUtil::MatrixToHprAndPosition | ( | osg::Vec3 & | xyz, | |
| osg::Vec3 & | hpr, | |||
| const osg::Matrix & | rotation | |||
| ) | [static] |
Translates the rotation part of an osg::Matrix to Euler Angles As well as the translation to a vector.
| xyz,: | the vector to fill with the translation part of the matrix | |
| hpr,: | the vector to fill with the Euler Angles | |
| rotation,: | the current rotation matrix |
| void MatrixUtil::TransformVec3 | ( | osg::Vec3 & | xyz, | |
| const osg::Matrix & | transformMat | |||
| ) | [static] |
This function transforms a point by a 4x4 matrix and stores the result back in the point.
| xyz,: | the vector which will be transformed and have the result stored back in to | |
| transformMat,: | the 4x4 matrix which will be used to rotate and translate the point |
| void MatrixUtil::TransformVec3 | ( | osg::Vec3 & | vec_in, | |
| const osg::Vec3 & | xyz, | |||
| const osg::Matrix & | transformMat | |||
| ) | [static] |
This function transforms a point by a 4x4 matrix and stores the result into another vector.
| vec_in,: | the vector to store the result of the transform | |
| xyz,: | the vector which will be transformed | |
| transformMat,: | the 4x4 matrix which will be used to rotate and translate the point |