You might have already tried this but I seem to recall that you must set
each capability one at a time. You cannot set multiple capabilities in one
statement by or'ing them. i.e.

trans_group.setCapability(ALLOW_CHILDREN_READ || ALLOW_CHILDREN_EXTEND);

will not work, you have to set them separately:

trans_group.setCapability(ALLOW_CHILDREN_READ);
trans_group.setCapability(ALLOW_CHILDREN_EXTEND);

Also, if you have not explicitly included the constants you will need to
write:

trans_group.setCapability(TransformGroup.ALLOW_CHILDREN_READ);

and so on.

HTH
Tim.

On Fri, 14 May 1999, Carsten Reckord wrote:

> Hi,
> 
> I encountered some serious problems with groupnodes (both Branch- and
> Transformgroups), because setting flags like
> ALLOW_CHILDREN_READ/WRITE/EXTEND, ENABLE_PICK_REPORTING, ALLOW_DETACH
> (for BranchGroup) do not seem to work.
> 
> For example: I tried to add a BranchGroup to another BranchGroup on a
> live Graph. Both had all the above ALLOW_... flags set (all Childnodes
> too), and ... I got a CapabilityNotSetException.
> So I tried to set the flags earlier and later in the code, set other
> flags too (I ended up in setting all known flags on all nodes), but
> nothing worked. The same for detaching a BranchGroup, and removing a
> child.
> 
> Another problem was mousepicking. I tried to pick by TransformGroup.
> Though I set ENABLE_PICK_REPORTING for the TransformGroup, used
> setPickable and set any picking-related flags for the Group itself and
> all its children , I did not get any TransformGroups in my
> SceneGraphPath (neither using bounds nor geometry).
> Picking by e.g. Primitives works fine, but that does not help me much.
> 
> I hope anybody out there can explain these strange effects.
> 
> Thanks in advance,
>     Carsten
> =====================================================================
> To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> Java 3D Home Page: http://java.sun.com/products/java-media/3D/
> 

Tim.

,----------------------------------------------------------------------.
| Tim Needham.                                                         |
| OU Computer Society Ex-President.          |\    ___,,--,_        __ |
| [EMAIL PROTECTED]                     /,`--''        \`,,__,',-'| 
| http://ox.compsoc.net/~timothy            |,4   ) )_    ) /~-----'   |
`------------------------------------------'---^~(_/-_)--(_/_)---------'
          Q: What do you get if you cross a horse with a zebra? 
                     A: |Horse| |zebra| sin theta. 

=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to