![]()  | 
  
    libgpac
    
   Documentation of the core library of GPAC 
   | 
  
3D Mathematics More...
 Collaboration diagram for Math 3d:Data Structures | |
| struct | GF_Vec | 
| 3D point or vector  More... | |
| struct | GF_Vec4 | 
| 4D vector  More... | |
| struct | GF_Matrix | 
| 3D matrix  More... | |
| struct | GF_BBox | 
| 3D Bounding Box  More... | |
| struct | GF_Plane | 
| Plane object.  More... | |
| struct | GF_Ray | 
| 3D Ray  More... | |
Macros | |
| #define | gf_vec_equal(v1, v2) | 
| #define | gf_vec_rev(v) | 
| #define | gf_vec_diff(res, v1, v2) | 
| #define | gf_vec_add(res, v1, v2) | 
| #define | gf_quat_len(v) | 
| #define | gf_quat_norm(v) | 
| #define | gf_mx_init(_obj) | 
| matrix initialization   | |
| #define | gf_mx_is_identity(_obj) ((!(_obj).m[1] && !(_obj).m[2] && !(_obj).m[3] && !(_obj).m[4] && !(_obj).m[6] && !(_obj).m[7] && !(_obj).m[8] && !(_obj).m[9] && !(_obj).m[11] && !(_obj).m[12] && !(_obj).m[13] && !(_obj).m[14] && ((_obj).m[0]==FIX_ONE) && ((_obj).m[5]==FIX_ONE)&& ((_obj).m[10]==FIX_ONE)&& ((_obj).m[15]==FIX_ONE)) ? 1 : 0) | 
| #define | gf_mx_copy(_obj, from) | 
| matrix copy   | |
Enumerations | |
| enum | { GF_BBOX_FRONT , GF_BBOX_INTER , GF_BBOX_BACK } | 
Functions | |
| Fixed | gf_vec_len (GF_Vec v) | 
| get 3D vector length   | |
| Fixed | gf_vec_len_p (GF_Vec *v) | 
| get 3D vector length   | |
| Fixed | gf_vec_lensq (GF_Vec v) | 
| get 3D vector square length   | |
| Fixed | gf_vec_lensq_p (GF_Vec *v) | 
| get 3D vector square length   | |
| Fixed | gf_vec_dot (GF_Vec v1, GF_Vec v2) | 
| get 3D vector dot product   | |
| Fixed | gf_vec_dot_p (GF_Vec *v1, GF_Vec *v2) | 
| get 3D vector dot product   | |
| void | gf_vec_norm (GF_Vec *v) | 
| vector normalization   | |
| GF_Vec | gf_vec_scale (GF_Vec v, Fixed f) | 
| vector scaling   | |
| GF_Vec | gf_vec_scale_p (GF_Vec *v, Fixed f) | 
| vector scaling   | |
| GF_Vec | gf_vec_cross (GF_Vec v1, GF_Vec v2) | 
| vector cross product   | |
| GF_Vec | gf_vec_cross_p (GF_Vec *v1, GF_Vec *v2) | 
| vector cross product   | |
| GF_Vec4 | gf_quat_to_rotation (GF_Vec4 *quat) | 
| quaternion to rotation   | |
| GF_Vec4 | gf_quat_from_rotation (GF_Vec4 rot) | 
| quaternion from rotation   | |
| GF_Vec4 | gf_quat_get_inv (GF_Vec4 *quat) | 
| GF_Vec4 | gf_quat_multiply (GF_Vec4 *q1, GF_Vec4 *q2) | 
| quaternion multiplication   | |
| GF_Vec | gf_quat_rotate (GF_Vec4 *quat, GF_Vec *vec) | 
| quaternion vector rotating   | |
| GF_Vec4 | gf_quat_from_axis_cos (GF_Vec axis, Fixed cos_a) | 
| quaternion from axis and cos   | |
| GF_Vec4 | gf_quat_slerp (GF_Vec4 q1, GF_Vec4 q2, Fixed frac) | 
| quaternion interpolation   | |
| void | gf_bbox_refresh (GF_BBox *b) | 
| void | gf_bbox_from_rect (GF_BBox *box, GF_Rect *rc) | 
| void | gf_rect_from_bbox (GF_Rect *rc, GF_BBox *box) | 
| void | gf_bbox_grow_point (GF_BBox *box, GF_Vec pt) | 
| bounding box expansion   | |
| void | gf_bbox_union (GF_BBox *b1, GF_BBox *b2) | 
| Bool | gf_bbox_equal (GF_BBox *b1, GF_BBox *b2) | 
| Bool | gf_bbox_point_inside (GF_BBox *box, GF_Vec *p) | 
| void | gf_bbox_get_vertices (GF_Vec bmin, GF_Vec bmax, GF_Vec *vecs) | 
| get box vertices   | |
| void | gf_mx_from_mx2d (GF_Matrix *mx, GF_Matrix2D *mat2D) | 
| matrix constructor from 2D   | |
| Bool | gf_mx_equal (GF_Matrix *mx1, GF_Matrix *mx2) | 
| matrix equality testing   | |
| void | gf_mx_add_translation (GF_Matrix *mx, Fixed tx, Fixed ty, Fixed tz) | 
| matrix translation   | |
| void | gf_mx_add_scale (GF_Matrix *mx, Fixed sx, Fixed sy, Fixed sz) | 
| matrix scaling   | |
| void | gf_mx_add_rotation (GF_Matrix *mx, Fixed angle, Fixed x, Fixed y, Fixed z) | 
| matrix rotating   | |
| void | gf_mx_add_matrix (GF_Matrix *mx, GF_Matrix *mul) | 
| matrices multiplication   | |
| void | gf_mx_add_matrix_2d (GF_Matrix *mx, GF_Matrix2D *mat2D) | 
| 2D matrix multiplication   | |
| void | gf_mx_inverse (GF_Matrix *mx) | 
| affine matrix inversion   | |
| void | gf_mx_transpose (GF_Matrix *mx) | 
| transpose 4x4 matrix   | |
| void | gf_mx_apply_vec (GF_Matrix *mx, GF_Vec *pt) | 
| matrix point transformation   | |
| void | gf_mx_apply_rect (GF_Matrix *_this, GF_Rect *rc) | 
| matrix rectangle transformation   | |
| void | gf_mx_ortho (GF_Matrix *mx, Fixed left, Fixed right, Fixed bottom, Fixed top, Fixed z_near, Fixed z_far) | 
| ortho matrix construction   | |
| void | gf_mx_ortho_reverse_z (GF_Matrix *mx, Fixed left, Fixed right, Fixed bottom, Fixed top, Fixed z_near, Fixed z_far) | 
| ortho matrix with reverse Z construction   | |
| void | gf_mx_perspective (GF_Matrix *mx, Fixed fov, Fixed aspect_ratio, Fixed z_near, Fixed z_far) | 
| perspective matrix construction   | |
| void | gf_mx_perspective_reverse_z (GF_Matrix *mx, Fixed fov, Fixed aspect_ratio, Fixed z_near, Fixed z_far) | 
| perspective matrix with reverse Z construction   | |
| void | gf_mx_lookat (GF_Matrix *mx, GF_Vec position, GF_Vec target, GF_Vec up_vector) | 
| creates look matrix   | |
| void | gf_mx_apply_bbox (GF_Matrix *mx, GF_BBox *b) | 
| matrix box transformation   | |
| void | gf_mx_apply_bbox_4x4 (GF_Matrix *mx, GF_BBox *b) | 
| matrix box transformation   | |
| void | gf_mx_apply_bbox_sphere (GF_Matrix *mx, GF_BBox *box) | 
| matrix box sphere transformation   | |
| void | gf_mx_add_matrix_4x4 (GF_Matrix *mat, GF_Matrix *mul) | 
| non-affine matrix multiplication   | |
| Bool | gf_mx_inverse_4x4 (GF_Matrix *mx) | 
| non-affine matrix inversion   | |
| void | gf_mx_apply_vec_4x4 (GF_Matrix *mx, GF_Vec4 *vec) | 
| matrix 4D vector transformation   | |
| void | gf_mx_get_yaw_pitch_roll (GF_Matrix *mx, Fixed *yaw, Fixed *pitch, Fixed *roll) | 
| matrix yaw pitch roll decomposition   | |
| void | gf_mx_decompose (GF_Matrix *mx, GF_Vec *translate, GF_Vec *scale, GF_Vec4 *rotate, GF_Vec *shear) | 
| matrix decomposition   | |
| void | gf_mx_rotate_vector (GF_Matrix *mx, GF_Vec *pt) | 
| matrix vector rotation   | |
| void | gf_mx_rotation_matrix_from_vectors (GF_Matrix *mx, GF_Vec x_axis, GF_Vec y_axis, GF_Vec z_axis) | 
| matrix initialization from vectors   | |
| void | gf_mx2d_from_mx (GF_Matrix2D *mx2d, GF_Matrix *mx) | 
| matrix to 2D matrix   | |
| void | gf_mx_apply_plane (GF_Matrix *mx, GF_Plane *plane) | 
| matrix plane transformation   | |
| Fixed | gf_plane_get_distance (GF_Plane *plane, GF_Vec *p) | 
| point to plane distance   | |
| GF_Vec | gf_closest_point_to_line (GF_Vec line_pt, GF_Vec line_vec, GF_Vec pt) | 
| closest point on a line   | |
| u32 | gf_plane_get_p_vertex_idx (GF_Plane *p) | 
| box p-vertex index   | |
| Bool | gf_plane_intersect_line (GF_Plane *plane, GF_Vec *linepoint, GF_Vec *linevec, GF_Vec *outPoint) | 
| plane line intersection   | |
| u32 | gf_bbox_plane_relation (GF_BBox *box, GF_Plane *p) | 
| box-plane relation   | |
| GF_Ray | gf_ray (GF_Vec start, GF_Vec end) | 
| ray constructor   | |
| void | gf_mx_apply_ray (GF_Matrix *mx, GF_Ray *r) | 
| matrix ray transformation   | |
| Bool | gf_ray_hit_box (GF_Ray *ray, GF_Vec min_edge, GF_Vec max_edge, GF_Vec *out_point) | 
| ray box intersection test   | |
| Bool | gf_ray_hit_sphere (GF_Ray *ray, GF_Vec *center, Fixed radius, GF_Vec *out_point) | 
| ray sphere intersection test   | |
| Bool | gf_ray_hit_triangle (GF_Ray *ray, GF_Vec *v0, GF_Vec *v1, GF_Vec *v2, Fixed *dist) | 
| ray triangle intersection test   | |
3D Mathematics
This section documents mathematic tools for 3D geometry operations
| struct GF_Vec | 
| struct GF_Vec4 | 
| struct GF_Matrix | 
3D matrix
The 3D matrix object used in GPAC. The matrix is oriented like OpenGL matrices (column-major ordering), with the translation part at the end of the coefficients list.
| Data Fields | ||
|---|---|---|
| Fixed | m[16] | |
| struct GF_BBox | 
3D Bounding Box
The 3D Bounding Box is a 3D Axis-Aligned Bounding Box used to in various tools of the GPAC framework for bounds estimation of a 3D object. It features an axis-aligned box and a sphere bounding volume for fast intersection tests.
 Collaboration diagram for GF_BBox:| Data Fields | ||
