Math2d.h File Reference
#include "DataStructures/DynamicArrayTemplate.h"
#include <vector>

Go to the source code of this file.


struct  Vec2d
 Data structure for the representation of a 2D vector. More...
struct  Mat2d
 Data structure for the representation of a 2x2 matrix. More...


 Efficient mathematic functions operating on the data types Vec2d and Mat2d.


typedef std::vector< Vec2dVec2dList
typedef CDynamicArrayTemplate
< Vec2d


void Math2d::SetVec (Vec2d &vec, float x, float y)
void Math2d::SetVec (Vec2d &vec, const Vec2d &sourceVector)
void Math2d::SetRotationMat (Mat2d &matrix, float angle)
void Math2d::MulMatMat (const Mat2d &matrix1, const Mat2d &matrix2, Mat2d &result)
void Math2d::MulMatVec (const Mat2d &matrix, const Vec2d &vec, Vec2d &result)
void Math2d::MulMatVec (const Mat2d &matrix, const Vec2d &vector1, const Vec2d &vector2, Vec2d &result)
void Math2d::MulMatScalar (const Mat2d &matrix, float scalar, Mat2d &result)
void Math2d::MulVecScalar (const Vec2d &vec, float scalar, Vec2d &result)
void Math2d::RotateVec (const Vec2d &vec, float angle, Vec2d &result)
void Math2d::RotateVec (const Vec2d &point, const Vec2d &center, float angle, Vec2d &result)
void Math2d::AddVecVec (const Vec2d &vector1, const Vec2d &vector2, Vec2d &result)
void Math2d::SubtractVecVec (const Vec2d &vector1, const Vec2d &vector2, Vec2d &result)
void Math2d::AddToVec (Vec2d &vec, const Vec2d &vectorToAdd)
void Math2d::SubtractFromVec (Vec2d &vec, const Vec2d &vectorToSubtract)
float Math2d::ScalarProduct (const Vec2d &vector1, const Vec2d &vector2)
float Math2d::SquaredLength (const Vec2d &vec)
float Math2d::Length (const Vec2d &vec)
float Math2d::Distance (const Vec2d &vector1, const Vec2d &vector2)
float Math2d::SquaredDistance (const Vec2d &vector1, const Vec2d &vector2)
float Math2d::Angle (const Vec2d &vector1, const Vec2d &vector2)
void Math2d::Transpose (const Mat2d &matrix, Mat2d &result)
void Math2d::Invert (const Mat2d &matrix, Mat2d &result)
void Math2d::NormalizeVec (Vec2d &vec)
void Math2d::ApplyHomography (const Mat3d &A, const Vec2d &p, Vec2d &result)
void Math2d::Average (const Vec2d &vector1, const Vec2d &vector2, Vec2d &result)
void Math2d::Mean (const CVec2dArray &vectorList, Vec2d &result)
void Math2d::Mean (const Vec2d *pVectors, int nVectors, Vec2d &result)
void Math2d::ComputeRectangleCornerPoints (const Rectangle2d &rectangle, Vec2d resultCornerPoints[4])


const Vec2d Math2d::zero_vec = { 0, 0 }

Typedef Documentation

Definition at line 107 of file Math2d.h.

typedef std::vector<Vec2d> Vec2dList

Definition at line 106 of file Math2d.h.