vrshoot

view libs/psys/pstrack.h @ 1:e7ca128b8713

looks nice :)
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 02 Feb 2014 00:35:22 +0200
parents
children
line source
1 #ifndef PSTRACK_H_
2 #define PSTRACK_H_
4 #include <vmath/vmath.h>
5 #include <anim/anim.h>
7 struct psys_track {
8 struct anm_track trk;
10 anm_time_t cache_tm;
11 float cache_val;
12 };
14 struct psys_track3 {
15 struct anm_track x, y, z;
17 anm_time_t cache_tm;
18 vec3_t cache_vec;
19 };
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
25 int psys_init_track(struct psys_track *track);
26 void psys_destroy_track(struct psys_track *track);
28 int psys_init_track3(struct psys_track3 *track);
29 void psys_destroy_track3(struct psys_track3 *track);
31 /* XXX dest must have been initialized first */
32 void psys_copy_track(struct psys_track *dest, const struct psys_track *src);
33 void psys_copy_track3(struct psys_track3 *dest, const struct psys_track3 *src);
35 void psys_eval_track(struct psys_track *track, anm_time_t tm);
36 void psys_set_value(struct psys_track *track, anm_time_t tm, float v);
37 float psys_get_value(struct psys_track *track, anm_time_t tm);
38 float psys_get_cur_value(struct psys_track *track);
40 void psys_eval_track3(struct psys_track3 *track, anm_time_t tm);
41 void psys_set_value3(struct psys_track3 *track, anm_time_t tm, vec3_t v);
42 vec3_t psys_get_value3(struct psys_track3 *track, anm_time_t tm);
43 vec3_t psys_get_cur_value3(struct psys_track3 *track);
45 #ifdef __cplusplus
46 }
47 #endif
49 #endif /* PSTRACK_H_ */