|---|---|---|
| GF_Vec | min_edge | 
 minimum x, y, and z of the object  | 
| GF_Vec | max_edge | 
 maximum x, y, and z of the object  | 
| GF_Vec | center | 
 center of the bounding box. 
  | 
| Fixed | radius | 
 radius of the bounding sphere for this box. 
  | 
| Bool | is_set | 
 the bbox center and radius are valid  | 
| struct GF_Plane | 
| struct GF_Ray | 
| #define gf_vec_equal | ( | v1, | |
| v2 | |||
| ) | 
macro evaluating to 1 if vectors are equal, 0 otherwise
| #define gf_vec_rev | ( | v | ) | 
macro reversing a vector v = v
| #define gf_vec_diff | ( | res, | |
| v1, | |||
| v2 | |||
| ) | 
macro performing the minus operation res = v1 - v2
| #define gf_vec_add | ( | res, | |
| v1, | |||
| v2 | |||
| ) | 
macro performing the add operation res = v1 + v2
| #define gf_quat_len | ( | v | ) | 
gets the len of a quaternion
| #define gf_quat_norm | ( | v | ) | 
normalizes a quaternion
| #define gf_mx_init | ( | _obj | ) | 
matrix initialization
Inits the matrix to the identity matrix
| #define gf_mx_is_identity | ( | _obj | ) | ((!(_obj).m[1] && !(_obj).m[2] && !(_obj).m[3] && !(_obj).m[4] && !(_obj).m[6] && !(_obj).m[7] && !(_obj).m[8] && !(_obj).m[9] && !(_obj).m[11] && !(_obj).m[12] && !(_obj).m[13] && !(_obj).m[14] && ((_obj).m[0]==FIX_ONE) && ((_obj).m[5]==FIX_ONE)&& ((_obj).m[10]==FIX_ONE)&& ((_obj).m[15]==FIX_ONE)) ? 1 : 0) | 
macro to check if a matrix is the identity matrix
| #define gf_mx_copy | ( | _obj, | |
| from | |||
| ) | 
matrix copy
Copies the matrix _from to the matrix _obj
| anonymous enum | 
Classification types for box/plane position used in gf_bbox_plane_relation
| Enumerator | |
|---|---|
| GF_BBOX_FRONT | box is in front of the plane  | 
| GF_BBOX_INTER | box intersects the plane  | 
| GF_BBOX_BACK | box is back of the plane  | 
get 3D vector length
Gets the length of a 3D vector
| v | the target vector | 
 Here is the call graph for this function:
 Here is the caller graph for this function:get 3D vector length
