[ Maverik Level 1 functions ]


mav_windowViewModifierSet

Summary

Set the window view modification function and parameters.


Syntax

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


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.

   MAV_viewModiferParams vmp;
   
   vmp.offset= 20.0;
   
   mav_windowViewModifierSet(mav_win_left, &vmp, mav_eyeLeft);
   mav_windowViewModifierSet(mav_win_right, &vmp, mav_eyeRight);


Back to the index page.