I have written navigation non-behaviors that (1)implement AWT listeners and
completely bypass the BehaviorScheduler (as you are suggesting). I have also
written navigation behaviors that (2)implement AWT listeners and then use
Behavior.postId() to trigger the BehaviorScheduler to execute them. Finally,
I have written navigation behaviors that (3)use WakeupOnAWTEvent() and
bypass the AWT listeners. They all can work fine.

The first method makes changes to the scene graph from an AWT thread which,
I believe, Sun has said is completely legitimate. The other two methods make
changes to the scene graph from within the J3D rendering thread.
Check out the source code to
com.sun.j3d.utils.behaviors.vp.ViewPlatformAWTBehavior. It uses the second
method. Whereas com.sun.j3d.utils.behaviors.picking.PickMouseBehavior uses
the third method.

-----Original Message-----
From: Tomas Normark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 3:07 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] What's the catch in using mouselisteners on canvas3d
insteadof behaviors?


I want to implement interactions with a live scene graph such
as selecting faces on an object or orbiting around and zooming
in on it. The easy way to do this seems to be to register
mouselisteners on the canvas3d and have them make appropriate
updates to the scene graph.

When I look at the Sun utility classes such as OrbitBehavior I
see that they use behaviors for this purpose. What can be
gained from using behaviors instead of simple mouselisteners
on the canvas3d. Behaviors seem a bit more complicated to deal
with, so I would like to avoid them if they don't give any
benifit compared to ordinary mouselisteners.

/Tomas

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to