All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mmb.engine.rotate.Rotable Maven / Gradle / Ivy

Go to download

Dependency for the MultiMachineBuilder, a voxel game about building an industrial empire in a finite world. THIS RELEASE IS NOT PLAYABLE. To play the game, donwload from >ITCH.IO LINK HERE< or >GH releases link here<

The newest version!
/**
 * 
 */
package mmb.engine.rotate;

import mmb.NN;

/**
 * Adds rotation support to any object
 * @author oskar
 */
public interface Rotable {
	/**
	 * Sets the orientation of this object
	 * @param rotation new orientation
	 */
	public void setRotation(Rotation rotation);
	/** @return current orientation of this object */
	public @NN Rotation getRotation();
	/** Rotates this object clockwise */
	public default void cw() {
		setRotation(getRotation().cw());
	}
	/** Rotates this object counter-clockwise */
	public default void ccw() {
		setRotation(getRotation().ccw());
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy