/** * if the passed the "region" is same type as this object * then do a copy, otherwise clone the Bounds and * return */ @Override Bounds copy(Bounds r) { if (r != null && this.boundId == r.boundId) { BoundingSphere region = (BoundingSphere)r; region.radius = radius; region.center.x = center.x; region.center.y = center.y; region.center.z = center.z; region.boundsIsEmpty = boundsIsEmpty; region.boundsIsInfinite = boundsIsInfinite; return region; } else { return (Bounds) this.clone(); } }
ViewPlatformRetained() { this.nodeType = NodeRetained.VIEWPLATFORM; localBounds = new BoundingBox((Bounds)null); IndexedUnorderSet.init(this, TOTAL_INDEXED_UNORDER_SET_TYPES); schedSphere = (BoundingSphere) sphere.clone(); }