Package com.mystictri.neotexture.TextureGraph

Examples of com.mystictri.neotexture.TextureGraph.TextureNodeConnection


      TextureGraphNode node = graph.selectedNodes.get(0);
      if (node != null) {
        if (node.getChannel().getNumInputChannels() < 2) return;
        ConnectionPoint p0 = node.getInputConnectionPointByChannelIndex(0);
        ConnectionPoint p1 = node.getInputConnectionPointByChannelIndex(1);
        TextureNodeConnection c0 = graph.getConnectionAtInputPoint(p0);
        TextureNodeConnection c1 = graph.getConnectionAtInputPoint(p1);
        graph.removeConnection(c0);
        graph.removeConnection(c1);
        if (c0 != null && c1 != null) {
          ConnectionPoint temp = c0.target;
          c0.target = c1.target;
View Full Code Here


            connectionTarget = e.getPoint();
          }
          else if (actionType < 0) { // dragging an existing connection of an input away
            int index = -actionType - 1;
            TextureGraphNode.ConnectionPoint inputPoint = node.getInputConnectionPointByChannelIndex(index);
            TextureNodeConnection connection = graph.getConnectionAtInputPoint(inputPoint);
            if (connection != null) {
              graph.removeConnection(connection);
              connectionDragging = true;
              connectionSource = connection.source;
              connectionOrigin = new Point(connectionSource.getWorldSpaceX(), connectionSource.getWorldSpaceY());
View Full Code Here

         
         
          if (e.isControlDown()) { // connect all inputs
            for (int i = 0; i < targetPat.getChannel().getNumInputChannels(); i++) {
              TextureGraphNode.ConnectionPoint ip = targetPat.getInputConnectionPointByChannelIndex(i);
              graph.addConnection(new TextureNodeConnection(connectionSource, ip));
            }
          } else { // normal single connection
            TextureGraphNode.ConnectionPoint inputPoint = targetPat.getInputConnectionPointByChannelIndex(index);
            graph.addConnection(new TextureNodeConnection(connectionSource, inputPoint));
          }
        }
      }     
    }
View Full Code Here

TOP

Related Classes of com.mystictri.neotexture.TextureGraph.TextureNodeConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.