GsSetRefView2

Sets the viewpoint position

int GsSetRefView2 (
        GsRVIEW2 *pv
)

Arguments

pv Pointer to viewpoint position information (reference type)

Return Value

0 is returned if the viewpoint was successfully set, otherwise, 1 is returned.

Explanation

The World Screen Matrix (WSMATRIX) is calculated using the viewpoint information pointed to by pv. Since WSMATRIX does not change unless the viewpoint is moved, this function need not be called for each frame. However, if the viewpoint is moved, GsSetRefView2() must be called for changes to be reflected in each frame. GsSetRefView2() should be called each frame if the GsRVIEW2 member super is set to anything other than WORLD. In this case, the viewpoint will move if the parameters of  the parent coordinate system change even if the other viewpoint parameters have not changed.

See Also

GsRVIEW2, GsWSMATRIX, GsSetView2()