Hi Werner, The use of sin is correct if you want to capture the whole bounding sphere within the view frustum, if you use tan then you'll slice off the out edge of the bounding sphere. To see why draw a diagram of the view frustum with a bounding spere on the look vector, then fit the view frustum sides to the sphere you'll find they meet not at the plane that goes through the center point, but forward of this point, and the trig for the distance of the eye from the center will be sin.
Robert. On Thu, Feb 17, 2011 at 10:46 AM, Werner Modenbach <[email protected]> wrote: > When using getProjectionMatrixAsFrustum the viewAngle was calculated using > atan2(...) > > In the next line the reverse operation: calculating "dist" has to use tan() > instead of sin(); > > - Werner - > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