Gets the length of a 3D vector
| v | the target vector | 
 Here is the caller graph for this function:get 3D vector square length
Gets the square length of a 3D vector
| v | the target vector | 
 Here is the call graph for this function:
 Here is the caller graph for this function:get 3D vector square length
Gets the square length of a 3D vector
| v | the target vector | 
 Here is the caller graph for this function:get 3D vector dot product
Gets the dot product of two vectors
| v1 | first vector | 
| v2 | second vector | 
 Here is the call graph for this function:
 Here is the caller graph for this function:get 3D vector dot product
Gets the dot product of two vectors
| v1 | first vector | 
| v2 | second vector | 
 Here is the caller graph for this function:| void gf_vec_norm | ( | GF_Vec * | v | ) | 
vector normalization
Normalize the vector, eg make its length equal to FIX_ONE
| v | vector to normalize | 
 Here is the call graph for this function:
 Here is the caller graph for this function:vector scaling
Scales a vector by a given amount
| v | vector to scale | 
| f | scale factor | 
 Here is the caller graph for this function:vector scaling
Scales a vector by a given amount
| v | vector to scale | 
| f | scale factor | 
 Here is the caller graph for this function:vector cross product
Gets the cross product of two vectors
| v1 | first vector | 
| v2 | second vector | 
 Here is the call graph for this function:
 Here is the caller graph for this function:vector cross product
