Package com.sun.j3d.utils.picking

Examples of com.sun.j3d.utils.picking.PickCanvas.pickClosest()


    PickCanvas pickCanvas = new PickCanvas(canvas, scene.getBranchgroup());
      pickCanvas.setMode(PickTool.GEOMETRY_INTERSECT_INFO);
      pickCanvas.setTolerance(2.0f);
      pickCanvas.setShapeLocation(posX, posY);
      PickResult result = pickCanvas.pickClosest();

      if (result!=null) {
      Node node = result.getObject();
            Object o = node.getUserData();
            if (o instanceof ActiveNode) {
View Full Code Here


      pickCanvas.setMode(PickTool.GEOMETRY_INTERSECT_INFO);
      pickCanvas.setTolerance(Math.max(dx,dy));
      pickCanvas.setShapeLocation(posX, posY);

      // TODO : don't do pick closest, loop on all results
      PickResult result = pickCanvas.pickClosest();
      if (result!=null) {
      Node node = result.getObject();
            Object o = node.getUserData();
            if (o instanceof ActiveNode) {
              ((ActiveNode)o).highlight(true,result);
View Full Code Here

        _pickY=y;
        PickCanvas pickCanvas = new PickCanvas(_canvas, this._universe.getLocale());
        pickCanvas.setMode(PickTool.GEOMETRY_INTERSECT_INFO);
        pickCanvas.setTolerance(2.0f);
        pickCanvas.setShapeLocation(_pickX, _pickY);
        PickResult result = pickCanvas.pickClosest();
        if(result==null){
            select(add, new Node[0]);
        }
        else{
            select(add, result.getObject());
View Full Code Here

                }
                select(add, n);
            }
        }
        else{
            PickResult result = pickCanvas.pickClosest();
            if(result==null){
                select(add, new Node[0]);
            }
            else{
                select(add, result.getObject());
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.