private void drawBoundingVolumes(DrawContext dc, ArrayList<MercatorTextureTile> tiles) { float[] previousColor = new float[4]; dc.getGL().glGetFloatv(GL.GL_CURRENT_COLOR, previousColor, 0); dc.getGL().glColor3d(0, 1, 0); for (MercatorTextureTile tile : tiles) { ((Cylinder) tile.getExtent(dc)).render(dc); } Cylinder c = dc.getGlobe() .computeBoundingCylinder(dc.getVerticalExaggeration(), this.levels.getSector()); dc.getGL().glColor3d(1, 1, 0); c.render(dc); dc.getGL().glColor4fv(previousColor, 0); }
private boolean isTileVisible(DrawContext dc, MercatorTextureTile tile) { // if (!(tile.getExtent(dc).intersects(dc.getView().getFrustumInModelCoordinates()) // && (dc.getVisibleSector() == null || // dc.getVisibleSector().intersects(tile.getSector())))) // return false; // // Position eyePos = dc.getView().getEyePosition(); // LatLon centroid = tile.getSector().getCentroid(); // Angle d = LatLon.greatCircleDistance(eyePos.getLatLon(), centroid); // if ((!tile.getLevelName().equals("0")) && // d.compareTo(tile.getSector().getDeltaLat().multiply(2.5)) == 1) // return false; // // return true; // return tile.getExtent(dc).intersects(dc.getView().getFrustumInModelCoordinates()) && (dc.getVisibleSector() == null || dc.getVisibleSector().intersects(tile.getSector())); }