BLMatrix2D Struct Reference

2D matrix represents an affine transformation matrix that can be used to transform geometry and images.

Public Members

Member Functions

Construction & Destruction
Reset Matrix
Overloaded Operators
Common Functionality
Matrix Properties
Matrix Operations
Map Points and Primitives

Static Functions

Static Constructors
Static Operations

Constructor & Destructor Documentation

BLMatrix2D::BLMatrix2D()default[1/3]

Creates an uninitialized 2D matrix, you must initialize all members before use.

BLMatrix2D::BLMatrix2D(const BLMatrix2D& src)constexprdefault[2/3]

Creates a new matrix initialized to a copy of src matrix.

BLMatrix2D::BLMatrix2D(double m00, double m01, double m10, double m11, double m20, double m21)constexpr[3/3]

Creates a new matrix initialized to:

[m00 m01]
[m10 m11]
[m20 m21]

Member Function Documentation

BLMatrix2D BLMatrix2D::makeIdentity()constexprstatic

Creates a new matrix initialized to identity.

BLMatrix2D BLMatrix2D::makeTranslation(double x, double y)constexprstatic[1/3]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

BLMatrix2D BLMatrix2D::makeTranslation(const BLPointI& p)constexprstatic[2/3]

Creates a new matrix initialized to translation.

BLMatrix2D BLMatrix2D::makeTranslation(const BLPoint& p)constexprstatic[3/3]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

BLMatrix2D BLMatrix2D::makeScaling(double xy)constexprstatic[1/4]

Creates a new matrix initialized to scaling.

BLMatrix2D BLMatrix2D::makeScaling(double x, double y)constexprstatic[2/4]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

BLMatrix2D BLMatrix2D::makeScaling(const BLPointI& p)constexprstatic[3/4]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

BLMatrix2D BLMatrix2D::makeScaling(const BLPoint& p)constexprstatic[4/4]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

BLMatrix2D BLMatrix2D::makeRotation(double angle)static[1/3]

Creates a new matrix initialized to rotation.

BLMatrix2D BLMatrix2D::makeRotation(double angle, double x, double y)static[2/3]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

BLMatrix2D BLMatrix2D::makeRotation(double angle, const BLPoint& p)static[3/3]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

BLMatrix2D BLMatrix2D::makeSkewing(double x, double y)static[1/2]

Create a new skewing matrix.

BLMatrix2D BLMatrix2D::makeSkewing(const BLPoint& p)static[2/2]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void BLMatrix2D::reset()[1/3]

Resets matrix to identity.

void BLMatrix2D::reset(const BLMatrix2D& other)[2/3]

Resets matrix to other (copy its content to this matrix).

void BLMatrix2D::reset(double m00, double m01, double m10, double m11, double m20, double m21)[3/3]

Resets matrix to [m00, m01, m10, m11, m20, m21].

void BLMatrix2D::resetToTranslation(double x, double y)[1/3]

Resets matrix to translation.

void BLMatrix2D::resetToTranslation(const BLPointI& p)[2/3]

Resets matrix to translation.

void BLMatrix2D::resetToTranslation(const BLPoint& p)[3/3]

Resets matrix to translation.

void BLMatrix2D::resetToScaling(double xy)[1/4]

Resets matrix to scaling.

void BLMatrix2D::resetToScaling(double x, double y)[2/4]

Resets matrix to scaling.

void BLMatrix2D::resetToScaling(const BLPointI& p)[3/4]

Resets matrix to scaling.

void BLMatrix2D::resetToScaling(const BLPoint& p)[4/4]

Resets matrix to scaling.

void BLMatrix2D::resetToSkewing(double x, double y)[1/2]

Resets matrix to skewing.

void BLMatrix2D::resetToSkewing(const BLPoint& p)[2/2]

Resets matrix to skewing.

void BLMatrix2D::resetToSinCos(double sin, double cos, double tx = 0.0, double ty = 0.0)[1/2]

Resets matrix to rotation specified by sin and cos and optional translation tx and ty.

void BLMatrix2D::resetToSinCos(double sin, double cos, const BLPoint& t)[2/2]

Resets matrix to rotation specified by sin and cos and optional translation t.

void BLMatrix2D::resetToRotation(double angle)[1/3]

Resets matrix to rotation.

void BLMatrix2D::resetToRotation(double angle, double x, double y)[2/3]

Resets matrix to rotation around a point [x, y].

void BLMatrix2D::resetToRotation(double angle, const BLPoint& p)[3/3]

Resets matrix to rotation around a point p.

uint32_t BLMatrix2D::type() const

Returns the matrix type, see BLMatrix2DType.

double BLMatrix2D::determinant()

Calculates the matrix determinant.

BLResult BLMatrix2D::invert()[1/2]

Inverts the matrix, returns BL_SUCCESS if the matrix has been inverted successfully.

BLResult BLMatrix2D::invert(BLMatrix2D& dst, const BLMatrix2D& src)static[2/2]

Inverts src matrix and stores the result in `dst.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Member Data Documentation

double BLMatrix2D::m[BL_MATRIX2D_VALUE_COUNT]

Matrix values, use BL_MATRIX2D_VALUE indexes to get a particular one.