mav_viewParamsAnimateToSMS(3)

NAME
mav_viewParamsAnimateToSMS - Animate a set of view parameters so that an SMS is visible.

LEVEL
Maverik Level 1

SYNTAX
void mav_viewParamsAnimateToObject(MAV_window *w, MAV_viewParams *vp, MAV_SMS *sms, float dist, float len, int unit);

ARGUMENTS
Window in which to calculate the view. View parameters to manipulate or NULL to animate the view parameters of w. Target SMS. Distance multiplier from SMS. Length of animation (see below). Units of len (see below)

DESCRIPTION
This function animates the view parameters vp so that the objects in SMS sms are in view in window w (vp can be set to NULL if they are the view parameters already associated with w). The view parameters are translated (no rotation occurs) to a point such that the bounding sphere of sms fills the view of w. dist can be used to further multiple the offset distance. len defines the length of animation and unit the units of val. unit can be set to MAV_ANIMATE_TIME (len is then the number of seconds over which to animate); MAV_ANIMATE_FRAME (len is then the number of frames over which to animate) or MAV_ANIMATE_DISTANCE (len is then the distance traveled in each step of the animation). unit can further be bit-wised OR'd with MAV_ANIMATE_LINEAR (the default) to give a linear animation where each step has an equal increment; or MAV_ANIMATE_S to give an S-shaped curve where the animation starts slow, speeds up and then slows down. If len is negative then the view parameters are updated immediately.