rootPoint.set(0, getValue(c, r), 0); Vector3f normal = vars.vect8; rightPoint.set(1, getValue(c + 1, r), 0); bottomPoint.set(0, getValue(c, r + 1), 1); getNormal(bottomPoint, rootPoint, rightPoint, scale, normal); } else if (c == getWidth() - 1) { // last column leftPoint.set(-1, getValue(c - 1, r), 0); bottomPoint.set(0, getValue(c, r + 1), 1); getNormal(leftPoint, rootPoint, bottomPoint, scale, normal); } else { // all middle columns leftPoint.set(-1, getValue(c - 1, r), 0); rightPoint.set(1, getValue(c + 1, r), 0); bottomPoint.set(0, getValue(c, r + 1), 1); topPoint.set(0, getValue(c, r - 1), -1); rightPoint.set(1, getValue(c + 1, r), 0); getNormal(rightPoint, rootPoint, topPoint, scale, normal); } else if (c == getWidth() - 1) { // last column topPoint.set(0, getValue(c, r - 1), -1); leftPoint.set(-1, getValue(c - 1, r), 0); getNormal(topPoint, rootPoint, leftPoint, scale, normal); } else { // all middle columns topPoint.set(0, getValue(c, r - 1), -1); leftPoint.set(-1, getValue(c - 1, r), 0); rightPoint.set(1, getValue(c + 1, r), 0); topPoint.set(0, getValue(c, r - 1), -1); rightPoint.set(1, getValue(c + 1, r), 0);
rootPoint.set(0, getValue(c, r), 0); Vector3f normal = vars.vect8; rightPoint.set(1, getValue(c + 1, r), 0); bottomPoint.set(0, getValue(c, r + 1), 1); getNormal(bottomPoint, rootPoint, rightPoint, scale, normal); } else if (c == getWidth() - 1) { // last column leftPoint.set(-1, getValue(c - 1, r), 0); bottomPoint.set(0, getValue(c, r + 1), 1); getNormal(leftPoint, rootPoint, bottomPoint, scale, normal); } else { // all middle columns leftPoint.set(-1, getValue(c - 1, r), 0); rightPoint.set(1, getValue(c + 1, r), 0); bottomPoint.set(0, getValue(c, r + 1), 1); topPoint.set(0, getValue(c, r - 1), -1); rightPoint.set(1, getValue(c + 1, r), 0); getNormal(rightPoint, rootPoint, topPoint, scale, normal); } else if (c == getWidth() - 1) { // last column topPoint.set(0, getValue(c, r - 1), -1); leftPoint.set(-1, getValue(c - 1, r), 0); getNormal(topPoint, rootPoint, leftPoint, scale, normal); } else { // all middle columns topPoint.set(0, getValue(c, r - 1), -1); leftPoint.set(-1, getValue(c - 1, r), 0); rightPoint.set(1, getValue(c + 1, r), 0); topPoint.set(0, getValue(c, r - 1), -1); rightPoint.set(1, getValue(c + 1, r), 0);