VLC
4.0.0-dev
|
Video and audio viewpoint struct and helpers. More...
Go to the source code of this file.
Data Structures | |
struct | vlc_viewpoint_t |
Viewpoints. More... | |
Macros | |
#define | FIELD_OF_VIEW_DEGREES_DEFAULT 80.f |
#define | FIELD_OF_VIEW_DEGREES_MAX 150.f |
#define | FIELD_OF_VIEW_DEGREES_MIN 20.f |
Functions | |
static void | vlc_viewpoint_init (vlc_viewpoint_t *p_vp) |
static void | vlc_viewpoint_clip (vlc_viewpoint_t *p_vp) |
static void | vlc_viewpoint_reverse (vlc_viewpoint_t *dst, const vlc_viewpoint_t *src) |
Reverse the viewpoint rotation. More... | |
void | vlc_viewpoint_to_4x4 (const vlc_viewpoint_t *vp, float *matrix) |
Generate the 4x4 transform matrix corresponding to a viewpoint. More... | |
Video and audio viewpoint struct and helpers.
#define FIELD_OF_VIEW_DEGREES_DEFAULT 80.f |
Referenced by vlc_viewpoint_init().
#define FIELD_OF_VIEW_DEGREES_MAX 150.f |
Referenced by vlc_viewpoint_clip().
#define FIELD_OF_VIEW_DEGREES_MIN 20.f |
Referenced by vlc_viewpoint_clip().
|
inlinestatic |
References FIELD_OF_VIEW_DEGREES_MAX, FIELD_OF_VIEW_DEGREES_MIN, vlc_viewpoint_t::fov, vlc_viewpoint_t::pitch, vlc_viewpoint_t::roll, VLC_CLIP, and vlc_viewpoint_t::yaw.
Referenced by ViewpointApply().
|
inlinestatic |
References FIELD_OF_VIEW_DEGREES_DEFAULT, vlc_viewpoint_t::fov, vlc_viewpoint_t::pitch, vlc_viewpoint_t::roll, and vlc_viewpoint_t::yaw.
Referenced by aout_New(), Create(), and video_format_Init().
|
inlinestatic |
Reverse the viewpoint rotation.
It can be used to convert a camera view into a world transformation. It will also copy non-rotation related data from src
to dst
.
dst | the viewpoint with the final reversed rotation |
src | the viewpoint for which the rotation need to be reversed |
References vlc_viewpoint_t::fov, vlc_viewpoint_t::pitch, vlc_viewpoint_t::roll, VLC_API, vlc_viewpoint_to_4x4(), and vlc_viewpoint_t::yaw.
void vlc_viewpoint_to_4x4 | ( | const vlc_viewpoint_t * | vp, |
float * | matrix | ||
) |
Generate the 4x4 transform matrix corresponding to a viewpoint.
Convert a vlc_viewpoint_t into a 4x4 transform matrix with a column-major layout. The transformation is applied as-is. you have to reverse the viewpoint with vlc_viewpoint_reverse first if you want to transform the world.
vp | a valid viewpoint object |
matrix | a 4x4-sized array which will contain the matrix data |
Column-major matrix multiplication mathematically equal to z_rot * x_rot * y_rot
References vlc_viewpoint_t::pitch, vlc_viewpoint_t::roll, and vlc_viewpoint_t::yaw.
Referenced by vlc_viewpoint_reverse().