mav_windowViewModifierSet(3)

NAME
mav_windowViewModifierSet - Set the window view modification function and parameters.

LEVEL
Maverik Level 1

SYNTAX
void mav_windowViewModifierSet(MAV_window *w, MAV_viewModifierParams *vmp, MAV_viewModifierFn fn);

ARGUMENTS

MAV_window *w
    Window.

MAV_viewModifierParams *vmp
    The view modification parameters to use.

MAV_viewModifierFn fn
    The view modification function to use.

DESCRIPTION
This function sets the view modification function for window w to be fn and to use an associated set of parameters vmp. The function arbitrarily modifiers the view in a window by an amount defined by the associated parameters.

This function is typically used to perform stereo viewing as follows. Two windows will share a common set of view modification parameters, but one window will have a view modification function which translates the view to the right by an amount given in the view modification parameters, while the other window will have a different view modification function which translates the view to the left by the same amount.

Maverik supplies three view modification functions: mav_eyeMono, mav_eyeLeft and mav_eyeRight. mav_eyeMono does not modify the view, and is the default for a window, while mav_eyeLeft and mav_eyeRight respectively offset the eye point to the left and right along the view right vector by half the value of the offset set in the MAV_viewModifierParams. An advanced user could write their own MAV_viewModifierFn's so as to apply, for example, a convergence in the view direction vectors as well as an eye point offset.

<cod>
   MAV_viewModiferParams vmp;

   vmp.offset= 20.0;

   mav_windowViewModifierSet(mav_win_left, &vmp, mav_eyeLeft);
   mav_windowViewModifierSet(mav_win_right, &vmp, mav_eyeRight); </cod>