use of com.sun.j3d.utils.picking.PickResult in project ffx by mjschnie.
the class PickTranslateBehavior method updateScene.
/*
* Update the scene to manipulate any nodes. This is not meant to be called
* by users. Behavior automatically calls this. You can call this only if
* you know what you are doing.
* @param xpos Current mouse X pos. @param ypos Current mouse Y pos.
*/
/**
* {@inheritDoc}
*/
public void updateScene(int xpos, int ypos) {
if ((mevent.getModifiersEx() & MouseEvent.BUTTON3_DOWN_MASK) == MouseEvent.BUTTON3_DOWN_MASK) {
pickCanvas.setShapeLocation(xpos, ypos);
PickResult r = pickCanvas.pickClosest();
if (r != null) {
if (callback != null) {
callback.transformChanged(PickingCallback.NO_PICK, null);
}
}
}
}
Aggregations