zenilib: zenilib/jni/external/lib3ds/src/lib3ds_track.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
lib3ds_track.c File Reference
`#include "lib3ds_impl.h"`

Go to the source code of this file.

## Functions

static int | find_index (Lib3dsTrack *track, float t, float *u)
void | lib3ds_track_eval_bool (Lib3dsTrack *track, int *b, float t)
void | lib3ds_track_eval_float (Lib3dsTrack *track, float *f, float t)
void | lib3ds_track_eval_quat (Lib3dsTrack *track, float q[4], float t)
void | lib3ds_track_eval_vector (Lib3dsTrack *track, float v[3], float t)
void | lib3ds_track_free (Lib3dsTrack *track)
Lib3dsTrack * | lib3ds_track_new (Lib3dsTrackType type, int nkeys)
void | lib3ds_track_read (Lib3dsTrack *track, Lib3dsIo *io)
void | lib3ds_track_resize (Lib3dsTrack *track, int nkeys)
void | lib3ds_track_write (Lib3dsTrack *track, Lib3dsIo *io)
static void | pos_key_setup (int n, Lib3dsKey *pp, Lib3dsKey *pc, Lib3dsKey *pn, float *dd, float *ds)
static void | quat_for_index (Lib3dsTrack *track, int index, float q[4])
static void | rot_key_setup (Lib3dsKey *prev, Lib3dsKey *cur, Lib3dsKey *next, float a[4], float b[4])
static void | setup_segment (Lib3dsTrack *track, int index, Lib3dsKey *pp, Lib3dsKey *p0, Lib3dsKey *p1, Lib3dsKey *pn)
static void | tcb_read (Lib3dsKey *key, Lib3dsIo *io)
void | tcb_write (Lib3dsKey *key, Lib3dsIo *io)
static void | track_eval_linear (Lib3dsTrack *track, float *value, float t)

## Function Documentation

static int find_index | ( | Lib3dsTrack * | track,
|  | float | t,
|  | float * | u
| ) |  |

static

Definition at line 185 of file lib3ds_track.c.

References assert, Lib3dsTrack::flags, Lib3dsKey::frame, i, Lib3dsTrack::keys, LIB3DS_TRACK_REPEAT, and Lib3dsTrack::nkeys.

Referenced by lib3ds_track_eval_bool(), lib3ds_track_eval_quat(), and track_eval_linear().

