/** * Return the depth of a point in a box. * * @param box the box to query * @param x the X coordinate of the point to test. * @param y the Y coordinate of the point to test. * @param z the Z coordinate of the point to test. * * @return The depth of the point. Points inside the box will have a * positive depth, points outside it will have a negative depth, and points * on the surface will have a depth of zero. */ //ODE_API public static double dGeomBoxPointDepth (DBox box, double x, double y, double z) { return box.getPointDepth(new DVector3(x, y, z)); }
/** * Return the depth of a point in a box. * * @param box the box to query * @param x the X coordinate of the point to test. * @param y the Y coordinate of the point to test. * @param z the Z coordinate of the point to test. * * @return The depth of the point. Points inside the box will have a * positive depth, points outside it will have a negative depth, and points * on the surface will have a depth of zero. */ //ODE_API public static double dGeomBoxPointDepth (DBox box, double x, double y, double z) { return box.getPointDepth(new DVector3(x, y, z)); }
if (dFabs(box.getPointDepth (p) - 0.5*ss) > tol) if (testFAILED()) return false; if (dFabs(box.getPointDepth (q2)) > tol) if (testFAILED()) return false; if (box.getPointDepth (q2) >= 0) if (testFAILED()) return false; dMultiply0 (q2,box.getRotation(),q); q2.add(p); if (box.getPointDepth (q2) <= 0) if (testFAILED()) return false; dMultiply0 (q2,box.getRotation(),q); q2.add(p); if (dFabs(box.getPointDepth (q2) - d) >= tol) if (testFAILED()) return false;
DContactGeom contact = contacts.get(0); if (dFabs (box.getPointDepth (contact.pos)) > tol) if (testFAILED()) return false;