Gets the cross product of two vectors
| v1 | first vector | 
| v2 | second vector | 
 Here is the caller graph for this function:quaternion to rotation
Transforms a quaternion to a Rotation, expressed as a 4 dimension vector with x,y,z for axis and q for rotation angle
| quat | the quaternion to transform | 
 Here is the call graph for this function:
 Here is the caller graph for this function:quaternion from rotation
Transforms a Rotation to a quaternion
| rot | the rotation to transform | 
 Here is the caller graph for this function:Inverses a quaternion
| quat | the quaternion to inverse | 
 Here is the call graph for this function:
 Here is the caller graph for this function:quaternion multiplication
Multiplies two quaternions
| q1 | the first quaternion | 
| q2 | the second quaternion | 
 Here is the caller graph for this function:quaternion vector rotating
Rotates a vector with a quaternion
| quat | the quaternion modelizing the rotation | 
| vec | the vector to rotate | 
 Here is the call graph for this function:
 Here is the caller graph for this function:quaternion from axis and cos
Constructs a quaternion from an axis and a cosinus value (shortcut to gf_quat_from_rotation)
| axis | the rotation axis | 
| cos_a | the rotation cosinus value | 
 Here is the call graph for this function:
 Here is the caller graph for this function:quaternion interpolation
Interpolates two quaternions using spherical linear interpolation
| q1 | the first quaternion | 
| q2 | the second quaternion | 
| frac | the fraction of the interpolation, between 0 and FIX_ONE | 
 Here is the caller graph for this function:| void gf_bbox_refresh | ( | GF_BBox * | b | ) | 
updates information of the bounding box based on the edge information
| b | the target bounding box | 
 Here is the call graph for this function:
 Here is the caller graph for this function:builds a bounding box from a 2D rectangle
| box | the bounding box to build | 
| rc | the source rectangle | 
 Here is the call graph for this function:
 Here is the caller graph for this function:builds a rectangle from a 3D bounding box.
| rc | the destination rectangle | 
| box | the source bounding box | 
 Here is the caller graph for this function:bounding box expansion
Checks if a point is inside a bounding box and updates the bounding box to include it if not the case
| box | the bounding box object | 
| pt | the 3D point to check | 
 Here is the caller graph for this function:performs the union of two bounding boxes
