If you un-jar the java3D source file, you can find the directory with the
behaviors and the two relevant subdirectories mouse and picking.

You definitely want to use the callback method of the picking behaviors and
there is an example of this in the java3D tutorial (Section 4.6).  There
are also examples with the tutorial .

The problems you will face is that unless you are willing to not use one of
the existing mouse behaviors (rotate, translate, zoom), you are stuck with
only one unused combination of mouse buttons to create your own method
(middle+right).

I have copied the source for the above behaviors under my application's
tree and recompiled them to suite my work.  I remapped the rotation
behavior to the right mouse button instead of the left.  The middle is
translate and if necessary, the right+middle is zoom.  This left the left
mouse button available for my own use (similar to what you want to do).

Using the left mouse button along with the creation of two new behavior
classes, i added the ability to click (select) and double click (bring up a
dialog box with properties for the object).

You could use the same method for adding a wire frame box.

If you are interested, let me know and I will give you more detail, but
suffice it to say that you need to CLOSELY examine both the mouse and
picking behavior classes VERY closely.

I believe that this is one of the areas that the Java3D developers at sun
need to add features to.  Many people want the ability to change which
buttons do what.  Some like you and me would like to have additional user
defined functionality.  I also find minor mistakes in these classes and
disagree with the method they use to rotate, zoom, translate object.

When you are not looking into the YX plane, the rotate, zoom, translate
methods are no longer intuitive.

I plan to give more detail to the group at a later date.

Let me know if you want to get more details.



At 11:15 PM 01/24/2000 -0500, you wrote:
>I am looking to do a specific type of picking and could not find an example
>in the archives...  I want to be able to click on one of the objects in my
>scene and add a wire frame sphere to it on the fly.  Is this possible and if
>so how?  Does anyone know where I can find a copy of the implementation of
>the provided picking behaviors to take a look at them?  Thanks for the help.
>
>Eric Arnold
>
>===========================================================================
>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".

***********************************************************************
Eric Reiss - http://www.sigda.acm.org/Eric/
Email: [EMAIL PROTECTED]

SIGDA Internet Server Manager - http://www.sigda.acm.org/

Assistant Systems Manager - School of Engineering
University of Pittsburgh
***********************************************************************

===========================================================================
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