Added setSide function to Cuboid6

This commit is contained in:
Chicken Bones committed 2013-10-01 11:58:04 +10:00
1 parent ab0713c129
commit 3b762d300f
1 file changed
+15 -1
+15 -1
View File
@@ -146,7 +146,7 @@ public class Cuboid6
return this;
}
public double side(int s)
public double getSide(int s)
{
switch(s) {
case 0: return min.y;
@@ -158,4 +158,18 @@ public class Cuboid6
}
throw new IndexOutOfBoundsException("Switch Falloff");
}
public Cuboid6 setSide(int s, double d)
{
switch(s) {
case 0: min.y = d; break;
case 1: max.y = d; break;
case 2: min.z = d; break;
case 3: max.z = d; break;
case 4: min.x = d; break;
case 5: max.x = d; break;
default: throw new IndexOutOfBoundsException("Switch Falloff");
}
return this;
}
}