Thats pretty slick Lee!  That would never have occured to me to do.  Are you
using textures by reference and Y-up?  Have you found that to be efficient
and fast?

Dave Yazel

> ----------
> From:         J. Lee Dixon[SMTP:[EMAIL PROTECTED]]
> Reply To:     Discussion list for Java 3D API
> Sent:         Thursday, January 25, 2001 4:16 PM
> To:   [EMAIL PROTECTED]
> Subject:      Re: [JAVA3D] How can I project a Swing components onto a J3D
> surf ace?
>
> I think it is doable, but you have to get in there and do some work.
> For example, you can create an offscreen graphics for a buffered image
> to draw upon.  Thus, you should be able to draw the components onto the
> offscreen graphic and use it to texture.  When a user clicks on the 3D
> object, use the picking routines to figure out where on the object the
> pick occurred, convert that to the coordinates of the offscreen graphic,
> and then send an event to the correct component.  After that, redraw the
> scene onto the offscreen graphic and reapply the texture.
>
> I do this sort of thing with text displays.  I would think it would be
> not too far fetched to tell a JButton that it's parent is something
> derived from a BufferedImage.
>
> I personally just model 3D buttons, sliders, and text displays to make
> 3D GUIs, complete with the ability to attach listeners.
>
> -Lee
>
> > -----Original Message-----
> > From: Yazel, David J. [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 25, 2001 10:02 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [JAVA3D] How can I project a Swing components onto a J3D
> > surf ace?
> >
> >
> > I have heard this request before, but I can't even picture
> > what this means.
> > Do you mean to put a button or some other Swing component
> > actually in the 3d
> > scene? or do you mean you are placing the component in the same Swing
> > container, with the canvas3d underneath the component?
> >
> > Because you can do neither of these things to  my knowledge.  Swing is
> > lightweight and java3d is heavyweight.  The closest I have
> > come is to put
> > swing components in JWindow's and float them above the
> > canvas.  You can, of
> > course, build swing apps where the swing controls to the
> > left, right, above
> > or below the canvas and that will work.  For some things I
> > find I have to
> > trap the AWT events in the canvas3d and send them back to the
> > top of my
> > Swing hierarchy to be processed properly (i.e. keystroke events).
> >
> > Dave Yazel
> >
> > > ----------
> > > From:         Stefan Bühlmann[SMTP:[EMAIL PROTECTED]]
> > > Reply To:     Discussion list for Java 3D API
> > > Sent:         Thursday, January 25, 2001 4:41 AM
> > > To:   [EMAIL PROTECTED]
> > > Subject:      [JAVA3D] How can I project a Swing components
> > onto a J3D
> > > surface?
> > >
> > > Hello,
> > >
> > > does anyone know a simple way, to project Swing components
> > onto the =
> > > surface of a J3D object, such that the mouse is correctly passed =
> > > through? E.g. Clicking the mouse clicks on the swing buttons.
> > >
> > > Thanks for any help, Stefan
> > >
> > >
> >
> > ==============================================================
> > =============
> > 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".
>

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