Efficient mathematic functions operating on the data types Vec2d and Mat2d. More...
Functions | |
void | AddToVec (Vec2d &vec, const Vec2d &vectorToAdd) |
void | AddVecVec (const Vec2d &vector1, const Vec2d &vector2, Vec2d &result) |
float | Angle (const Vec2d &vector1, const Vec2d &vector2) |
void | ApplyHomography (const Mat3d &A, const Vec2d &p, Vec2d &result) |
void | Average (const Vec2d &vector1, const Vec2d &vector2, Vec2d &result) |
void | ComputeRectangleCornerPoints (const Rectangle2d &rectangle, Vec2d resultCornerPoints[4]) |
float | Distance (const Vec2d &vector1, const Vec2d &vector2) |
void | Invert (const Mat2d &matrix, Mat2d &result) |
float | Length (const Vec2d &vec) |
void | Mean (const CVec2dArray &vectorList, Vec2d &result) |
void | Mean (const Vec2d *pVectors, int nVectors, Vec2d &result) |
void | MulMatMat (const Mat2d &matrix1, const Mat2d &matrix2, Mat2d &result) |
void | MulMatScalar (const Mat2d &matrix, float scalar, Mat2d &result) |
void | MulMatVec (const Mat2d &matrix, const Vec2d &vec, Vec2d &result) |
void | MulMatVec (const Mat2d &matrix, const Vec2d &vector1, const Vec2d &vector2, Vec2d &result) |
void | MulVecScalar (const Vec2d &vec, float scalar, Vec2d &result) |
void | NormalizeVec (Vec2d &vec) |
void | RotateVec (const Vec2d &vec, float angle, Vec2d &result) |
void | RotateVec (const Vec2d &point, const Vec2d ¢er, float angle, Vec2d &result) |
float | ScalarProduct (const Vec2d &vector1, const Vec2d &vector2) |
void | SetRotationMat (Mat2d &matrix, float angle) |
void | SetVec (Vec2d &vec, float x, float y) |
void | SetVec (Vec2d &vec, const Vec2d &sourceVector) |
float | SquaredDistance (const Vec2d &vector1, const Vec2d &vector2) |
float | SquaredLength (const Vec2d &vec) |
void | SubtractFromVec (Vec2d &vec, const Vec2d &vectorToSubtract) |
void | SubtractVecVec (const Vec2d &vector1, const Vec2d &vector2, Vec2d &result) |
void | Transpose (const Mat2d &matrix, Mat2d &result) |
Variables | |
const Vec2d | zero_vec = { 0, 0 } |
Definition at line 81 of file Math2d.cpp.
Definition at line 93 of file Math2d.cpp.
Definition at line 197 of file Math2d.cpp.
Definition at line 253 of file Math2d.cpp.
Definition at line 267 of file Math2d.cpp.
void Math2d::ComputeRectangleCornerPoints | ( | const Rectangle2d & | rectangle, |
Vec2d | resultCornerPoints[4] | ||
) |
Definition at line 298 of file Math2d.cpp.
Definition at line 181 of file Math2d.cpp.
Definition at line 238 of file Math2d.cpp.
float Math2d::Length | ( | const Vec2d & | vec | ) |
Definition at line 171 of file Math2d.cpp.
void Math2d::Mean | ( | const CVec2dArray & | vectorList, |
Vec2d & | result | ||
) |
Definition at line 273 of file Math2d.cpp.
Definition at line 278 of file Math2d.cpp.
Definition at line 117 of file Math2d.cpp.
Definition at line 109 of file Math2d.cpp.
Definition at line 128 of file Math2d.cpp.
void Math2d::MulMatVec | ( | const Mat2d & | matrix, |
const Vec2d & | vector1, | ||
const Vec2d & | vector2, | ||
Vec2d & | result | ||
) |
Definition at line 135 of file Math2d.cpp.
Definition at line 142 of file Math2d.cpp.
Definition at line 160 of file Math2d.cpp.
Definition at line 206 of file Math2d.cpp.
Definition at line 216 of file Math2d.cpp.
Definition at line 155 of file Math2d.cpp.
Definition at line 99 of file Math2d.cpp.
Definition at line 68 of file Math2d.cpp.
Definition at line 74 of file Math2d.cpp.
Definition at line 189 of file Math2d.cpp.
float Math2d::SquaredLength | ( | const Vec2d & | vec | ) |
Definition at line 176 of file Math2d.cpp.
Definition at line 87 of file Math2d.cpp.
Definition at line 148 of file Math2d.cpp.
Definition at line 228 of file Math2d.cpp.
const Vec2d Math2d::zero_vec = { 0, 0 } |
Definition at line 61 of file Math2d.cpp.