04-20-2000, 12:11 AM

My problem is,

I`ve got some hemispheres and in order to rotate them correct I need to calculate the x, y and z angle from my viewpoint to the object, so that I`m able to rotate the hemisphere according to these angles. I already know how to get the correct distance and the relative coordinates from viewp. to object, but if I rotate the sphere these angles should change. I know I´ve got to use the modelview matrix, but not how.

Thanks...

I`ve got some hemispheres and in order to rotate them correct I need to calculate the x, y and z angle from my viewpoint to the object, so that I`m able to rotate the hemisphere according to these angles. I already know how to get the correct distance and the relative coordinates from viewp. to object, but if I rotate the sphere these angles should change. I know I´ve got to use the modelview matrix, but not how.

Thanks...