@Override public double len0() { return getMax0() - getMin0(); }
@Override public double len0() { return getMax0() - getMin0(); }
public double avg0() { return 0.5 * (getMax0() + getMin0()); }
public double avg0() { return 0.5 * (getMax0() + getMin0()); }
/** * * @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; }
if (bounds[i] == null) bounds[i] = new DAABB(); bounds[i].setMin0( dRandReal()*2-1 ); bounds[i].setMax0( bounds[i].getMin0() + dRandReal()*scale ); bounds[i].setMin1( dRandReal()*2-1 ); bounds[i].setMax1( bounds[i].getMin1() + dRandReal()*scale );
test_aabb.minX = (float) o1._aabb.getMin0(); test_aabb.maxX = (float) o1._aabb.getMax0(); test_aabb.minY = (float) o1._aabb.getMin1();
test_aabb.minX = (float) o1._aabb.getMin0(); test_aabb.maxX = (float) o1._aabb.getMax0(); test_aabb.minY = (float) o1._aabb.getMin1();
if ( o2._aabb.getMin0() > terrain.m_p_data.m_fWidth //MinX int nMinX = (int)dFloor(Common.dNextAfter(o2._aabb.getMin0() * fInvSampleWidth, -dInfinity)); int nMaxX = (int)dCeil(Common.dNextAfter(o2._aabb.getMax0() * fInvSampleWidth, dInfinity)); final double fInvSampleDepth = terrain.m_p_data.m_fInvSampleDepth;
if ( o2._aabb.getMin0() > terrain.m_p_data.m_fWidth //MinX int nMinX = (int)dFloor(Common.dNextAfter(o2._aabb.getMin0() * fInvSampleWidth, -dInfinity)); int nMaxX = (int)dCeil(Common.dNextAfter(o2._aabb.getMax0() * fInvSampleWidth, dInfinity)); final double fInvSampleDepth = terrain.m_p_data.m_fInvSampleDepth;
if ( o2._aabb.getMin0() > terrain.m_p_data.m_fWidth //MinX int nMinX = (int)dFloor(Common.dNextAfter(o2._aabb.getMin0() * fInvSampleWidth, -dInfinity)); int nMaxX = (int)dCeil(Common.dNextAfter(o2._aabb.getMax0() * fInvSampleWidth, dInfinity)); final double fInvSampleDepth = terrain.m_p_data.m_fInvSampleDepth;
if ( o2._aabb.getMin0() > terrain.m_p_data.m_fWidth //MinX int nMinX = (int)dFloor(Common.dNextAfter(o2._aabb.getMin0() * fInvSampleWidth, -dInfinity)); int nMaxX = (int)dCeil(Common.dNextAfter(o2._aabb.getMax0() * fInvSampleWidth, dInfinity)); final double fInvSampleDepth = terrain.m_p_data.m_fInvSampleDepth;
final double xratio = (o2._aabb.getMax0() - o2._aabb.getMin0()) * m_p_data.m_fInvSampleWidth; if (xratio > (1.5)) needFurtherPasses = true;
final double xratio = (o2._aabb.getMax0() - o2._aabb.getMin0()) * m_p_data.m_fInvSampleWidth; if (xratio > (1.5)) needFurtherPasses = true;