Mark,

Thanks for the tipoff.  I havent given it a try yet, but I am confident
that it will work.

Ian


On Tue, 29 Jul 2003, Mark Hood wrote:

> > Date:         Tue, 29 Jul 2003 04:28:36 -0400
> > From: Ian M Nieves <[EMAIL PROTECTED]>
> >
> > However, when I call getImagePlateToVworld(...) directly after the resize,
> > sometimes I do not get a correct transform.
> >
> > WHAT is the best way to get this information after the Canvas3D is
> > resized??  I have the feeling that the callback for the resizing of the
> > Canvas3D is occuring before the Java3D Canvas3D specifics are updated...
> > this might be causing my call to getImagePlateToVworld(...) to be too
> > "early."
>
> Yes, this is most likely the problem.  Java 3D registers an AWT listener
> for canvas updates; so do you.  They both run in the same AWT thread,
> and the order in which they run is not defined.  So in some cases (all?)
> you will be trying to get information from the Java 3D core which hasn't
> been updated yet.  There are also frame latencies in some updates to the
> core data structures which don't get synchronized until after the last
> frame has been rendered.
>
> To work around this, use the getImagePlateToVworld() method in the
> com.sun.j3d.universe.ViewInfo utility class instead of the core Canvas3D
> method.  The ViewInfo methods always derive their transforms from the
> current application and AWT state.  Once you create a ViewInfo, you can
> call updateCanvas() on it whenever the canvas is resized or moved (from
> an AWT listener if you like) and then ViewInfo.getImagePlateToVworld()
> will return the up-to-date transform.
>
> -- Mark Hood
>
> ===========================================================================
> 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