Dirk Reiners wrote:
Hi Thomas,
On Sun, 2005-10-30 at 01:04 +0200, Thomas Beer wrote:
Hi!
I just encountered an "unexpected behaviour" kind of problem with
MatrixPerspective:
MatrixPerspective(90.0, 1.0, 0.1, 1000.0) gives
-0.501 0.000 0.000 0.000
0.000 -0.501 0.000 0.000
0.000 0.000 -1.000 -0.200
0.000 0.000 -1.000 0.000
while gluPerspective(90.0, 1.0, 0.1, 1000.0) gives me
1.000 0.000 0.000 0.000
0.000 1.000 0.000 0.000
0.000 0.000 -1.000 -0.200
0.000 0.000 -1.000 0.000
Is this the supposed behaviour of MatrixPerspective?
Yup. ALL OpenSG functions take angles in radians, not degrees. Try
MatrixPerspective(osgdegree2rad(90.0), 1.0, 0.1, 1000.0), that should
fix it.
Hope it helps
Dirk
I know, but the values with deg2rad(90) are worse:
MarixPespective 90:
-0.501 0.000 0.000 0.000
0.000 -0.501 0.000 0.000
0.000 0.000 -1.000 -0.200
0.000 0.000 -1.000 0.000
MarixPespective deg2rad(90):
-0.000 0.000 0.000 0.000
0.000 -0.000 0.000 0.000
0.000 0.000 -1.000 -0.200
0.000 0.000 -1.000 0.000
gluPerspective:
1.000 0.000 0.000 0.000
0.000 1.000 0.000 0.000
0.000 0.000 -1.000 -0.200
0.000 0.000 -1.000 0.000
Any ideas?
Thomas
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users