shosking
09-04-2002, 07:04 PM
Hi,
When defining the sphere or disk, you define its radius.
However, a gluSphere or gluDisk will change dimensions (i.e., its radius will vary) according to where it is located within a viewing frustrum created by gluPerspective.
Is there any way that i can access the radius of the sphere in terms of its screen size, which changes as the object moves around in depth, other than by doing the calculations myself using the perspective matrix generated by gluPerspective.
That is, can i write some code that accesses the radius of the sphere, and returns it to stdout.
thanks,
Simon
When defining the sphere or disk, you define its radius.
However, a gluSphere or gluDisk will change dimensions (i.e., its radius will vary) according to where it is located within a viewing frustrum created by gluPerspective.
Is there any way that i can access the radius of the sphere in terms of its screen size, which changes as the object moves around in depth, other than by doing the calculations myself using the perspective matrix generated by gluPerspective.
That is, can i write some code that accesses the radius of the sphere, and returns it to stdout.
thanks,
Simon