Commented ProtectedPolygonalRegion.volume() out until someone can fix it.

This commit is contained in:
zml2008 2011-12-07 07:32:27 -08:00
parent 5bcac17f1c
commit 4454df341f

View File

@ -164,7 +164,8 @@ public String getTypeName() {
@Override @Override
public int volume() { public int volume() {
int volume = 0; int volume = 0;
int numPoints = points.size(); // TODO: Fix this
/*int numPoints = points.size();
if (numPoints < 3) { if (numPoints < 3) {
return 0; return 0;
} }
@ -172,7 +173,7 @@ public int volume() {
double area = 0; double area = 0;
int xa, z1, z2; int xa, z1, z2;
for (int i = 0; i <= numPoints - 1; i++) { for (int i = 0; i < numPoints; i++) {
xa = points.get(i).getBlockX(); xa = points.get(i).getBlockX();
//za = points.get(i).getBlockZ(); //za = points.get(i).getBlockZ();
@ -195,7 +196,7 @@ public int volume() {
area = area + (xa * (points.get(1).getBlockZ() - points.get(numPoints - 1).getBlockZ())); area = area + (xa * (points.get(1).getBlockZ() - points.get(numPoints - 1).getBlockZ()));
volume = (Math.abs(maxY - minY) + 1) * (int) Math.ceil((Math.abs(area) / 2)); volume = (Math.abs(maxY - minY) + 1) * (int) Math.ceil((Math.abs(area) / 2));*/
return volume; return volume;
} }