| b1 | the first bounding box | 
| b2 | the bounding box to add | 
 Here is the call graph for this function:
 Here is the caller graph for this function:checks if two bounding boxes are equal or not
| b1 | the first bounding box | 
| b2 | the second bounding box | 
 Here is the caller graph for this function:checks if a point is inside a bounding box or not
| box | the bounding box | 
| p | the point to check | 
 Here is the caller graph for this function:get box vertices
Returns the 8 bounding box vertices given the minimum and maximum edge. Vertices are ordered to respect "p-vertex indexes", (vertex from a box closest to plane) and so that n-vertex (vertex from a box farthest from plane) is 7-p_vx_idx
| bmin | minimum edge of the box | 
| bmax | maximum edge of the box | 
| vecs | list of 8 3D points used to store the vertices. | 
 Here is the caller graph for this function:| void gf_mx_from_mx2d | ( | GF_Matrix * | mx, | 
| GF_Matrix2D * | mat2D | ||
| ) | 
matrix constructor from 2D
Initializes a 3D matrix from a 2D matrix.
| mx | the target matrix to initialize | 
| mat2D | the source 2D matrix | 
 Here is the caller graph for this function:matrix equality testing
Tests if two matrices are equal or not.
| mx1 | the first matrix | 
| mx2 | the first matrix | 
 Here is the caller graph for this function:matrix translation
Translates a matrix
| mx | the matrix being transformed. Once the function is called, contains the result matrix | 
| tx | horizontal translation | 
| ty | vertical translation | 
| tz | depth translation | 
 Here is the caller graph for this function:matrix scaling
Scales a matrix
| mx | the matrix being transformed. Once the function is called, contains the result matrix | 
| sx | horizontal translation scaling | 
| sy | vertical translation scaling | 
| sz | depth translation scaling | 
 Here is the caller graph for this function:matrix rotating
Rotates a matrix
| mx | the matrix being transformed. Once the function is called, contains the result matrix | 
| angle | rotation angle in radians | 
| x | horizontal coordinate of rotation axis | 
| y | vertical coordinate of rotation axis | 
| z | depth coordinate of rotation axis | 
 Here is the call graph for this function:
 Here is the caller graph for this function:matrices multiplication
Multiplies a matrix with another one mx = mx*mul
| mx | the matrix being transformed. Once the function is called, contains the result matrix | 
| mul | the matrix to add | 
 Here is the caller graph for this function:| void gf_mx_add_matrix_2d | ( | GF_Matrix * | mx, | 
| GF_Matrix2D * | mat2D | ||
| ) | 
2D matrix multiplication
Adds a 2D affine matrix to a matrix
| mx | the matrix | 
| mat2D | the matrix to premultiply | 
 Here is the caller graph for this function:| void gf_mx_inverse | ( | GF_Matrix * | mx | ) | 
affine matrix inversion
Inverses an affine matrix.
| mx | the matrix to inverse | 
 Here is the caller graph for this function:| void gf_mx_transpose | ( | GF_Matrix * | mx | ) | 
transpose 4x4 matrix
Transposes a 4x4 matrix
| mx | the matrix to transpose | 
 Here is the caller graph for this function:matrix point transformation
Applies a 3D matrix transformation to a 3D point
| mx | transformation matrix | 
| pt | pointer to 3D point. Once the function is called, pt contains the transformed point | 
 Here is the caller graph for this function:matrix rectangle transformation
Applies a 3D matrix transformation to a rectangle, giving the enclosing rectangle of the transformed one.
| _this | transformation matrix | 
| rc | pointer to rectangle. Once the function is called, rc contains the transformed rectangle | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void gf_mx_ortho | ( | GF_Matrix * | mx, | 
| Fixed | left, | ||
| Fixed | right, | ||
| Fixed | bottom, | ||
| Fixed | top, | ||
| Fixed | z_near, | ||
| Fixed | z_far | ||
| ) | 
ortho matrix construction
Creates an orthogonal projection matrix. This assume the NDC Z lies in [-1,1]
| mx | matrix to initialize | 
| left | min horizontal coordinate of viewport | 
| right | max horizontal coordinate of viewport | 
| bottom | min vertical coordinate of viewport | 
| top | max vertical coordinate of viewport | 
| z_near | min depth coordinate of viewport | 
| z_far | max depth coordinate of viewport | 
 Here is the caller graph for this function:| void gf_mx_ortho_reverse_z | ( | GF_Matrix * | mx, | 
| Fixed | left, | ||
| Fixed | right, | ||
| Fixed | bottom, | ||
| Fixed | top, | ||
| Fixed | z_near, | ||
| Fixed | z_far | ||
| ) | 
ortho matrix with reverse Z construction
Creates an orthogonal projection matrix with reverse Z. This assume the NDC Z lies in [0,1], not [-1,1]
| mx | matrix to initialize | 
| left | min horizontal coordinate of viewport | 
| right | max horizontal coordinate of viewport | 
| bottom | min vertical coordinate of viewport | 
| top | max vertical coordinate of viewport | 
| z_near | min depth coordinate of viewport | 
| z_far | max depth coordinate of viewport | 
 Here is the caller graph for this function:perspective matrix construction
