Title: adding multiple shapes to a branchgroup

Hello-
I have a compiled branchgroup, to which I am trying to add another branchgroup containing multiple Shape3D's at runtime.  When I'm adding a single shape, everything seems to work OK, but with multiple shapes, only the last one added picks up all my mouse behaviors.  The others pick up only the MouseRotate.

I'm trying something like the following to create my branchgroup with multiple shapes:
==========
BranchGroup branchGroup = new BranchGroup();
TransformGroup mouseSPZ = new TransformGroup();
BoundingSphere bounds = new BoundingSphere();
// snip  Set capabilities
MouseRotate mouseRotate = new MouseRotate();
MouseTranslate mouseTranslate = new MouseTranslate();
MouseZoom mouseZoom = new MouseZoom();
// setup mouse behaviors

branchGroup.addChild(mouseSPZ);
branchGroup.addChild(mouseRotate);
branchGroup.addChild(mouseTranslate);
branchGroup.addChild(mouseZoom);

for(int i = 0; i < numShapes; i++){
        Shape3D shape = new Shape3D();
        // setup shape
        mouseSPZ.addChild(shape)
}
=========
Any Ideas?  Thanks!

-Ed

Reply via email to