Efficient mathematic functions operating on the data types Vec3d, Mat3d, Transformation3d, and Quaternion. More...
Functions | |
void | AddMatMat (const Mat3d &matrix1, const Mat3d &matrix2, Mat3d &matrix) |
void | AddToMat (Mat3d &matrix, const Mat3d &matrixToAdd) |
void | AddToVec (Vec3d &vec, const Vec3d &vectorToAdd) |
void | AddVecVec (const Vec3d &vector1, const Vec3d &vector2, Vec3d &result) |
float | Angle (const Vec3d &vector1, const Vec3d &vector2) |
float | Angle (const Vec3d &vector1, const Vec3d &vector2, const Vec3d &axis) |
void | Average (const Vec3d &vector1, const Vec3d &vector2, Vec3d &result) |
void | CrossProduct (const Vec3d &vector1, const Vec3d &vector2, Vec3d &result) |
float | Det (const Mat3d &matrix) |
float | Distance (const Vec3d &vector1, const Vec3d &vector2) |
float | EvaluateForm (const Vec3d &matrix1, const Mat3d &matrix2) |
void | GetAxisAndAngle (const Mat3d &R, Vec3d &axis, float &angle) |
void | Invert (const Mat3d &matrix, Mat3d &result) |
void | Invert (const Transformation3d &input, Transformation3d &result) |
float | Length (const Vec3d &vec) |
bool | LoadFromFile (Vec3d &vector, const char *pFilePath) |
bool | LoadFromFile (Mat3d &matrix, const char *pFilePath) |
bool | LoadFromFile (Transformation3d &transformation, const char *pFilePath) |
void | Mean (const CVec3dArray &vectorList, Vec3d &result) |
void | Mean (const Vec3d *pVectors, int nVectors, Vec3d &result) |
void | MulMatMat (const Mat3d &matrix1, const Mat3d &matrix2, Mat3d &result) |
void | MulMatScalar (const Mat3d &matrix, float scalar, Mat3d &result) |
void | MulMatVec (const Mat3d &matrix, const Vec3d &vec, Vec3d &result) |
void | MulMatVec (const Mat3d &matrix, const Vec3d &vector1, const Vec3d &vector2, Vec3d &result) |
void | MulQuatQuat (const Quaternion &quat1, const Quaternion &quat2, Quaternion &result) |
void | MulTransTrans (const Transformation3d &transformation1, const Transformation3d &transformation2, Transformation3d &result) |
void | MulTransVec (const Transformation3d &transformation, const Vec3d &vec, Vec3d &result) |
void | MulVecScalar (const Vec3d &vec, float scalar, Vec3d &result) |
void | MulVecTransposedVec (const Vec3d &vector1, const Vec3d &vector2, Mat3d &result) |
void | NormalizeVec (Vec3d &vec) |
void | RotateVec (const Vec3d &vec, const Vec3d &rotation, Vec3d &result) |
void | RotateVecAngleAxis (const Vec3d &vec, const Vec3d &axis, float theta, Vec3d &result) |
void | RotateVecQuaternion (const Vec3d &vec, const Vec3d &axis, float theta, Vec3d &result) |
void | RotateVecYZX (const Vec3d &vec, const Vec3d &rotation, Vec3d &result) |
bool | SaveToFile (const Vec3d &vector, const char *pFilePath) |
bool | SaveToFile (const Mat3d &matrix, const char *pFilePath) |
bool | SaveToFile (const Transformation3d &transformation, const char *pFilePath) |
float | ScalarProduct (const Vec3d &vector1, const Vec3d &vector2) |
void | SetMat (Mat3d &matrix, float r1, float r2, float r3, float r4, float r5, float r6, float r7, float r8, float r9) |
void | SetMat (Mat3d &matrix, const Mat3d &sourceMatrix) |
void | SetRotationMat (Mat3d &matrix, const Vec3d &axis, float theta) |
void | SetRotationMat (Mat3d &matrix, float alpha, float beta, float gamma) |
void | SetRotationMat (Mat3d &matrix, const Vec3d &rotation) |
void | SetRotationMatAxis (Mat3d &matrix, const Vec3d &axis, float theta) |
void | SetRotationMatX (Mat3d &matrix, float theta) |
void | SetRotationMatY (Mat3d &matrix, float theta) |
void | SetRotationMatYZX (Mat3d &matrix, const Vec3d &rotation) |
void | SetRotationMatZ (Mat3d &matrix, float theta) |
void | SetTransformation (Transformation3d &transformation, const Vec3d &rotation, const Vec3d &translation) |
void | SetTransformation (Transformation3d &transformation, const Transformation3d &sourceTransformation) |
void | SetVec (Vec3d &vec, float x, float y, float z) |
void | SetVec (Vec3d &vec, const Vec3d &sourceVector) |
float | SquaredDistance (const Vec3d &vector1, const Vec3d &vector2) |
float | SquaredLength (const Vec3d &vec) |
void | SubtractFromVec (Vec3d &vec, const Vec3d &vectorToSubtract) |
void | SubtractMatMat (const Mat3d &matrix1, const Mat3d &matrix2, Mat3d &result) |
void | SubtractVecVec (const Vec3d &vector1, const Vec3d &vector2, Vec3d &result) |
void | TransformVec (const Vec3d &vec, const Vec3d &rotation, const Vec3d &translation, Vec3d &result) |
void | TransformVecYZX (const Vec3d &vec, const Vec3d &rotation, const Vec3d &translation, Vec3d &result) |
void | Transpose (const Mat3d &matrix, Mat3d &result) |
Variables | |
const Mat3d | unit_mat = { 1, 0, 0, 0, 1, 0, 0, 0, 1 } |
const Mat3d | zero_mat = { 0, 0, 0, 0, 0, 0, 0, 0 ,0 } |
const Vec3d | zero_vec = { 0, 0, 0 } |
Efficient mathematic functions operating on the data types Vec3d, Mat3d, Transformation3d, and Quaternion.
void Math3d::AddMatMat | ( | const Mat3d & | matrix1, |
const Mat3d & | matrix2, | ||
Mat3d & | matrix | ||
) |
Definition at line 682 of file Math3d.cpp.
void Math3d::AddToMat | ( | Mat3d & | matrix, |
const Mat3d & | matrixToAdd | ||
) |
Definition at line 695 of file Math3d.cpp.
void Math3d::AddToVec | ( | Vec3d & | vec, |
const Vec3d & | vectorToAdd | ||
) |
Definition at line 481 of file Math3d.cpp.
void Math3d::AddVecVec | ( | const Vec3d & | vector1, |
const Vec3d & | vector2, | ||
Vec3d & | result | ||
) |
Definition at line 495 of file Math3d.cpp.
float Math3d::Angle | ( | const Vec3d & | vector1, |
const Vec3d & | vector2 | ||
) |
Definition at line 613 of file Math3d.cpp.
float Math3d::Angle | ( | const Vec3d & | vector1, |
const Vec3d & | vector2, | ||
const Vec3d & | axis | ||
) |
Definition at line 842 of file Math3d.cpp.
void Math3d::Average | ( | const Vec3d & | vector1, |
const Vec3d & | vector2, | ||
Vec3d & | result | ||
) |
Definition at line 886 of file Math3d.cpp.
void Math3d::CrossProduct | ( | const Vec3d & | vector1, |
const Vec3d & | vector2, | ||
Vec3d & | result | ||
) |
Definition at line 564 of file Math3d.cpp.
float Math3d::Det | ( | const Mat3d & | matrix | ) |
Definition at line 721 of file Math3d.cpp.
float Math3d::Distance | ( | const Vec3d & | vector1, |
const Vec3d & | vector2 | ||
) |
Definition at line 595 of file Math3d.cpp.
float Math3d::EvaluateForm | ( | const Vec3d & | matrix1, |
const Mat3d & | matrix2 | ||
) |
Definition at line 626 of file Math3d.cpp.
void Math3d::GetAxisAndAngle | ( | const Mat3d & | R, |
Vec3d & | axis, | ||
float & | angle | ||
) |
Definition at line 872 of file Math3d.cpp.
void Math3d::Invert | ( | const Mat3d & | matrix, |
Mat3d & | result | ||
) |
Definition at line 657 of file Math3d.cpp.
void Math3d::Invert | ( | const Transformation3d & | input, |
Transformation3d & | result | ||
) |
Definition at line 744 of file Math3d.cpp.
float Math3d::Length | ( | const Vec3d & | vec | ) |
Definition at line 585 of file Math3d.cpp.
bool Math3d::LoadFromFile | ( | Vec3d & | vector, |
const char * | pFilePath | ||
) |
Definition at line 68 of file Math3d.cpp.
bool Math3d::LoadFromFile | ( | Mat3d & | matrix, |
const char * | pFilePath | ||
) |
Definition at line 104 of file Math3d.cpp.
bool Math3d::LoadFromFile | ( | Transformation3d & | transformation, |
const char * | pFilePath | ||
) |
Definition at line 143 of file Math3d.cpp.
void Math3d::Mean | ( | const CVec3dArray & | vectorList, |
Vec3d & | result | ||
) |
Definition at line 893 of file Math3d.cpp.
void Math3d::Mean | ( | const Vec3d * | pVectors, |
int | nVectors, | ||
Vec3d & | result | ||
) |
Definition at line 898 of file Math3d.cpp.
void Math3d::MulMatMat | ( | const Mat3d & | matrix1, |
const Mat3d & | matrix2, | ||
Mat3d & | result | ||
) |
Definition at line 444 of file Math3d.cpp.
void Math3d::MulMatScalar | ( | const Mat3d & | matrix, |
float | scalar, | ||
Mat3d & | result | ||
) |
Definition at line 509 of file Math3d.cpp.
void Math3d::MulMatVec | ( | const Mat3d & | matrix, |
const Vec3d & | vec, | ||
Vec3d & | result | ||
) |
Definition at line 422 of file Math3d.cpp.
void Math3d::MulMatVec | ( | const Mat3d & | matrix, |
const Vec3d & | vector1, | ||
const Vec3d & | vector2, | ||
Vec3d & | result | ||
) |
Definition at line 433 of file Math3d.cpp.
void Math3d::MulQuatQuat | ( | const Quaternion & | quat1, |
const Quaternion & | quat2, | ||
Quaternion & | result | ||
) |
Definition at line 763 of file Math3d.cpp.
void Math3d::MulTransTrans | ( | const Transformation3d & | transformation1, |
const Transformation3d & | transformation2, | ||
Transformation3d & | result | ||
) |
Definition at line 751 of file Math3d.cpp.
void Math3d::MulTransVec | ( | const Transformation3d & | transformation, |
const Vec3d & | vec, | ||
Vec3d & | result | ||
) |
Definition at line 757 of file Math3d.cpp.
void Math3d::MulVecScalar | ( | const Vec3d & | vec, |
float | scalar, | ||
Vec3d & | result | ||
) |
Definition at line 502 of file Math3d.cpp.
void Math3d::MulVecTransposedVec | ( | const Vec3d & | vector1, |
const Vec3d & | vector2, | ||
Mat3d & | result | ||
) |
Definition at line 467 of file Math3d.cpp.
void Math3d::NormalizeVec | ( | Vec3d & | vec | ) |
Definition at line 573 of file Math3d.cpp.
void Math3d::RotateVec | ( | const Vec3d & | vec, |
const Vec3d & | rotation, | ||
Vec3d & | result | ||
) |
Definition at line 530 of file Math3d.cpp.
void Math3d::RotateVecAngleAxis | ( | const Vec3d & | vec, |
const Vec3d & | axis, | ||
float | theta, | ||
Vec3d & | result | ||
) |
Definition at line 835 of file Math3d.cpp.
void Math3d::RotateVecQuaternion | ( | const Vec3d & | vec, |
const Vec3d & | axis, | ||
float | theta, | ||
Vec3d & | result | ||
) |
Definition at line 777 of file Math3d.cpp.
void Math3d::RotateVecYZX | ( | const Vec3d & | vec, |
const Vec3d & | rotation, | ||
Vec3d & | result | ||
) |
Definition at line 544 of file Math3d.cpp.
bool Math3d::SaveToFile | ( | const Vec3d & | vector, |
const char * | pFilePath | ||
) |
Definition at line 183 of file Math3d.cpp.
bool Math3d::SaveToFile | ( | const Mat3d & | matrix, |
const char * | pFilePath | ||
) |
Definition at line 200 of file Math3d.cpp.
bool Math3d::SaveToFile | ( | const Transformation3d & | transformation, |
const char * | pFilePath | ||
) |
Definition at line 220 of file Math3d.cpp.
float Math3d::ScalarProduct | ( | const Vec3d & | vector1, |
const Vec3d & | vector2 | ||
) |
Definition at line 559 of file Math3d.cpp.
void Math3d::SetMat | ( | Mat3d & | matrix, |
float | r1, | ||
float | r2, | ||
float | r3, | ||
float | r4, | ||
float | r5, | ||
float | r6, | ||
float | r7, | ||
float | r8, | ||
float | r9 | ||
) |
Definition at line 257 of file Math3d.cpp.
void Math3d::SetMat | ( | Mat3d & | matrix, |
const Mat3d & | sourceMatrix | ||
) |
Definition at line 270 of file Math3d.cpp.
void Math3d::SetRotationMat | ( | Mat3d & | matrix, |
const Vec3d & | axis, | ||
float | theta | ||
) |
Definition at line 367 of file Math3d.cpp.
void Math3d::SetRotationMat | ( | Mat3d & | matrix, |
float | alpha, | ||
float | beta, | ||
float | gamma | ||
) |
Definition at line 307 of file Math3d.cpp.
void Math3d::SetRotationMat | ( | Mat3d & | matrix, |
const Vec3d & | rotation | ||
) |
Definition at line 283 of file Math3d.cpp.
void Math3d::SetRotationMatAxis | ( | Mat3d & | matrix, |
const Vec3d & | axis, | ||
float | theta | ||
) |
Definition at line 399 of file Math3d.cpp.
void Math3d::SetRotationMatX | ( | Mat3d & | matrix, |
float | theta | ||
) |
Definition at line 340 of file Math3d.cpp.
void Math3d::SetRotationMatY | ( | Mat3d & | matrix, |
float | theta | ||
) |
Definition at line 349 of file Math3d.cpp.
void Math3d::SetRotationMatYZX | ( | Mat3d & | matrix, |
const Vec3d & | rotation | ||
) |
Definition at line 327 of file Math3d.cpp.
void Math3d::SetRotationMatZ | ( | Mat3d & | matrix, |
float | theta | ||
) |
Definition at line 358 of file Math3d.cpp.
void Math3d::SetTransformation | ( | Transformation3d & | transformation, |
const Vec3d & | rotation, | ||
const Vec3d & | translation | ||
) |
Definition at line 732 of file Math3d.cpp.
void Math3d::SetTransformation | ( | Transformation3d & | transformation, |
const Transformation3d & | sourceTransformation | ||
) |
Definition at line 738 of file Math3d.cpp.
void Math3d::SetVec | ( | Vec3d & | vec, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Definition at line 243 of file Math3d.cpp.
void Math3d::SetVec | ( | Vec3d & | vec, |
const Vec3d & | sourceVector | ||
) |
Definition at line 250 of file Math3d.cpp.
float Math3d::SquaredDistance | ( | const Vec3d & | vector1, |
const Vec3d & | vector2 | ||
) |
Definition at line 604 of file Math3d.cpp.
float Math3d::SquaredLength | ( | const Vec3d & | vec | ) |
Definition at line 590 of file Math3d.cpp.
void Math3d::SubtractFromVec | ( | Vec3d & | vec, |
const Vec3d & | vectorToSubtract | ||
) |
Definition at line 488 of file Math3d.cpp.
void Math3d::SubtractMatMat | ( | const Mat3d & | matrix1, |
const Mat3d & | matrix2, | ||
Mat3d & | result | ||
) |
Definition at line 708 of file Math3d.cpp.
void Math3d::SubtractVecVec | ( | const Vec3d & | vector1, |
const Vec3d & | vector2, | ||
Vec3d & | result | ||
) |
Definition at line 522 of file Math3d.cpp.
void Math3d::TransformVec | ( | const Vec3d & | vec, |
const Vec3d & | rotation, | ||
const Vec3d & | translation, | ||
Vec3d & | result | ||
) |
Definition at line 537 of file Math3d.cpp.
void Math3d::TransformVecYZX | ( | const Vec3d & | vec, |
const Vec3d & | rotation, | ||
const Vec3d & | translation, | ||
Vec3d & | result | ||
) |
Definition at line 551 of file Math3d.cpp.
void Math3d::Transpose | ( | const Mat3d & | matrix, |
Mat3d & | result | ||
) |
Definition at line 635 of file Math3d.cpp.
const Mat3d Math3d::unit_mat = { 1, 0, 0, 0, 1, 0, 0, 0, 1 } |
Definition at line 60 of file Math3d.cpp.
const Mat3d Math3d::zero_mat = { 0, 0, 0, 0, 0, 0, 0, 0 ,0 } |
Definition at line 61 of file Math3d.cpp.
const Vec3d Math3d::zero_vec = { 0, 0, 0 } |
Definition at line 59 of file Math3d.cpp.