I have the 3 mouse behavior nodes (zoom, translate, and rotate) under a
branch group called mouseBehaviorBranch. Then mouseBehaviorBranch is
under a Switch node, called mouseBehaviorSwitch. We wanted to be able
to turn on and off the mouse behavior - we have basically a "picking"
mode, where users select geometry with the mouse, and a "viewing" mode,
where they can zoom, translate, and rotate.
The trouble is, after switching from picking to viewing, which involves
a call to setWhichChild, the switch is made but does not seem to
immediately take effect. You click once to drag the model and nothing
happens, and you try a second time and it works.
After a call to setWhichChild, is there a way to "force" an update of
the scene graph, or something along those lines?
Sample code:
public void setMouseMode(MouseModeType mouseMode)
{
this.mouseMode = mouseMode;
if (mouseMode == MouseModeType.VIEWING)
{
mouseBehaviorSwitch.setWhichChild(0);
}
else
{
mouseBehaviorSwitch.setWhichChild(Switch.CHILD_NONE);
}
}
Thanks,
--
Steve Bement
www.vykor.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".