vrshoot
annotate libs/psys/pstrack.h @ 3:c179c72369be
rename candy->vr
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 03 Feb 2014 08:52:13 +0200 |
parents | |
children |
rev | line source |
---|---|
nuclear@0 | 1 #ifndef PSTRACK_H_ |
nuclear@0 | 2 #define PSTRACK_H_ |
nuclear@0 | 3 |
nuclear@0 | 4 #include <vmath/vmath.h> |
nuclear@0 | 5 #include <anim/anim.h> |
nuclear@0 | 6 |
nuclear@0 | 7 struct psys_track { |
nuclear@0 | 8 struct anm_track trk; |
nuclear@0 | 9 |
nuclear@0 | 10 anm_time_t cache_tm; |
nuclear@0 | 11 float cache_val; |
nuclear@0 | 12 }; |
nuclear@0 | 13 |
nuclear@0 | 14 struct psys_track3 { |
nuclear@0 | 15 struct anm_track x, y, z; |
nuclear@0 | 16 |
nuclear@0 | 17 anm_time_t cache_tm; |
nuclear@0 | 18 vec3_t cache_vec; |
nuclear@0 | 19 }; |
nuclear@0 | 20 |
nuclear@0 | 21 #ifdef __cplusplus |
nuclear@0 | 22 extern "C" { |
nuclear@0 | 23 #endif |
nuclear@0 | 24 |
nuclear@0 | 25 int psys_init_track(struct psys_track *track); |
nuclear@0 | 26 void psys_destroy_track(struct psys_track *track); |
nuclear@0 | 27 |
nuclear@0 | 28 int psys_init_track3(struct psys_track3 *track); |
nuclear@0 | 29 void psys_destroy_track3(struct psys_track3 *track); |
nuclear@0 | 30 |
nuclear@0 | 31 /* XXX dest must have been initialized first */ |
nuclear@0 | 32 void psys_copy_track(struct psys_track *dest, const struct psys_track *src); |
nuclear@0 | 33 void psys_copy_track3(struct psys_track3 *dest, const struct psys_track3 *src); |
nuclear@0 | 34 |
nuclear@0 | 35 void psys_eval_track(struct psys_track *track, anm_time_t tm); |
nuclear@0 | 36 void psys_set_value(struct psys_track *track, anm_time_t tm, float v); |
nuclear@0 | 37 float psys_get_value(struct psys_track *track, anm_time_t tm); |
nuclear@0 | 38 float psys_get_cur_value(struct psys_track *track); |
nuclear@0 | 39 |
nuclear@0 | 40 void psys_eval_track3(struct psys_track3 *track, anm_time_t tm); |
nuclear@0 | 41 void psys_set_value3(struct psys_track3 *track, anm_time_t tm, vec3_t v); |
nuclear@0 | 42 vec3_t psys_get_value3(struct psys_track3 *track, anm_time_t tm); |
nuclear@0 | 43 vec3_t psys_get_cur_value3(struct psys_track3 *track); |
nuclear@0 | 44 |
nuclear@0 | 45 #ifdef __cplusplus |
nuclear@0 | 46 } |
nuclear@0 | 47 #endif |
nuclear@0 | 48 |
nuclear@0 | 49 #endif /* PSTRACK_H_ */ |