vp.setViewPlatformBehavior(orbit);
}
public void mouseClicked(MouseEvent e) {
pickCanvas.setShapeLocation(e);
PickResult result = pickCanvas.pickClosest();
if (result == null) {
System.out.println("Nothing picked");
} else {
Primitive p = (Primitive)result.getNode(PickResult.PRIMITIVE);
Shape3D s = (Shape3D)result.getNode(PickResult.SHAPE3D);
//*******************************************************************************
// This code will get you a reference to the sphere clicked on
// notice that it now prints out which sphere you clicked on
SceneGraphPath myPath = result.getSceneGraphPath();
//System.out.println( myPath.nodeCount() );
//System.out.println(myPath.getObject().getClass());
if(myPath.getObject() instanceof Shape3D)