Hi all,
I want to group objects in such a way that when I pick the parent of the group, all children follows with it.
But when I pick a child, the child should move freely and independent of the parent.
The scenegraph is rearranged when objects are picked interactively by the user (all objects are live in the scene).
I use the the "moveTo(BranchGroup bg)" method to create this structure of the scenegraph.
 

                                Locale
                                    |
                                BGRoot
                                    |
                                TGParent
                             /           |
                    BGchild1    BGChild2
                           |              |
                    TGChild1    TGChild2
 
When I move my TGParent all children follows with it, and if the TGParent is
not rotated everything works just the way I want.
The problem arises when I rotate the TGParent. When I then try to move one
of its children, they move in the opposite way of what it should.

To solve this problem I have tried to subtract the virtual world coordinates
of the TGChild from the virtual world coordinates
of the TGParent.  ( childTransform3d.sub(parentTransform3d)) ).

When I then try to pick and move one of the child objects, I am not able to
set the transform of the child-object. I get the error-message:

javax.media.j3d.BadTransformException: TransformGroup: non-affine transform

Could someone please help me if they have any thoughts about the problem
-Morten Gustavsen

Reply via email to