void lib3ds_track_read | ( | Lib3dsTrack * | track,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 422 of file lib3ds_track.c.

References Lib3dsTrack::flags, Lib3dsKey::frame, i, Lib3dsTrack::keys, lib3ds_io_read_dword(), lib3ds_io_read_float(), lib3ds_io_read_intd(), lib3ds_io_read_vector(), lib3ds_io_read_word(), LIB3DS_TRACK_BOOL, LIB3DS_TRACK_FLOAT, LIB3DS_TRACK_QUAT, lib3ds_track_resize(), LIB3DS_TRACK_VECTOR, tcb_read(), Lib3dsTrack::type, and Lib3dsKey::value.

Referenced by lib3ds_node_read().

void lib3ds_track_write | ( | Lib3dsTrack * | track,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 501 of file lib3ds_track.c.

References Lib3dsTrack::flags, Lib3dsKey::frame, i, Lib3dsTrack::keys, lib3ds_io_write_dword(), lib3ds_io_write_float(), lib3ds_io_write_intd(), lib3ds_io_write_vector(), lib3ds_io_write_word(), LIB3DS_TRACK_BOOL, LIB3DS_TRACK_FLOAT, LIB3DS_TRACK_QUAT, LIB3DS_TRACK_VECTOR, Lib3dsTrack::nkeys, tcb_write(), Lib3dsTrack::type, and Lib3dsKey::value.

Referenced by lib3ds_node_write().

static void pos_key_setup | ( | int | n,
|  | Lib3dsKey * | pp,
|  | Lib3dsKey * | pc,
|  | Lib3dsKey * | pn,
|  | float * | dd,
|  | float * | ds
| ) |  |

static

Definition at line 57 of file lib3ds_track.c.

References assert, Lib3dsKey::bias, bp, Lib3dsKey::cont, cp, fabs(), Lib3dsKey::frame, i, Lib3dsKey::tens, and Lib3dsKey::value.

Referenced by track_eval_linear().

static void quat_for_index | ( | Lib3dsTrack * | track,
|  | int | index,
|  | float | q[4]
| ) |  |

static

Definition at line 173 of file lib3ds_track.c.

References i, Lib3dsTrack::keys, lib3ds_quat_axis_angle(), lib3ds_quat_identity(), lib3ds_quat_mul(), and Lib3dsKey::value.

Referenced by lib3ds_track_eval_quat(), and setup_segment().

static void rot_key_setup | ( | Lib3dsKey * | prev,
|  | Lib3dsKey * | cur,
|  | Lib3dsKey * | next,
|  | float | a[4],
|  | float | b[4]
| ) |  |

static

Definition at line 108 of file lib3ds_track.c.

References assert, Lib3dsKey::bias, bp, Lib3dsKey::cont, cp, fabs(), Lib3dsKey::frame, i, LIB3DS_EPSILON, lib3ds_quat_axis_angle(), lib3ds_quat_copy(), lib3ds_quat_dot(), lib3ds_quat_exp(), lib3ds_quat_ln(), lib3ds_quat_ln_dif(), lib3ds_quat_mul(), lib3ds_quat_neg(), LIB3DS_TWOPI, Lib3dsKey::tens, and Lib3dsKey::value.

Referenced by lib3ds_track_eval_quat().

static void setup_segment | ( | Lib3dsTrack * | track,
|  | int | index,
|  | Lib3dsKey * | pp,
|  | Lib3dsKey * | p0,
|  | Lib3dsKey * | p1,
|  | Lib3dsKey * | pn
| ) |  |

static

Definition at line 225 of file lib3ds_track.c.

References Lib3dsTrack::flags, Lib3dsKey::frame, Lib3dsTrack::keys, lib3ds_quat_axis_angle(), lib3ds_quat_identity(), lib3ds_quat_mul(), LIB3DS_TRACK_QUAT, LIB3DS_TRACK_SMOOTH, Lib3dsTrack::nkeys, quat_for_index(), Lib3dsTrack::type, and Lib3dsKey::value.

Referenced by lib3ds_track_eval_quat(), and track_eval_linear().

static void tcb_read | ( | Lib3dsKey * | key,
|  | Lib3dsIo * | io
| ) |  |

static

Definition at line 401 of file lib3ds_track.c.

References Lib3dsKey::bias, Lib3dsKey::cont, Lib3dsKey::ease_from, Lib3dsKey::ease_to, Lib3dsKey::flags, lib3ds_io_read_float(), lib3ds_io_read_word(), LIB3DS_KEY_USE_BIAS, LIB3DS_KEY_USE_CONT, LIB3DS_KEY_USE_EASE_FROM, LIB3DS_KEY_USE_EASE_TO, LIB3DS_KEY_USE_TENS, and Lib3dsKey::tens.

Referenced by lib3ds_track_read().

void tcb_write | ( | Lib3dsKey * | key,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 480 of file lib3ds_track.c.

References Lib3dsKey::bias, Lib3dsKey::cont, Lib3dsKey::ease_from, Lib3dsKey::ease_to, Lib3dsKey::flags, lib3ds_io_write_float(), lib3ds_io_write_word(), LIB3DS_KEY_USE_BIAS, LIB3DS_KEY_USE_CONT, LIB3DS_KEY_USE_EASE_FROM, LIB3DS_KEY_USE_EASE_TO, LIB3DS_KEY_USE_TENS, and Lib3dsKey::tens.

Referenced by lib3ds_track_write().

static void track_eval_linear | ( | Lib3dsTrack * | track,
|  | float * | value,
|  | float | t
| ) |  |

static

Definition at line 303 of file lib3ds_track.c.

References assert, find_index(), Lib3dsKey::frame, i, Lib3dsTrack::keys, lib3ds_math_cubic_interp(), Lib3dsTrack::nkeys, NULL, pos_key_setup(), pp, setup_segment(), Lib3dsTrack::type, u, and Lib3dsKey::value.

Referenced by lib3ds_track_eval_float(), and lib3ds_track_eval_vector().