Isaac,
Set your capabilities on your group BEFORE you call this (and take the
capability setting out of this routine).
- John Wright
Starfire Research
"Brobbey,Isaac (neuron)" wrote:
>
> i am getting an error when i try to make two or more displays by
> repeatedly calling this method below:
>
> void enumKids(Group tg)
> {
>
> java.util.Enumeration enumKids = tg.getAllChildren();
> while (enumKids.hasMoreElements())
> {
> System.out.println("More elements to check");
> SceneGraphObject sg = (SceneGraphObject)
> enumKids.nextElement();
> if (sg instanceof Shape3D || sg instanceof Morph)
> {
> PickTool.setCapabilities((Node) sg, PickTool.INTERSECT_FULL);
> sg.setCapability(PickTool.INTERSECT_FULL);
> System.out.println("Capability = " +
> sg.getCapability(PickTool.INTERSECT_FULL));
> }
> }
> }
>
> i am getting the following error
>
> Size of vector is 312
> Exception in thread "main" javax.media.j3d.RestrictedAccessException:
> Cannot modify capability bits on a live or compiled object
> at javax.media.j3d.SceneGraphObject.setCapability(SceneGraphObject.java:
> 101)
> at
> com.sun.j3d.utils.picking.PickTool.setCapabilities(PickTool.java:283)
>
> at
> com.sun.j3d.utils.picking.PickTool.setCapabilities(PickTool.java:270)
>
> at Graphic.enumKids(Graphic.java:301)
> at Graphic.createConeTransformGroup(Graphic.java:277)
> at Graphic.createSceneGraph(Graphic.java:532)
> at Graphic.<init>(Graphic.java:684)
> at Tabed.<init>(Graphic.java:1393)
> at Graphic.main(Graphic.java:85)
>
> Is there any work around on the PickTool ? how can I modify the PickTool
> to make it work for two or more displays ? i am running out of Ideas , i
> will appreciate any help.
>
> thanks,
>
> isaac
>
> ===========================================================================
> 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".
===========================================================================
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".