protected void activateNextPrev(PipeControlPoint start) throws Exception{
if (!reversed && start.isDualInline())
- start = start.getSubPoint().get(0);
+ start = start.getDualSub();
else if (reversed && start.isDualSub())
start = start.parent;
private PipeControlPoint endingToComponent(INode componentNode, Vector3d o, Vector3d d) {
PipelineComponent component = (PipelineComponent)componentNode;
PipeControlPoint pcp = component.getControlPoint();
+ PipeControlPoint connect = null;
if (component instanceof EndComponent) {
if (pcp.getNext() != null || pcp.getPrevious() != null)
return null;
- return pcp;
+ connect = pcp;
} else if (component instanceof TurnComponent) {
if (pcp.getNext() == null || pcp.getPrevious() == null)
- return pcp;
- return null;
+ connect = pcp;
+ else
+ return null;
} else if (component instanceof InlineComponent) {
// TODO : scan all empty pcps of the component and select closest one.
if (pcp.getNext() == null || pcp.getPrevious() == null)
- return pcp;
- return null;
+ connect = pcp;
+ else
+ return null;
+ }
+ if (connect != null) {
+ currentPosition.set(connect.getWorldPosition());
+ updateCurrentPoint();
+ setInfoText("Connect to " + component.getName());
+ return connect;
}
-
return null;
}