Added support for Qubicle Model files.

This commit is contained in:
Chicken-Bomes committed 2014-01-28 16:54:30 +10:00
1 parent 477b77e7e1
commit 7450370d99
7 files changed
+1006 -13

No files matched your search

+35
View File
@@ -35,6 +35,11 @@ public class BlockCoord implements Comparable<BlockCoord>
{
}
public static BlockCoord fromAxes(int[] ia)
{
return new BlockCoord(ia[2], ia[0], ia[1]);
}
@Override
public boolean equals(Object obj)
{
@@ -146,6 +151,36 @@ public class BlockCoord implements Comparable<BlockCoord>
{
return offset(side, -amount);
}
public int getSide(int side) {
switch(side) {
case 0:
case 1:
return y;
case 2:
case 3:
return z;
case 4:
case 5:
return x;
}
throw new IndexOutOfBoundsException("Switch Falloff");
}
public BlockCoord setSide(int s, int v)
{
switch(s)
{
case 0:
case 1: y = v; break;
case 2:
case 3: z = v; break;
case 4:
case 5: x = v; break;
default: throw new IndexOutOfBoundsException("Switch Falloff");
}
return this;
}
public static final BlockCoord[] sideOffsets = new BlockCoord[]{
new BlockCoord( 0,-1, 0),