Exemplo n.º 1
0
        /**
         * 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);
        }
Exemplo n.º 2
0
        public void recalcMinMax()
        {
            Vector3D halfExtents = extents.scaleNew(1.0 / 2.0);

            minimum.set(center);
            minimum.sub(halfExtents);

            maximum.set(minimum);
            maximum.add(extents);
        }