Hi there,
Can someone help me! I want to translate some single
objects in my Scenegraph, if I pick it with the mouse.
But although I want to rotate, translate and scale the
hole scene, including all objects.
I have inserted a PickTranslate.., PickRotate.. and
a PickZoomBehavior as follows:
objRootPickRotateBehavior = new PickRotateBehavior(objRoot, canvas, bounds,
PickObject.USE_BOUNDS);
objRoot.addChild(objRootPickRotateBehavior);
objRootPickZoomBehavior = new PickZoomBehavior(objRoot, canvas, bounds,
PickObject.USE_BOUNDS);
objRoot.addChild(objRootPickZoomBehavior);
objRootPickTranslateBehavior = new PickTranslateBehavior(objRoot, canvas, bounds,
PickObject.USE_BOUNDS);
objRoot.addChild(objRootPickTranslateBehavior);
and a second PickTranslateBehavior:
objMovingPickTranslateBehavior = new PickTranslateBehavior( objMoving, canvas,
bounds,
PickObject.USE_BOUNDS);
objMovingPickTranslateBehavior.setEnable( false );
objMoving.addChild( objMovingPickTranslateBehavior );
objRotate.addChild(objMoving);
The first one is a Child of the root (objRoot) and the other one is
a child of a Branchgroup (objMoving), which has got this single Objects
as childs.
If I disable the first PickTranslate.., PickRotate.. and PickZoomBehavior,
and enable the second Behavior, I cannot translate anything with the mouse.
If I enable the first and disable the second, I only can translate the whole
scene.
Have someone an idea? Thanks a lot!
capitano
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/