/** * A handy method that will attach all bounding boxes of this terrain * to the node you supply. * Useful to visualize the bounding boxes when debugging. * * @param parent that will get the bounding box shapes of the terrain attached to */ public void attachBoundChildren(Node parent) { for (int i = 0; i < this.getQuantity(); i++) { if (this.getChild(i) instanceof TerrainQuad) { ((TerrainQuad) getChild(i)).attachBoundChildren(parent); } else if (this.getChild(i) instanceof TerrainPatch) { BoundingVolume bv = getChild(i).getWorldBound(); if (bv instanceof BoundingBox) { attachBoundingBox((BoundingBox)bv, parent); } } } BoundingVolume bv = getWorldBound(); if (bv instanceof BoundingBox) { attachBoundingBox((BoundingBox)bv, parent); } }
/** * A handy method that will attach all bounding boxes of this terrain * to the node you supply. * Useful to visualize the bounding boxes when debugging. * * @param parent that will get the bounding box shapes of the terrain attached to */ public void attachBoundChildren(Node parent) { for (int i = 0; i < this.getQuantity(); i++) { if (this.getChild(i) instanceof TerrainQuad) { ((TerrainQuad) getChild(i)).attachBoundChildren(parent); } else if (this.getChild(i) instanceof TerrainPatch) { BoundingVolume bv = getChild(i).getWorldBound(); if (bv instanceof BoundingBox) { attachBoundingBox((BoundingBox)bv, parent); } } } BoundingVolume bv = getWorldBound(); if (bv instanceof BoundingBox) { attachBoundingBox((BoundingBox)bv, parent); } }