+ private static Vector3d pathLegDirection(PipeControlPoint start) {
+ ArrayList<PipeControlPoint> list = new ArrayList<PipeControlPoint>();
+ PipeControlPoint end = start.findNextEnd(list);
+ if (start == end) {
+ return start.getDirection(Direction.NEXT);
+ }
+
+ Vector3d offset = new Vector3d();
+ Vector3d startPoint = start.getWorldPosition();
+ Vector3d endPoint = end.getWorldPosition();
+ Vector3d dir = new Vector3d();
+ calculateOffset(startPoint, endPoint, start, list, end, dir, offset);
+ return dir;
+ }
+