> Remember, view.setVpcToEc() wants the transform from ViewPlatform
> coordinates to eye coordinates, not the vworld to eye coordinates you
> derived from vinfo.getEyeToVworld().  So the view will be different if
> you've called setNominalViewingTransform() on the ViewingPlatform or
> otherwise manipulated the ViewPlatform.

It's like you read the misunderstanding in my mind! It seems silly now, but
I wasn't considering the view platform transform, and I was translating the
view platform by (0,0,30) so the viewing platform transform was that
translation, not identity.

Looking at vinfo.getEyeToVworld(), that's exactly what I was looking for.
It's starting to come together how it works, I think I'm getting a handle on
my problem now. Thanks!


-----Original Message-----
From: Mark Hood [mailto:[EMAIL PROTECTED]
Sent: Friday, June 20, 2003 9:44 PM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] projection coordinates


> Date:         Fri, 20 Jun 2003 12:30:39 -0400
> From: "Young, Jason" <[EMAIL PROTECTED]>
>
> In a bold/naive leap into the dark, I extracted view and projection
matrices
> from ViewInfo and compared results between
> 1) using the normal mode
> 2) going into compatibility mode and putting the obtained matrices back in
> to see if my renderings would be the same in both modes.
>
>       ViewInfo vInfo = new ViewInfo(view);
>       Transform3D e2vw = new Transform3D();
>       Transform3D e2cc = new Transform3D();
>       vInfo.getEyeToVworld(c3d, e2vw, null); // view matrix
>       vInfo.getProjection(c3d, e2cc, null);     // projection matrix
>       e2vw.invert();
>
>       // see if it looks the same in normal mode or compatibility mode
>       // if I get the matrices and set them in compatibility mode
>       view.setCompatibilityModeEnable(true);
>       view.setVpcToEc(e2vw);
>       view.setLeftProjection(e2cc);
>
> Of course the resulting renderings were different.

Remember, view.setVpcToEc() wants the transform from ViewPlatform
coordinates to eye coordinates, not the vworld to eye coordinates you
derived from vinfo.getEyeToVworld().  So the view will be different if
you've called setNominalViewingTransform() on the ViewingPlatform or
otherwise manipulated the ViewPlatform.  Make sure the ViewPlatform
transform is identity, or use the result of vinfo.getViewPlatformToEye()
for view.setVpcToEc() instead.

If the ViewPlatform transform is indeed identity, then it could be a
bug.  I would be surprised since I tested the code using compatibility
mode myself :)  If you could send me the complete code for investigation
I'd appreciate it.

> I'm looking at these items you mentioned, but I suppose that reading
> ViewInfo.java will clear a lot of things up for me. There may be more
> questions coming next week! :)
>
> Thanks for your help,

You're welcome, I hope ViewInfo is useful to you.

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