On Jan 30, 2008, at 11:13 PM, Bryan Lund wrote:
> Basically what I'm now doing is something like this:
> ShortSide = tan(degreesAsRadians) * LengthOfAdjecentSide
>
> Is this the correct approach to take no matter with the width of the
> rb3d space is? (As the viewable area changes depending on the width of
> the RB3DSpace no matter what the field of view is set to.)
Aha, this is a good point. You do need to take into account the
aspect ratio of the view, since the FieldOfView can't refer to both
at the same time if your view isn't square. I don't remember off the
top of my head which it is, though (I think it may be the greater of
the two dimensions, but I'm not sure).
In the Rb3D FAQ, I think there is some code to position something at
any desired pixel position within an Rb3DSpace. It's more complex
than what we've discussed here, because it works for any camera
position and orientation, but the basic idea is the same. <http://
www.strout.net/info/coding/rb/>
HTH,
- Joe
--
Joe Strout
Inspiring Applications, Inc.
http://www.InspiringApps.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|