public void zoomAll() { bounds = new BoundingSphere(); boolean first = true; for (VisualShape v : drawModel.getPicture()) { Bounds b = getBounds(v); if (first) bounds.set(b); else bounds.combine(getBounds(v)); first = false; } bounds.getCenter(center); scale = 1.0f / 1.3f / (float) bounds.getRadius(); updateView(); }
public Point3d getObjCenter() { Point3d objCenter = new Point3d(); bs.getCenter(objCenter); return objCenter; }