Hi John, I've reviewed your changes and they look reasonable. The only tweak I made was to rename the local variables near and far to temp_near and temp_far as to avoid any potential issue with VisualStudio finding conflict with it's own usage of these names.
Changes now checked into svn/trunk. Robert. On Mon, Oct 4, 2010 at 12:49 PM, PCJohn <[email protected]> wrote: > Hi Robert, > > attaching Matrix_implementation fix for two problems: > > - using m.getPerspective( fovy, tmp, tmp, tmp ) to get only FOV does not > work. > The reason is that getPerspective is taking tmp as reference - thus all the > three variables points to the same memory location. Then, zNear (third > parameter) is used inside the method, while zNear content was spoiled by > zFar that was written to the same place, resulting in fovy set to nan. I > consider that it is the right of programmers to use 3 times tmp as parameter > and I fixed the code in the method. I have done the same for getFrustum and > getLookAt. > > - I fixed makeFrustum to accept infinite zFar. (Some graphics techniques > like shadow volumes require placing zFar to infinity to avoid visual > artifacts.) > > Made againt trunk ~2weeks ago. Feel free to improve the code readability... > John > > _______________________________________________ > 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
