d2d.core.transformable



class Transformable;
Base class for Drawables containing code for rotation, scaling and translation around an origin.

@nogc void rotate(float amount);
Rotates this around origin with the specified amount relatively.

@nogc void scale(vec2 amount);
Scales this around origin with the specified amount relatively.

@nogc void move(vec2 amount);
Moves this with the specified amount relatively.

@nogc @property mat4 transform();
Calculates the transformation matrix when needed and returns it.

@nogc @property void position(vec2 position);
Sets the position of this transform.

@nogc @property vec2 position();
Gets the position of this transform.

@nogc @property void origin(vec2 origin);
Sets the origin position of this transform.

@nogc @property vec2 origin();
Gets the origin position of this transform.

@nogc @property void scaling(vec2 scale);
Sets the scaling of this transform.

@nogc @property vec2 scaling();
Gets the scaling of this transform.

@nogc @property void rotation(float rotation);
Sets the rotation of this transform.

@nogc @property float rotation();
Gets the rotation of this transform.


Page generated by Ddoc.