In my application I have a panel in which a user can pick a shape in a 3D environment.
Because of the problems I have mentioned before, I have to maintain a single Canvas3D
across the application, which seems to be fine, but now I find when I leave the 3D
panel and then go back to it and try to do the same picking things I get an illegal
state exception:
java.lang.IllegalStateException: Picking can only work if BranchGroup is alive
at javax.media.j3d.BranchGroup.pickAll(BranchGroup.java:123)
at com.sun.j3d.utils.picking.PickTool.pickGeomAllSorted(PickTool.java:698)
at com.sun.j3d.utils.picking.PickTool.pickAllSorted(PickTool.java:522)
When I finish with the 3D view I clear it thus:
public void roomClear()
{
Viewer[] ox = ourView.getViewers();
for( int p=0;p<ox.length;p++)
ox[p].getView().removeAllCanvas3Ds();
ourView.detach();
ourBG.detach();
}
When I go back to it I create all the views branchgroups and canvases again.
Can anyone tell me what I am doing wrong?
cheers,
-ben
==========================================================================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".