[ Maverik Level 1 typedefs ]
MAV_viewParams
Summary
View parameters.
Syntax
typedef struct {
MAV_vector eye;
MAV_vector view;
MAV_vector up;
MAV_vector fixed_up;
MAV_viewModifierFn mod;
MAV_vector right;
MAV_vector trans_eye;
MAV_vector trans_view;
MAV_vector trans_up;
MAV_vector trans_right;
} MAV_viewParams;
Description
The MAV_viewParams data structure defines the user's view, as follows:
- eye
position of the viewer's eye
- view
normalized view direction vector, measured from the eye position
- up
normalized view up vector
- mod
at the start of each frame, the mod function is called. This arbitrarily
transforms the supplied viewing vectors to produce the viewing vectors
trans_eye, trans_view, trans_up and trans_right. It is these
transformed vectors that are actually used to define the view. Setting
this value to NULL, or using the MAV_viewModifierFn mav_viewParamsFixed, performs a null
transformation (that is, the transformed vectors are the same as the
supplied vectors). However, advanced users might wish to write their
own functions to implement, say, an over-the-shoulder view for an
avatar or a view whose orientation is matched to that of an HMD.
- fixed_up
normalized world up vector, used by some navigation functions. This
field is optional but it is strongly recommended that it is defined.
- right
not directly defined by the user but rather calculated at the start of
each frame by the kernel using the other viewing vectors. Since it is
used by many routines, it is stored in the data structure rather than
being calculated each time it is needed.
- trans_view, trans_up, trans_right
see description of mod.
The viewing frustum is only fully defined once the MAV_viewParams are
associated with a window, using the mav_windowViewParamsSet function, thus
defining the field of view, aspect ratio and near/far clip planes.
Back to the index page.