@Override public double len2() { return getMax2() - getMin2(); }
@Override public double len2() { return getMax2() - getMin2(); }
public double avg2() { return 0.5 * (getMax2() + getMin2()); }
public double avg2() { return 0.5 * (getMax2() + getMin2()); }
/** * * @return <tt>false</tt> is any of the values is NaN. */ @Override public boolean isValid() { if (Double.isNaN(getMin0()) || Double.isNaN(getMax0()) || Double.isNaN(getMin1()) || Double.isNaN(getMax1()) || Double.isNaN(getMin2()) || Double.isNaN(getMax2()) ) { return false; } return true; }
/** * * @return <tt>false</tt> is any of the values is NaN. */ @Override public boolean isValid() { if (Double.isNaN(getMin0()) || Double.isNaN(getMax0()) || Double.isNaN(getMin1()) || Double.isNaN(getMax1()) || Double.isNaN(getMin2()) || Double.isNaN(getMax2()) ) { return false; } return true; }
/** * Checks whether the to AABBs are disjoint. * @param aabb2 aabb2 * @return <tt>false</tt> if the two AABBs overlap. */ @Override public boolean isDisjoint(DAABBC aabb2) { if (getMin0() > aabb2.getMax0() || getMax0() < aabb2.getMin0() || getMin1() > aabb2.getMax1() || getMax1() < aabb2.getMin1() || getMin2() > aabb2.getMax2() || getMax2() < aabb2.getMin2()) { return true; } return false; }
/** * Checks whether the to AABBs are disjoint. * @param aabb2 aabb2 * @return <tt>false</tt> if the two AABBs overlap. */ @Override public boolean isDisjoint(DAABBC aabb2) { if (getMin0() > aabb2.getMax0() || getMax0() < aabb2.getMin0() || getMin1() > aabb2.getMax1() || getMax1() < aabb2.getMin1() || getMin2() > aabb2.getMax2() || getMax2() < aabb2.getMin2()) { return true; } return false; }
bounds[i].setMax1( bounds[i].getMin1() + dRandReal()*scale ); bounds[i].setMin2( dRandReal()*2 ); bounds[i].setMax2( bounds[i].getMin2() + dRandReal()*scale );
test_aabb.minY = (float) o1._aabb.getMin1(); test_aabb.maxY = (float) o1._aabb.getMax1(); test_aabb.minZ = (float) o1._aabb.getMin2(); test_aabb.maxZ = (float) o1._aabb.getMax2();
test_aabb.minY = (float) o1._aabb.getMin1(); test_aabb.maxY = (float) o1._aabb.getMax1(); test_aabb.minZ = (float) o1._aabb.getMin2(); test_aabb.maxZ = (float) o1._aabb.getMax2();
|| o2._aabb.getMin2() > terrain.m_p_data.m_fDepth) { //MinZ int nMaxX = (int)dCeil(Common.dNextAfter(o2._aabb.getMax0() * fInvSampleWidth, dInfinity)); final double fInvSampleDepth = terrain.m_p_data.m_fInvSampleDepth; int nMinZ = (int)dFloor(Common.dNextAfter(o2._aabb.getMin2() * fInvSampleDepth, -dInfinity)); int nMaxZ = (int)dCeil(Common.dNextAfter(o2._aabb.getMax2() * fInvSampleDepth, dInfinity));
|| o2._aabb.getMin2() > terrain.m_p_data.m_fDepth) { //MinZ int nMaxX = (int)dCeil(Common.dNextAfter(o2._aabb.getMax0() * fInvSampleWidth, dInfinity)); final double fInvSampleDepth = terrain.m_p_data.m_fInvSampleDepth; int nMinZ = (int)dFloor(Common.dNextAfter(o2._aabb.getMin2() * fInvSampleDepth, -dInfinity)); int nMaxZ = (int)dCeil(Common.dNextAfter(o2._aabb.getMax2() * fInvSampleDepth, dInfinity));
|| o2._aabb.getMin2() > terrain.m_p_data.m_fDepth) { //MinZ int nMaxX = (int)dCeil(Common.dNextAfter(o2._aabb.getMax0() * fInvSampleWidth, dInfinity)); final double fInvSampleDepth = terrain.m_p_data.m_fInvSampleDepth; int nMinZ = (int)dFloor(Common.dNextAfter(o2._aabb.getMin2() * fInvSampleDepth, -dInfinity)); int nMaxZ = (int)dCeil(Common.dNextAfter(o2._aabb.getMax2() * fInvSampleDepth, dInfinity));
|| o2._aabb.getMin2() > terrain.m_p_data.m_fDepth) { //MinZ int nMaxX = (int)dCeil(Common.dNextAfter(o2._aabb.getMax0() * fInvSampleWidth, dInfinity)); final double fInvSampleDepth = terrain.m_p_data.m_fInvSampleDepth; int nMinZ = (int)dFloor(Common.dNextAfter(o2._aabb.getMin2() * fInvSampleDepth, -dInfinity)); int nMaxZ = (int)dCeil(Common.dNextAfter(o2._aabb.getMax2() * fInvSampleDepth, dInfinity));
else final double zratio = (o2._aabb.getMax2() - o2._aabb.getMin2()) * m_p_data.m_fInvSampleDepth; if (zratio > (1.5)) needFurtherPasses = true;
else final double zratio = (o2._aabb.getMax2() - o2._aabb.getMin2()) * m_p_data.m_fInvSampleDepth; if (zratio > (1.5)) needFurtherPasses = true;