Creates a perspective projection matrix. This assume the NDC Z lies in [-1,1]
| mx | matrix to initialize | 
| fov | camera field of view angle in radian | 
| aspect_ratio | viewport aspect ratio | 
| z_near | min depth coordinate of viewport | 
| z_far | max depth coordinate of viewport | 
 Here is the caller graph for this function:| void gf_mx_perspective_reverse_z | ( | GF_Matrix * | mx, | 
| Fixed | fov, | ||
| Fixed | aspect_ratio, | ||
| Fixed | z_near, | ||
| Fixed | z_far | ||
| ) | 
perspective matrix with reverse Z construction
Creates a perspective projection matrix with reverse Z. This assume the NDC Z lies in [0,1]
| mx | matrix to initialize | 
| fov | camera field of view angle in radian | 
| aspect_ratio | viewport aspect ratio | 
| z_near | min depth coordinate of viewport | 
| z_far | max depth coordinate of viewport | 
 Here is the caller graph for this function:creates look matrix
Creates a transformation matrix looking at a given direction from a given point (camera matrix).
| mx | matrix to initialize | 
| position | position | 
| target | look direction | 
| up_vector | vector describing the up direction | 
 Here is the call graph for this function:
 Here is the caller graph for this function:matrix box transformation
Applies a 3D matrix transformation to a bounding box, giving the enclosing box of the transformed one
| mx | transformation matrix | 
| b | pointer to bounding box. Once the function is called, contains the transformed bounding box | 
 Here is the call graph for this function:
 Here is the caller graph for this function:matrix box transformation
Applies a 3D matrix transformation using perspective division to a bounding box, giving the enclosing box of the transformed one
| mx | transformation matrix | 
| b | pointer to bounding box. Once the function is called, contains the transformed bounding box | 
 Here is the call graph for this function:
 Here is the caller graph for this function:matrix box sphere transformation
Applies a 3D matrix transformation to a bounding box, computing only the enclosing sphere of the transformed one.
| mx | transformation matrix | 
| box | pointer to bounding box. Once the function is called, contains the transformed bounding sphere | 
 Here is the call graph for this function:
 Here is the caller graph for this function:non-affine matrix multiplication
Multiplies two non-affine matrices mx = mx*mul
| mat | the target matrix | 
| mul | the matrix we multiply with | 
 Here is the caller graph for this function:non-affine matrix inversion
Inverses a non-affine matrices
| mx | the target matrix | 
 Here is the caller graph for this function:matrix 4D vector transformation
Applies a 3D non-affine matrix transformation to a 4 dimension vector
| mx | transformation matrix | 
| vec | pointer to the vector. Once the function is called, contains the transformed vector | 
 Here is the caller graph for this function:matrix yaw pitch roll decomposition
Extracts yaw, pitch and roll info from a matrix
| mx | the matrix to decompose | 
| yaw | the extracted yaw angle in radians | 
| pitch | the extracted pitch angle in radians | 
| roll | the extracted roll angle in radians | 
 Here is the caller graph for this function:| void gf_mx_decompose | ( | GF_Matrix * | mx, | 
| GF_Vec * | translate, | ||
| GF_Vec * | scale, | ||
| GF_Vec4 * | rotate, | ||
| GF_Vec * | shear | ||
| ) | 
matrix decomposition
Decomposes a matrix into translation, scale, shear and rotate
| mx | the matrix to decompose | 
| translate | the decomposed translation part | 
| scale | the decomposed scaling part | 
| rotate | the decomposed rotation part, expressed as a Rotataion (axis + angle) | 
| shear | the decomposed shear part | 
 Here is the call graph for this function:
 Here is the caller graph for this function:matrix vector rotation
