/** * Gets the center of the box, computed as (min + max) / 2. * * @return a reference to the center of the box */ public Vector3D getCenter() { center.set(minimum); center.add(maximum); center.scale(1.0 / 2.0); return(center); }
public void recalcMinMax() { Vector3D halfExtents = extents.scaleNew(1.0 / 2.0); minimum.set(center); minimum.sub(halfExtents); maximum.set(minimum); maximum.add(extents); }