// We may have offsets in the path leg, hence we have to project the coordinates.
Vector3d wp = node.getWorldPosition();
if (prev.getControlPoint().isVariableLength())
- s = MathTools.closestPointOnStraight(ps, wp, dir);
+ s = MathTools.closestPointOnStraight(ps, wp, dir);
else
- s = MathTools.closestPointOnStraight(pe, wp, dir);
+ s = MathTools.closestPointOnStraight(pe, wp, dir);
if (next.getControlPoint().isVariableLength())
- e = MathTools.closestPointOnStraight(ne, wp, dir);
+ e = MathTools.closestPointOnStraight(ne, wp, dir);
else
- e = MathTools.closestPointOnStraight(ns, wp, dir);
+ e = MathTools.closestPointOnStraight(ns, wp, dir);
// Remove component's own space from end points to get actual movement range
double l = comp.getControlPoint().getInlineLength();
Vector3d ld = new Vector3d(dir);
Vector3d p = node.getWorldPosition();
Vector3d i1 = new Vector3d();
- Vector3d i2 = new Vector3d();
-
- double mu[] = new double[2];
- MathTools.intersectStraightStraight( p, dir,ray.pos, ray.dir, i2, i1,mu);
-
- Vector3d t = MathTools.closestPointOnEdge(i1, s, e);
- return t;
+ Vector3d i2 = new Vector3d();
+
+ double mu[] = new double[2];
+ MathTools.intersectStraightStraight( p, dir,ray.pos, ray.dir, i2, i1,mu);
+
+ Vector3d t = MathTools.closestPointOnEdge(i1, s, e);
+ return t;
}