Transform

Define a 3x3 transform matrix.

Constructors

this
this(float a00, float a01, float a02, float a10, float a11, float a12, float a20, float a21, float a22)

Construct a 3x3 matrix.

this
this(float[9] newMatrix)

Construct a 3x3 matrix from a float array.

Members

Functions

combine
void combine(Transform otherTransform)

Combine the current transform with another one.

getInverse
Transform getInverse()

Return the inverse of the transform.

getMatrix
const(float)[] getMatrix()

Return the transform as a 4x4 matrix.

opBinary
Vextor2f opBinary(Vector2f vector)

Overload of binary operator * to transform a point

opBinary
Transform opBinary(Transform rhs)

Overload of binary operator * to combine two transforms.

opOpAssign
Transform opOpAssign(Transform rhs)

Overload of assignment operator *= to combine two transforms.

rotate
void rotate(float angle)

Combine the current transform with a rotation.

rotate
void rotate(float angle, float centerX, float centerY)

Combine the current transform with a rotation.

scale
void scale(float scaleX, float scaleY)

Combine the current transform with a scaling.

scale
void scale(float scaleX, float scaleY, float centerX, float centerY)

Combine the current transform with a scaling.

transformPoint
Vector2f transformPoint(Vector2f point)

Transform a 2D point.

transformRect
FloatRect transformRect(const(FloatRect) rect)

Transform a rectangle.

translate
void translate(float x, float y)

Combine the current transform with a translation.

Static variables

Identity
const(Transform) Identity;

Indentity transform (does nothing).

Meta