View Full Version : How to convert vrml viewpoint to glulookat?
04-28-2000, 12:34 AM
Does anyone know how to convert vrml viewpoint which has to following attributes:
orientation x, y, z, angle
position x, y, z
to a gluLookAt, which composes of position,
aim, and up vectors.
Any help or web page link will be much appreciated. Many thanks.
04-30-2000, 10:17 AM
>orientation x, y, z, angle
>position x, y, z
Here is what I did in my VRML loader:
void ViewpointDisplay(VIEWPOINT *viewpoint)
if (viewpoint != NULL)
gluPerspective(viewpoint->fieldOfView * RAD2DEG, dAspect, zNear, zFar);
glRotatef(-viewpoint->orientation * RAD2DEG, viewpoint->orientation, viewpoint->orientation, viewpoint->orientation);
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.