Package syn3d.nodes

Examples of syn3d.nodes.SceneNode


  }
 
  public void mouseDragged(MouseEvent e) {
    if (!handleMouseDragged) return;
   
    SceneNode scene = (SceneNode)e.getSource();
   
      if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) == MouseEvent.BUTTON1_DOWN_MASK) {
        scene.rotate2D(e.getX(), e.getY());
    }

    if ((e.getModifiersEx() & MouseEvent.BUTTON2_DOWN_MASK) == MouseEvent.BUTTON2_DOWN_MASK) {
      scene.translate2D(e.getX(), e.getY());
    }
   
    if ((e.getModifiersEx() & MouseEvent.BUTTON3_DOWN_MASK) == MouseEvent.BUTTON3_DOWN_MASK) {
      scene.zoom2D(e.getX(), e.getY());
    }
  }
View Full Code Here


    }
   
  public void keyTyped(KeyEvent e) {
    if (!handleKeyTyped) return;

    SceneNode scene = (SceneNode)e.getSource();
   
    if ((e.getKeyChar() == 'p') || (e.getKeyChar() == 'P')) {
      // Change the projection policy
      scene.changeProjection();
    } else if (( e.getKeyChar() == 'r') || (e.getKeyChar() == 'R')){
      scene.reset();
    } else if ( e.getKeyChar() == '\n') {
      // enter for auto-zoom
      scene.autoZoom();
    }
  }
View Full Code Here

  }
 
    public void mouseClicked(MouseEvent e) {
    if (!handleMouseClicked) return;
     
    SceneNode scene = (SceneNode)e.getSource();

      // Control adds the new selection to the old
        // If not selected, then erase old selection
    if ((e.getModifiersEx() & MouseEvent.CTRL_DOWN_MASK) == MouseEvent.CTRL_DOWN_MASK) {
      scene.toggleSinglePick(e.getX(), e.getY());
    }
   
        // Shift selects everything in the rectangle region defined by the last click
    // position and this position
    else if (((e.getModifiersEx() & MouseEvent.SHIFT_DOWN_MASK) == MouseEvent.SHIFT_DOWN_MASK)) {
      scene.toggleAllPicks(e.getX(), e.getY());
    }
   
    else scene.pick(e.getX(), e.getY());
   
    }
View Full Code Here

    // This is a naive implementation, changing all nodes at the same time.
    // A more elaborate version could change only the "active" node, for example
    // the one selected in the JTree (if the JTree of ActiveNode is used).  
    int num = e.getKeyChar() - '0';
    if ((num>=0) && (num<=9)) {
      SceneNode scene = (SceneNode)e.getSource();
      ArrayList a = scene.findDescendantOfType(XYZResultNode.class);
      for (int i=0; i<a.size(); ++i) ((XYZResultNode)a.get(i)).showResult(num);
    }
  }
View Full Code Here

TOP

Related Classes of syn3d.nodes.SceneNode

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.