public double getScaleToUnityBox ( ) { double largestEdge = 0 ; largestEdge = Math . max ( largestEdge , maxX - minX ) ; largestEdge = Math . max ( largestEdge , maxY - minY ) ; largestEdge = Math . max ( largestEdge , maxZ - minZ ) ; return 1.0 / largestEdge ; }
Gets the scale factor by which the box needs to be multiplied that it fits into a cube with edge length 1 .