/** * Adds another transformation to this transformation and returns int as a * new transform. * * @param transform The transformation to add * @return The added transforms as a copy */ public DiscreteTransform2 withTransformation(DiscreteTransform2 transform) { return new DiscreteTransform2(transform.getMatrix().mul(getMatrix())); }
switch (axis) { case X: { final Matrix3d rotation2 = DiscreteTransform2.rotationAroundCenter(quarterTurns, new Vector2i(size.getZ(), size.getY())).getMatrix(); rotation3 = new Matrix4d( 1, 0, 0, 0, final Matrix3d rotation2 = DiscreteTransform2.rotationAroundCenter(quarterTurns, new Vector2i(size.getX(), size.getZ())).getMatrix(); rotation3 = new Matrix4d( rotation2.get(0, 0), 0, rotation2.get(0, 1), rotation2.get(0, 2), final Matrix3d rotation2 = DiscreteTransform2.rotationAroundCenter(quarterTurns, new Vector2i(size.getX(), size.getY())).getMatrix(); rotation3 = new Matrix4d( rotation2.get(0, 0), rotation2.get(0, 1), 0, rotation2.get(0, 2),
/** * Adds another transformation to this transformation and returns int as a * new transform. * * @param transform The transformation to add * @return The added transforms as a copy */ public DiscreteTransform2 withTransformation(DiscreteTransform2 transform) { return new DiscreteTransform2(transform.getMatrix().mul(getMatrix())); }
switch (axis) { case X: { final Matrix3d rotation2 = DiscreteTransform2.rotationAroundCenter(quarterTurns, new Vector2i(size.getZ(), size.getY())).getMatrix(); rotation3 = new Matrix4d( 1, 0, 0, 0, final Matrix3d rotation2 = DiscreteTransform2.rotationAroundCenter(quarterTurns, new Vector2i(size.getX(), size.getZ())).getMatrix(); rotation3 = new Matrix4d( rotation2.get(0, 0), 0, rotation2.get(0, 1), rotation2.get(0, 2), final Matrix3d rotation2 = DiscreteTransform2.rotationAroundCenter(quarterTurns, new Vector2i(size.getX(), size.getY())).getMatrix(); rotation3 = new Matrix4d( rotation2.get(0, 0), rotation2.get(0, 1), 0, rotation2.get(0, 2),