Exemplo n.º 1
0
        /**
         * Gets the extents vector for the box. This vector is computed as (max - min). Its coordinates are always positive
         * and represent the dimensions of the box along the three axes.
         *
         * @return a refreence to the extent vector
         * @see org.sunflow.math.Vector3#length()
         */
        public Vector3D getExtents()
        {
            extents.set(maximum);
            extents.sub(minimum);

            return(extents);
        }
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);
        }