The routine gGenerateView() generates a new modelling transformation by combining the data specified by the viewing routines with the current modelling transformation. When in space mode (the default) the current modelling transformation is post-multiplied by the viewing parameters, while in picture mode (see gSetTransformMode()) the current modelling transformation is pre-multiplied by the viewing parameters. Users are referred to the routine gUpdateView() which sets the same viewing parameters on the current output without modifying the modelling transformation matrix.
The default view is a parallel view pointing along the negative z-axis with the view centre at the origin. It can be redefined by calls to gDefinePerspView(), gDefineSphericalView() or gDefineParallelView() and modified by calls to gSetViewEyeDistance(), gMoveViewCentre(), gViewShift() or gViewTurn(). The default view can be restored by calling gInitView(). If the current view has perspective defined, it may also be modified by calls to gSetViewPlaneDistance() or gViewRotate().
Unless gPosViewCentre() is called the view centre is projected onto the centre of the current window limits. The window limits are set to the viewport limits unless a user-defined window is currently specified (see gSetWindow2D(), gSetWindow3D() or gSetWindowMode()). If gSetViewUpDirection() is not called, gGenerateView() attempts to project the 3-D y-axis parallel to the screen y-axis, or if the 3-D y-axis is parallel to the view direction, then the 3-D x-axis is projected parallel to the screen x-axis.