COpenGL::LookAt

void LookAt( const float* EyePoint, const float* ReferencePoint, const float* UpDirection );

void LookAt( float EyeX, float EyeY, float EyeZ, float ReferenceX, float ReferenceY, float ReferenceZ, float UpX, float UpY, float UpZ );

Parameters

EyePoint   Pointer to an array of three float values. Specifies new eye point location coordinates in x, y, z order.
UReferencePoint Pointer to an array of three float values. Specifies new reference point location coordinates in x, y ,z order.
UpDirection  Pointer to an array of three float values. Specifies new eye up direction vector coordinates in x, y, z order. The up direction vector must not be parallel to the line of sight from the eye to the reference point .
EyeX, EyeY, EyeZ  Specifies x, y, z coordinates of the new eye point location.
ReferenceX, ReferenceY, ReferenceZ Specifies x, y, z coordinates of the new reference point location.
UpX, UpY, UpZ  Specifies new x, y, z coordinates of the new up direction vector. The up direction vector must not be parallel to the line of sight from the eye point to the reference point .

Remarks

The LookAt method function changes the COpenGL objectís view projection according to a passed eye point, reference point and up direction vector coordinates. The function is similar to the OpenGLís gluLookAt function. However, be sure to use only the COpenGL objectís methods to change object view projection instead of using the OpenGL or GLU functions.

If LookAt method is called when object is in Free Look interaction mode, then given UpDirection vector is ignored. Instead, the UpDirection vector which was current when the object was set to Free Look mode will be used, or last vector passed to SetUpDirection method since then.

See Also

SetReferencePoint, GetReferencePoint, SetEyePoint, GetEyePoint, SetUpDirection , GetUpDirection , SetLookDistance, GetLookDistanceSetInteractionMode