Hi
What I would do with the AWTEvent is get the coordinates of the mouse when
the click occured. Then, you can use the
Canvas3D.getImagePlateToVworld(Transform3D t). Then, use the transform3D t
on the mouse coordinates to get the virtual world coordinates. At this
point, to increase tolerance levels I would draw a pickCylinderRay, pointing
into the scene at a 90 degree angle to the current view. Call the resulting
PickResult.setFirstIntersectOnly(true) to only return the first intersection
of the cylinder and the PointArray. Get the intersection with
PickResult.getIntersection(0). This will return a PickIntersection object.
You can get the point of intersection with getPointCoordinates(). Then, it
is a matter of testing your PointArray for those coordinates to get the
exact point you need to modify.

As for the performance questions, i have no idea :-( since i havent actually
implemented this yet. Good luck.

B.D.


>From: Marianne Lund Jacobsen <[EMAIL PROTECTED]>
>Reply-To: Discussion list for Java 3D API <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: [JAVA3D] Picking and USE_BOUNDS
>Date: Tue, 3 Jul 2001 09:15:10 +0200
>
>On Mon, 2 Jul 2001, Bob Dengle wrote:
>
> > Back to the other original question, about only using one Shape3D
>instead of
> > multiple ones each with a TransformGroup. If you wanted to, instead of
> > making multiple Shape3D's with their own TransformGroups, you could make
>the
> > entire group of points one PointArray. You can get and set individual
>points
> > through GeometryArray.getCoordinate and GeometryArray.setCoordinate.
> > However, if you did it this way you would need to write your own
>behavior to
> > translate the point that was selected.
>
>
>Hello
>Thanks for the answer!
>What you are describing is excactly what I tried to do at first, however I
>never managed to get so far that I actually changed the coordinates in the
>PointArray, because I didn't find out what point actually was selected.
>The behavior wakes up on AWTEvents MOUSE_*, but I don't know how to find
>the coordinate in the virtual world that the click corresponds to. I only
>get the coordinate at the canvas (with (0,0) in the top left corner..). Do
>I have to use getLocalToVWorld() or something to transform the coordinate?
>I didn't quite understand how that method worked..
>Any hints?
>
>Hmm.. while thinking about this, it seems like a lot of work. And I
>already got it to work fine with multiple Shape3D's. But thinking about
>performance, is it a better idea to have only one Shape3D instead of
>multiple ones? If it will make the performance better, I think I will try
>to finish my own behaviorclass. My application isn't terribly fast the way
>it is... What do you think?
>
>-Marianne
>
>===========================================================================
>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".

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

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