libgpac
Documentation of the core library of GPAC
mpeg4_animators.c File Reference
#include <gpac/internal/scenegraph_dev.h>
#include <gpac/nodes_mpeg4.h>
+ Include dependency graph for mpeg4_animators.c:

Data Structures

struct  anim_nurbs
 
struct  AnimatorStack
 

Enumerations

enum  {
  ANIM_LINE , ANIM_QUADRATIC , ANIM_CUBIC , ANIM_NURBS ,
  ANIM_SPLINE
}
 
enum  {
  ANIM_DEFAULT , ANIM_DISCRETE , ANIM_LINEAR , ANIM_PACED ,
  ANIM_VELOCITY
}
 

Functions

static Fixed Interpolate (Fixed keyValue1, Fixed keyValue2, Fixed fraction)
 
static Fixed GetInterpolateFraction (Fixed key1, Fixed key2, Fixed fraction)
 
Fixed do_bisection (Fixed t, SFVec2f a, SFVec2f b, SFVec2f c, SFVec2f d)
 
static void anurbs_reset (anim_nurbs *nurbs)
 
static void anurbs_init (anim_nurbs *nurbs, u32 type, u32 nCtrl, u32 nKnots, Fixed *knots, u32 nWeight, Fixed *weights)
 
static void anurbs_basis (anim_nurbs *nurbs, s32 span, Fixed t)
 
static s32 anurbs_find_span (anim_nurbs *nurbs, Fixed u)
 
static SFVec3f anurbs_get_vec3f (anim_nurbs *nurbs, s32 span, SFVec3f *pts)
 
static SFVec2f anurbs_get_vec2f (anim_nurbs *nurbs, s32 span, SFVec2f *pts)
 
static Fixed anurbs_get_float (anim_nurbs *nurbs, s32 span, Fixed *vals)
 
static void Anim_Destroy (GF_Node *node, void *rs, Bool is_destroy)
 
static void Animator_Update (AnimatorStack *stack, u32 keyValueType, u32 nCtrl, MFVec2f *keySpline, u32 nWeight, Fixed *weights)
 
static Bool anim_check_frac (Fixed frac, SFVec2f *fromTo)
 
static void PA_Update (M_PositionAnimator *pa, AnimatorStack *stack)
 
static void PA_SetFraction (GF_Node *node, GF_Route *route)
 
void PA_Modified (GF_Node *node, GF_FieldInfo *field)
 
void PA_Init (GF_Node *n)
 
static void PA2D_Update (M_PositionAnimator2D *pa, AnimatorStack *stack)
 
static void PA2D_SetFraction (GF_Node *node, GF_Route *route)
 
void PA2D_Modified (GF_Node *node, GF_FieldInfo *field)
 
void PA2D_Init (GF_Node *n)
 
static void SA_Update (M_ScalarAnimator *sa, AnimatorStack *stack)
 
void SA_SetFraction (GF_Node *node, GF_Route *route)
 
void SA_Modified (GF_Node *node, GF_FieldInfo *field)
 
void SA_Init (GF_Node *n)
 

Variables

static Fixed cubic_knots [] = {0,0,0,0,FIX_ONE,FIX_ONE,FIX_ONE,FIX_ONE}
 
static Fixed quadratic_knots [] = {0,0,0,FIX_ONE,FIX_ONE,FIX_ONE}
 

Data Structure Documentation

◆ anim_nurbs

struct anim_nurbs
Data Fields
Fixed * knots
Fixed * weights
Fixed * n
Fixed * left
Fixed * right
u32 nknots
u32 nweights
u32 npoints
u32 p
u32 type
Bool valid

◆ AnimatorStack

struct AnimatorStack
+ Collaboration diagram for AnimatorStack:
Data Fields
Bool is_dirty
u32 anim_type
Fixed length
SFVec2f a
SFVec2f b
SFVec2f c
SFVec2f d
anim_nurbs anurbs

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ANIM_LINE 
ANIM_QUADRATIC 
ANIM_CUBIC 
ANIM_NURBS 
ANIM_SPLINE 

