Skip to main content

Adding shape3D objects to branchgroup (live)

3 replies [Last post]
jorg01
Offline
Joined: 2008-03-21
Points: 0

Hi,

I need to be able to add shapes in real-time so what I try to do is detach the branchgroup, then add shape and finally re-add the group into the scene.

Problem is, after I detach the group and it will disappears form screen, I cant add or remove child objects. I get the exception: "javax.media.j3d.RestrictedAccessException: Group: only a BranchGroup node may be added"

Also, if I try to set capabililty bits I get: "javax.media.j3d.RestrictedAccessException: Cannot modify capability bits on a live or compiled object"

What am I missing? Is the group still live after I have detached it?

jorgen

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jorg01
Offline
Joined: 2008-03-21
Points: 0

Btw, I found out that by not compiling the scene graph add/remove works ok...

jorgen

jamiehope
Offline
Joined: 2007-10-22
Points: 0

Which capability bits are you trying to set, and when?

jorg01
Offline
Joined: 2008-03-21
Points: 0

Hi, the main issue is that I cant add/remove shapes on a branchgroup after I have detached it from the scene graph. Any setCabalitity call on the group will fail, saying that the group is live or compiled. But as I said, it is add/remove shapes that I want to get working for my modeling app.

thanks
jorgen