View Full Version : How to convert vrml viewpoint to glulookat?
04-27-2000, 11:34 PM
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, 09: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 © 2015 vBulletin Solutions, Inc. All rights reserved.