◆ anonymous enum

anonymous enum
Enumerator
ANIM_DEFAULT 
ANIM_DISCRETE 
ANIM_LINEAR 
ANIM_PACED 
ANIM_VELOCITY 

Function Documentation

◆ Interpolate()

static Fixed Interpolate ( Fixed  keyValue1,
Fixed  keyValue2,
Fixed  fraction 
)
static
+ Here is the caller graph for this function:

◆ GetInterpolateFraction()

static Fixed GetInterpolateFraction ( Fixed  key1,
Fixed  key2,
Fixed  fraction 
)
static
+ Here is the caller graph for this function:

◆ do_bisection()

Fixed do_bisection ( Fixed  t,
SFVec2f  a,
SFVec2f  b,
SFVec2f  c,
SFVec2f  d 
)
+ Here is the caller graph for this function:

◆ anurbs_reset()

static void anurbs_reset ( anim_nurbs nurbs)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ anurbs_init()

static void anurbs_init ( anim_nurbs nurbs,
u32  type,
u32  nCtrl,
u32  nKnots,
Fixed knots,
u32  nWeight,
Fixed weights 
)
static
+ Here is the caller graph for this function:

◆ anurbs_basis()

static void anurbs_basis ( anim_nurbs nurbs,
s32  span,
Fixed  t 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ anurbs_find_span()

static s32 anurbs_find_span ( anim_nurbs nurbs,
Fixed  u 
)
static
+ Here is the caller graph for this function:

◆ anurbs_get_vec3f()

static SFVec3f anurbs_get_vec3f ( anim_nurbs nurbs,
s32  span,
SFVec3f pts 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ anurbs_get_vec2f()

static SFVec2f anurbs_get_vec2f ( anim_nurbs nurbs,
s32  span,
SFVec2f pts 
)
static
+ Here is the caller graph for this function:

◆ anurbs_get_float()

static Fixed anurbs_get_float ( anim_nurbs nurbs,
s32  span,
Fixed vals 
)
static
+ Here is the caller graph for this function:

◆ Anim_Destroy()

static void Anim_Destroy ( GF_Node node,
void *  rs,
Bool  is_destroy 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Animator_Update()

static void Animator_Update ( AnimatorStack stack,
u32  keyValueType,
u32  nCtrl,
MFVec2f keySpline,
u32  nWeight,
Fixed weights 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ anim_check_frac()

static Bool anim_check_frac ( Fixed  frac,
SFVec2f fromTo 
)
static
+ Here is the caller graph for this function:

◆ PA_Update()

static void PA_Update ( M_PositionAnimator *  pa,
AnimatorStack stack 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PA_SetFraction()

static void PA_SetFraction ( GF_Node node,
GF_Route *  route 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PA_Modified()

void PA_Modified ( GF_Node node,
GF_FieldInfo field 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PA_Init()

void PA_Init ( GF_Node n)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PA2D_Update()

static void PA2D_Update ( M_PositionAnimator2D *  pa,
AnimatorStack stack 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PA2D_SetFraction()

static void PA2D_SetFraction ( GF_Node node,
GF_Route *  route 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PA2D_Modified()

void PA2D_Modified ( GF_Node node,
GF_FieldInfo field 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PA2D_Init()

void PA2D_Init ( GF_Node n)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SA_Update()

static void SA_Update ( M_ScalarAnimator *  sa,
AnimatorStack stack 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SA_SetFraction()

void SA_SetFraction ( GF_Node node,
GF_Route *  route 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SA_Modified()

void SA_Modified ( GF_Node node,
GF_FieldInfo field 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SA_Init()

void SA_Init ( GF_Node n)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ cubic_knots

Fixed cubic_knots[] = {0,0,0,0,FIX_ONE,FIX_ONE,FIX_ONE,FIX_ONE}
static

◆ quadratic_knots

Fixed quadratic_knots[] = {0,0,0,FIX_ONE,FIX_ONE,FIX_ONE}
static