@Override public DVector3 getLengths() { return new DVector3(len0(), len1(), len2()); }
@Override public DVector3 getLengths() { return new DVector3(len0(), len1(), len2()); }
private static int findLevel (DAABB boundsV) //[6]) { //double[] bounds = boundsV.v; // if (bounds[0] <= -dInfinity || bounds[1] >= dInfinity || // bounds[2] <= -dInfinity || bounds[3] >= dInfinity || // bounds[4] <= -dInfinity || bounds[5] >= dInfinity) { // return MAXINT; // } if (!boundsV.isValid()) { return MAXINT; } // compute q double q,q2; q = boundsV.len0();//bounds[1] - bounds[0]; // x bounds q2 = boundsV.len1();//bounds[3] - bounds[2]; // y bounds if (q2 > q) q = q2; q2 = boundsV.len2();//bounds[5] - bounds[4]; // z bounds if (q2 > q) q = q2; // find level such that 0.5 * 2^level < q <= 2^level RefInt level = new RefInt(); frexp (q,level); // q = (0.5 .. 1.0) * 2^level (definition of frexp) return level.i; } // find a virtual memory address for a cell at the given level and x,y,z
private static int findLevel (DAABB boundsV) //[6]) { //double[] bounds = boundsV.v; // if (bounds[0] <= -dInfinity || bounds[1] >= dInfinity || // bounds[2] <= -dInfinity || bounds[3] >= dInfinity || // bounds[4] <= -dInfinity || bounds[5] >= dInfinity) { // return MAXINT; // } if (!boundsV.isValid()) { return MAXINT; } // compute q double q,q2; q = boundsV.len0();//bounds[1] - bounds[0]; // x bounds q2 = boundsV.len1();//bounds[3] - bounds[2]; // y bounds if (q2 > q) q = q2; q2 = boundsV.len2();//bounds[5] - bounds[4]; // z bounds if (q2 > q) q = q2; // find level such that 0.5 * 2^level < q <= 2^level RefInt level = new RefInt(); frexp (q,level); // q = (0.5 .. 1.0) * 2^level (definition of frexp) return level.i; } // find a virtual memory address for a cell at the given level and x,y,z
bounds[i].len0(), bounds[i].len1(), bounds[i].len2());