@SuppressWarnings("ConstantConditions") @Test public void testSurfacePoint_NortheastCell() throws Exception { Vec3 sw = officialWgs84Ecef(0.75, 0.75, 0.0); Vec3 se = officialWgs84Ecef(0.75, 1.0, 0.0); Vec3 nw = officialWgs84Ecef(1.0, 0.75, 0.0); Vec3 ne = officialWgs84Ecef(1.0, 1.0, 0.0); Vec3 expected = worldWindEcef(bilinearCentroid(sw, se, nw, ne)); boolean expectedReturn = true; Vec3 actual = new Vec3(); boolean actualReturn = this.terrain.surfacePoint(0.875, 0.875, actual); assertEquals("surfacePoint Northeast cell x", expected.x, actual.x, TOLERANCE); assertEquals("surfacePoint Northeast cell y", expected.y, actual.y, TOLERANCE); assertEquals("surfacePoint Northeast cell z", expected.z, actual.z, TOLERANCE); assertEquals("surfacePoint Northeast cell return", expectedReturn, actualReturn); }
@SuppressWarnings("ConstantConditions") @Test public void testSurfacePoint_SoutheastCell() throws Exception { Vec3 sw = officialWgs84Ecef(0.0, 0.75, 0.0); Vec3 se = officialWgs84Ecef(0.0, 1.0, 0.0); Vec3 nw = officialWgs84Ecef(0.25, 0.75, 0.0); Vec3 ne = officialWgs84Ecef(0.25, 1.0, 0.0); Vec3 expected = worldWindEcef(bilinearCentroid(sw, se, nw, ne)); boolean expectedReturn = true; Vec3 actual = new Vec3(); boolean actualReturn = this.terrain.surfacePoint(0.125, 0.875, actual); assertEquals("surfacePoint Southeast cell x", expected.x, actual.x, TOLERANCE); assertEquals("surfacePoint Southeast cell y", expected.y, actual.y, TOLERANCE); assertEquals("surfacePoint Southeast cell z", expected.z, actual.z, TOLERANCE); assertEquals("surfacePoint Southeast cell return", expectedReturn, actualReturn); }
@SuppressWarnings("ConstantConditions") @Test public void testSurfacePoint_SouthwestCell() throws Exception { Vec3 sw = officialWgs84Ecef(0.0, 0.0, 0.0); Vec3 se = officialWgs84Ecef(0.0, 0.25, 0.0); Vec3 nw = officialWgs84Ecef(0.25, 0.0, 0.0); Vec3 ne = officialWgs84Ecef(0.25, 0.25, 0.0); Vec3 expected = worldWindEcef(bilinearCentroid(sw, se, nw, ne)); boolean expectedReturn = true; Vec3 actual = new Vec3(); boolean actualReturn = this.terrain.surfacePoint(0.125, 0.125, actual); assertEquals("surfacePoint Southwest cell x", expected.x, actual.x, TOLERANCE); assertEquals("surfacePoint Southwest cell y", expected.y, actual.y, TOLERANCE); assertEquals("surfacePoint Southwest cell z", expected.z, actual.z, TOLERANCE); assertEquals("surfacePoint Southwest cell return", expectedReturn, actualReturn); }
@SuppressWarnings("ConstantConditions") @Test public void testSurfacePoint_NorthwestCell() throws Exception { Vec3 sw = officialWgs84Ecef(0.75, 0.0, 0.0); Vec3 se = officialWgs84Ecef(0.75, 0.25, 0.0); Vec3 nw = officialWgs84Ecef(1.0, 0.0, 0.0); Vec3 ne = officialWgs84Ecef(1.0, 0.25, 0.0); Vec3 expected = worldWindEcef(bilinearCentroid(sw, se, nw, ne)); boolean expectedReturn = true; Vec3 actual = new Vec3(); boolean actualReturn = this.terrain.surfacePoint(0.875, 0.125, actual); assertEquals("surfacePoint Northwest cell x", expected.x, actual.x, TOLERANCE); assertEquals("surfacePoint Northwest cell y", expected.y, actual.y, TOLERANCE); assertEquals("surfacePoint Northwest cell z", expected.z, actual.z, TOLERANCE); assertEquals("surfacePoint Northwest cell return", expectedReturn, actualReturn); }