/** * Subdivides this Linear segment into two segments at t = 0.5. * can be done with getSegment but this is more efficent. * @param s0 if non-null contains portion of curve from 0->.5 * @param s1 if non-null contains portion of curve from .5->1 */ public void subdivide(Segment s0, Segment s1) { Linear l0=null, l1=null; if (s0 instanceof Linear) l0 = (Linear)s0; if (s1 instanceof Linear) l1 = (Linear)s1; subdivide(l0, l1); }
/** * Subdivides this Linear segment into two segments at given t. * @param s0 if non-null contains portion of curve from 0->t. * @param s1 if non-null contains portion of curve from t->1. */ public void subdivide(double t, Segment s0, Segment s1) { Linear l0=null, l1=null; if (s0 instanceof Linear) l0 = (Linear)s0; if (s1 instanceof Linear) l1 = (Linear)s1; subdivide(t, l0, l1); }
/** * Subdivides this Linear segment into two segments at t = 0.5. * can be done with getSegment but this is more efficent. * @param s0 if non-null contains portion of curve from 0->.5 * @param s1 if non-null contains portion of curve from .5->1 */ public void subdivide(Segment s0, Segment s1) { Linear l0=null, l1=null; if (s0 instanceof Linear) l0 = (Linear)s0; if (s1 instanceof Linear) l1 = (Linear)s1; subdivide(l0, l1); }
/** * Subdivides this Linear segment into two segments at given t. * @param s0 if non-null contains portion of curve from 0->t. * @param s1 if non-null contains portion of curve from t->1. */ public void subdivide(double t, Segment s0, Segment s1) { Linear l0=null, l1=null; if (s0 instanceof Linear) l0 = (Linear)s0; if (s1 instanceof Linear) l1 = (Linear)s1; subdivide(t, l0, l1); }
/** * Subdivides this Linear segment into two segments at t = 0.5. * can be done with getSegment but this is more efficent. * @param s0 if non-null contains portion of curve from 0->.5 * @param s1 if non-null contains portion of curve from .5->1 */ public void subdivide(Segment s0, Segment s1) { Linear l0=null, l1=null; if (s0 instanceof Linear) l0 = (Linear)s0; if (s1 instanceof Linear) l1 = (Linear)s1; subdivide(l0, l1); }
/** * Subdivides this Linear segment into two segments at given t. * @param s0 if non-null contains portion of curve from 0->t. * @param s1 if non-null contains portion of curve from t->1. */ public void subdivide(double t, Segment s0, Segment s1) { Linear l0=null, l1=null; if (s0 instanceof Linear) l0 = (Linear)s0; if (s1 instanceof Linear) l1 = (Linear)s1; subdivide(t, l0, l1); }