/** * Gets the constrained point in local coordinates for the specified event. * The constrained point lies in the constraint plane that contains the * origin point. * @param event the mouse event. * @return the constrained point, in local coordinates. */ public Point3 getPoint(MouseEvent event) { return getPointOnPlane(event).plusEquals(_delta); }
/** * Gets the point in local coordinates for the specified event. * @param event the mouse event. * @return the point, in local coordinates. */ public Point3 getPoint(MouseEvent event) { return getPointOnLine(event).plusEquals(_delta); }
public void testPoint() { int ntrial = 10; for (int itrial=0; itrial<ntrial; ++itrial) { Point3 p = randomPoint3(); Point3 pc = new Point3(p); Vector3 v = randomVector3(); assertEquals(p,p.plus(v).minus(v)); assertEquals(p,pc.plusEquals(v).minusEquals(v)); Point3 q = p.minus(v); assertEquals(q.distanceTo(p),v.length()); } }