Package ca.nengo.ui.lib.world

Examples of ca.nengo.ui.lib.world.WorldObject.globalToLocal()


    // Now loop through the stack of nodes and transform the point
    // into the proper network's coordinate system
    Point2D newPosition = globalPosition;
    while (!objStack.empty()) {
      obj = objStack.pop();
      newPosition = obj.globalToLocal(newPosition);
      if (obj instanceof NodeViewer)
        newPosition = ((NodeViewer)obj).localToView(newPosition);
      else
        newPosition = ((NodeContainer)obj).localToView(newPosition);
    }
View Full Code Here


    // Loop through selected objects, compensate for camera panning
    // so that objects will remain stationary relative to cursor
    Iterator<WorldObject> selectionEn = selectionHandler.getSelection().iterator();
    while (selectionEn.hasNext()) {
      WorldObject node = selectionEn.next();
      node.localToParent(node.globalToLocal(delta));
      node.dragOffset(delta.getWidth(), delta.getHeight());
    }
  }

  public void setInverted(boolean isInverted) {
View Full Code Here

          if (droppable.acceptTarget(worldLayer)) {
            target = worldLayer;
          }
        }
        if (target != null) {
          Point2D position = target.globalToLocal(node.localToGlobal(new Point2D.Double(
              0, 0)));

          node.setOffset(position);
          target.addChild(node);
          droppable.justDropped();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.