Format sourcecode
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.client.render;
|
||||
|
||||
|
||||
@@ -25,6 +26,7 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
|
||||
|
||||
/**
|
||||
* TODO: Removed useless stuff.
|
||||
*/
|
||||
@@ -32,44 +34,44 @@ public enum FacingToRotation
|
||||
{
|
||||
|
||||
// DUNSWE
|
||||
//@formatter:off
|
||||
DOWN_DOWN ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
DOWN_UP ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
DOWN_NORTH ( new Vector3f( -90, 0, 0 ) ),
|
||||
DOWN_SOUTH ( new Vector3f( -90, 0, 180 ) ),
|
||||
DOWN_WEST ( new Vector3f( -90, 0, 90 ) ),
|
||||
DOWN_EAST ( new Vector3f( -90, 0, -90 ) ),
|
||||
UP_DOWN ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
UP_UP ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
UP_NORTH ( new Vector3f( 90, 0, 180 ) ),
|
||||
UP_SOUTH ( new Vector3f( 90, 0, 0 ) ),
|
||||
UP_WEST ( new Vector3f( 90, 0, 90 ) ),
|
||||
UP_EAST ( new Vector3f( 90, 0, -90 ) ),
|
||||
NORTH_DOWN ( new Vector3f( 0, 0, 180 ) ),
|
||||
NORTH_UP ( new Vector3f( 0, 0, 0 ) ),
|
||||
NORTH_NORTH ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
NORTH_SOUTH ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
NORTH_WEST ( new Vector3f( 0, 0, 90 ) ),
|
||||
NORTH_EAST ( new Vector3f( 0, 0, -90 ) ),
|
||||
SOUTH_DOWN ( new Vector3f( 0, 180, 180 ) ),
|
||||
SOUTH_UP ( new Vector3f( 0, 180, 0 ) ),
|
||||
SOUTH_NORTH ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
SOUTH_SOUTH ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
SOUTH_WEST ( new Vector3f( 0, 180, -90 ) ),
|
||||
SOUTH_EAST ( new Vector3f( 0, 180, 90 ) ),
|
||||
WEST_DOWN ( new Vector3f( 0, 90, 180 ) ),
|
||||
WEST_UP ( new Vector3f( 0, 90, 0 ) ),
|
||||
WEST_NORTH ( new Vector3f( 0, 90, -90 ) ),
|
||||
WEST_SOUTH ( new Vector3f( 0, 90, 90 ) ),
|
||||
WEST_WEST ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
WEST_EAST ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
EAST_DOWN ( new Vector3f( 0, -90, 180 ) ),
|
||||
EAST_UP ( new Vector3f( 0, -90, 0 ) ),
|
||||
EAST_NORTH ( new Vector3f( 0, -90, 90 ) ),
|
||||
EAST_SOUTH ( new Vector3f( 0, -90, -90 ) ),
|
||||
EAST_WEST ( new Vector3f( 0, 0, 0 ) ), //NOOP
|
||||
EAST_EAST ( new Vector3f( 0, 0, 0 ) ); //NOOP
|
||||
//@formatter:on
|
||||
// @formatter:off
|
||||
DOWN_DOWN( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
DOWN_UP( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
DOWN_NORTH( new Vector3f( -90, 0, 0 ) ),
|
||||
DOWN_SOUTH( new Vector3f( -90, 0, 180 ) ),
|
||||
DOWN_WEST( new Vector3f( -90, 0, 90 ) ),
|
||||
DOWN_EAST( new Vector3f( -90, 0, -90 ) ),
|
||||
UP_DOWN( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
UP_UP( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
UP_NORTH( new Vector3f( 90, 0, 180 ) ),
|
||||
UP_SOUTH( new Vector3f( 90, 0, 0 ) ),
|
||||
UP_WEST( new Vector3f( 90, 0, 90 ) ),
|
||||
UP_EAST( new Vector3f( 90, 0, -90 ) ),
|
||||
NORTH_DOWN( new Vector3f( 0, 0, 180 ) ),
|
||||
NORTH_UP( new Vector3f( 0, 0, 0 ) ),
|
||||
NORTH_NORTH( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
NORTH_SOUTH( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
NORTH_WEST( new Vector3f( 0, 0, 90 ) ),
|
||||
NORTH_EAST( new Vector3f( 0, 0, -90 ) ),
|
||||
SOUTH_DOWN( new Vector3f( 0, 180, 180 ) ),
|
||||
SOUTH_UP( new Vector3f( 0, 180, 0 ) ),
|
||||
SOUTH_NORTH( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
SOUTH_SOUTH( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
SOUTH_WEST( new Vector3f( 0, 180, -90 ) ),
|
||||
SOUTH_EAST( new Vector3f( 0, 180, 90 ) ),
|
||||
WEST_DOWN( new Vector3f( 0, 90, 180 ) ),
|
||||
WEST_UP( new Vector3f( 0, 90, 0 ) ),
|
||||
WEST_NORTH( new Vector3f( 0, 90, -90 ) ),
|
||||
WEST_SOUTH( new Vector3f( 0, 90, 90 ) ),
|
||||
WEST_WEST( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
WEST_EAST( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
EAST_DOWN( new Vector3f( 0, -90, 180 ) ),
|
||||
EAST_UP( new Vector3f( 0, -90, 0 ) ),
|
||||
EAST_NORTH( new Vector3f( 0, -90, 90 ) ),
|
||||
EAST_SOUTH( new Vector3f( 0, -90, -90 ) ),
|
||||
EAST_WEST( new Vector3f( 0, 0, 0 ) ), // NOOP
|
||||
EAST_EAST( new Vector3f( 0, 0, 0 ) ); // NOOP
|
||||
// @formatter:on
|
||||
|
||||
private final Vector3f rot;
|
||||
private final Matrix4f mat;
|
||||
@@ -77,7 +79,10 @@ public enum FacingToRotation
|
||||
private FacingToRotation( Vector3f rot )
|
||||
{
|
||||
this.rot = rot;
|
||||
this.mat = TRSRTransformation.toVecmath( new org.lwjgl.util.vector.Matrix4f().rotate( (float) Math.toRadians( rot.x ), new org.lwjgl.util.vector.Vector3f( 1, 0, 0 ) ).rotate( (float) Math.toRadians( rot.y ), new org.lwjgl.util.vector.Vector3f( 0, 1, 0 ) ).rotate( (float) Math.toRadians( rot.z ), new org.lwjgl.util.vector.Vector3f( 0, 0, 1 ) ) );
|
||||
this.mat = TRSRTransformation
|
||||
.toVecmath( new org.lwjgl.util.vector.Matrix4f().rotate( (float) Math.toRadians( rot.x ), new org.lwjgl.util.vector.Vector3f( 1, 0, 0 ) )
|
||||
.rotate( (float) Math.toRadians( rot.y ), new org.lwjgl.util.vector.Vector3f( 0, 1, 0 ) )
|
||||
.rotate( (float) Math.toRadians( rot.z ), new org.lwjgl.util.vector.Vector3f( 0, 0, 1 ) ) );
|
||||
}
|
||||
|
||||
public Vector3f getRot()
|
||||
|
||||
Reference in New Issue
Block a user