I have done something similar to this. I created a Behavior that wakes up on
MouseEvents and draws a selection rectangle as a quad. My quad uses
by-reference geometry and I just update the geometry during the
processStimulus (using updateData) to follow the mouse's movement. I'm sure
this is more efficient than adding and removing a Shape3D every frame.
Raffi
-----Original Message-----
From: Daniel Moscoso [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 7:45 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Selection area and zooming the scene graph
Hi all !!
I'm implementing an applet that has to be able to get a 'Selection area'
like in most of draw programs.
To simulate this, I think on drawing a rectangle with a dash line according
to the mouse movement. This mean that a Shape3D with a QuadArray has to be
drawn with every mouse movement, adding the created Shape3D with a parent
BranchGroup (because the scene is live), and removing the last Shape3D
created.
Am i right about this or is there another easier way to do it ?
The second thing I want to do is, when the area is selected, make a Zoom of
thispart of the scene graph. I think it has to be done moving the
ViewPlatform.
Has anybody been worhing whit this ?
Any comments will be appreciated.
Thanks in advanced !!
Dani
===========================================================================
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".