Rotates a vector with a given matrix, ignoring any translation.
| mx | transformation matrix | 
| pt | pointer to 3D vector. Once the function is called, pt contains the transformed vector | 
 Here is the caller graph for this function:| void gf_mx_rotation_matrix_from_vectors | ( | GF_Matrix * | mx, | 
| GF_Vec | x_axis, | ||
| GF_Vec | y_axis, | ||
| GF_Vec | z_axis | ||
| ) | 
matrix initialization from vectors
Inits a matrix to rotate the local axis in the given vectors
| mx | matrix to initialize | 
| x_axis | target normalized X axis | 
| y_axis | target normalized Y axis | 
| z_axis | target normalized Z axis | 
 Here is the caller graph for this function:| void gf_mx2d_from_mx | ( | GF_Matrix2D * | mx2d, | 
| GF_Matrix * | mx | ||
| ) | 
matrix to 2D matrix
Inits a 2D matrix by removing all depth info from a 3D matrix
| mx2d | 2D matrix to initialize | 
| mx | 3D matrix to use | 
 Here is the caller graph for this function:matrix plane transformation
Transorms a plane by a given matrix
| mx | the matrix to use | 
| plane | pointer to 3D plane. Once the function is called, plane contains the transformed plane | 
 Here is the call graph for this function:
 Here is the caller graph for this function:point to plane distance
Gets the distance between a point and a plne
| plane | the plane to use | 
| p | pointer to ^point to check | 
 Here is the call graph for this function:
 Here is the caller graph for this function:closest point on a line
Gets the closest point on a line from a given point in space
| line_pt | a point of the line to test | 
| line_vec | the normalized direction vector of the line | 
| pt | the point to check | 
 Here is the call graph for this function:
 Here is the caller graph for this function:box p-vertex index
Gets the p-vertex index for a given plane. The p-vertex index is the index of the closest vertex of a bounding box to the plane. The vertices of a box are always ordered in GPAC? cf gf_bbox_get_vertices
| p | the plane to check | 
 Here is the caller graph for this function:| Bool gf_plane_intersect_line | ( | GF_Plane * | plane, | 
| GF_Vec * | linepoint, | ||
| GF_Vec * | linevec, | ||
| GF_Vec * | outPoint | ||
| ) | 
plane line intersection
Checks for the intersection of a plane and a line
| plane | plane to test | 
| linepoint | a point on the line to test | 
| linevec | normalized direction vector of the line to test | 
| outPoint | optional pointer to retrieve the intersection point, NULL otherwise | 
 Here is the call graph for this function:
 Here is the caller graph for this function:box-plane relation
Gets the spatial relation between a box and a plane
| box | the box to check | 
| p | the plane to check | 
 Here is the call graph for this function:
 Here is the caller graph for this function:ray constructor
Constructs a ray object
| start | starting point of the ray | 
| end | end point of the ray, or any point on the ray | 
 Here is the call graph for this function:
 Here is the caller graph for this function:matrix ray transformation
Transforms a ray by a given transformation matrix
| mx | the matrix to use | 
| r | pointer to the ray. Once the function is called, contains the transformed ray | 
 Here is the call graph for this function:
 Here is the caller graph for this function:ray box intersection test
Checks if a ray intersects a box or not
| ray | the ray to check | 
| min_edge | the minimum edge of the box to check | 
| max_edge | the maximum edge of the box to check | 
| out_point | optional location of a 3D point to store the intersection, NULL otherwise. | 
 Here is the call graph for this function:
 Here is the caller graph for this function:ray sphere intersection test
Checks if a ray intersects a box or not
| ray | the ray to check | 
| center | the center of the sphere to check. If NULL, the origin (0,0,0)is used | 
| radius | the radius of the sphere to check | 
| out_point | optional location of a 3D point to store the intersection, NULL otherwise | 
 Here is the call graph for this function:
 Here is the caller graph for this function:ray triangle intersection test
Checks if a ray intersects a triangle or not
| ray | the ray to check | 
| v0 | first vertex of the triangle | 
| v1 | second vertex of the triangle | 
| v2 | third vertex of the triangle | 
| dist | optional location of a fixed number to store the intersection distance from ray origin if any, NULL otherwise | 
 Here is the call graph for this function:
 Here is the caller graph for this function: