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 transform from a 3x3 matrix.

this
this(float[9] matrix)

Construct a transform from a float array describing a 3x3 matrix.

Members

Functions

combine
Transform 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
Transform rotate(float angle)

Combine the current transform with a rotation.

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

Combine the current transform with a rotation.

rotate
Transform rotate(float angle, Vector2f center)

Combine the current transform with a rotation.

scale
Transform scale(float scaleX, float scaleY)

Combine the current transform with a scaling.

scale
Transform scale(Vector2f factors)

Combine the current transform with a scaling.

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

Combine the current transform with a scaling.

scale
Transform scale(Vector2f factors, Vector2f center)

Combine the current transform with a scaling.

toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
transformPoint
Vector2f transformPoint(float x, float y)

Transform a 2D point.

transformPoint
Vector2f transformPoint(Vector2f point)

Transform a 2D point.

transformRect
FloatRect transformRect(const(FloatRect) rect)

Transform a rectangle.

translate
Transform translate(Vector2f offset)

Combine the current transform with a translation.

translate
Transform translate(float x, float y)

Combine the current transform with a translation.

Static variables

Identity
const(Transform) Identity;

Indentity transform (does nothing).

Variables

m_matrix
float[16] m_matrix;

4x4 matrix defining the transformation.

Meta