public static void prependRotation(AsMatrix matrix, float angle) { float sin = AsMath.sin(angle); float cos = AsMath.cos(angle); matrix.setTo(matrix.a * cos + matrix.c * sin, matrix.b * cos + matrix.d * sin, matrix.c * cos - matrix.a * sin, matrix.d * cos - matrix.b * sin, matrix.tx, matrix.ty); }
public static void prependMatrix(AsMatrix _base, AsMatrix prep) { _base.setTo(_base.a * prep.a + _base.c * prep.b, _base.b * prep.a + _base.d * prep.b, _base.a * prep.c + _base.c * prep.d, _base.b * prep.c + _base.d * prep.d, _base.tx + _base.a * prep.tx + _base.c * prep.ty, _base.ty + _base.b * prep.tx + _base.d * prep.ty); }
public static void prependScale(AsMatrix matrix, float sx, float sy) { matrix.setTo(matrix.a * sx, matrix.b * sx, matrix.c * sy, matrix.d * sy, matrix.tx, matrix.ty); }
public virtual void setOrthographicProjection(float x, float y, float width, float height) { mProjectionMatrix.setTo(2.0f / width, 0, 0, -2.0f / height, -(2 * x + width) / width, (2 * y + height) / height); }