Guest
|
Posted: Sun Mar 19, 2006 10:12 am Post subject: OrbitBehavior and PickBehavior |
|
|
Hi there,
I would like to translate and zoom some spheres I put in my universe.
I used mouse behavior class PickTranslateBehavior and PickZoomBehavior.
Every thing is fine. However, when I add an OrbitBehavior to the
ViewingPlatform, the behavior of the PickBehavior classes is overridden
by the OrbitBehavior one. In other words, I can not translate and zoom
my spheres without moving the whole graph.
My question is: is it possible to tell the system to apply
PickTranslateBehavior, when I click on a sphere, and OrbitBehavior
otherwise?
Thanks a lot,
Marco
My code:
// add orbit behavior to ViewingPlatform
OrbitBehavior orbit = new OrbitBehavior(canvas,
OrbitBehavior.REVERSE_ALL );
BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0),
100.0);
orbit.setSchedulingBounds(bounds);
viewingPlatform.setViewPlatformBehavior(orbit);
....
Sphere sphere = new Sphere(0.10f,
Sphere.GENERATE_NORMALS | Sphere.ENABLE_GEOMETRY_PICKING,
sphereAppearance); |
|