VLC  4.0.0-dev
Data Structures | Macros | Functions
vlc_viewpoint.h File Reference

Video and audio viewpoint struct and helpers. More...

Include dependency graph for vlc_viewpoint.h:

Go to the source code of this file.

Data Structures

struct  vlc_viewpoint_t
 Viewpoints. More...




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...

Detailed Description

Video and audio viewpoint struct and helpers.

Macro Definition Documentation



Referenced by vlc_viewpoint_init().



Referenced by vlc_viewpoint_clip().



Referenced by vlc_viewpoint_clip().

Function Documentation

◆ vlc_viewpoint_clip()

static void vlc_viewpoint_clip ( vlc_viewpoint_t p_vp)

◆ vlc_viewpoint_init()

static void vlc_viewpoint_init ( vlc_viewpoint_t p_vp)

◆ vlc_viewpoint_reverse()

static void vlc_viewpoint_reverse ( vlc_viewpoint_t dst,
const vlc_viewpoint_t src 

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.

dstthe viewpoint with the final reversed rotation
srcthe 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.

◆ vlc_viewpoint_to_4x4()

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.

vpa valid viewpoint object
matrixa 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().