vrshoot

annotate libs/psys/rndval.h @ 0:b2f14e535253

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 19:58:19 +0200
parents
children
rev   line source
nuclear@0 1 #ifndef RNDVAL_H_
nuclear@0 2 #define RNDVAL_H_
nuclear@0 3
nuclear@0 4 #include <vmath/vmath.h>
nuclear@0 5 #include "pstrack.h"
nuclear@0 6
nuclear@0 7 struct psys_rnd {
nuclear@0 8 float value, range;
nuclear@0 9 };
nuclear@0 10
nuclear@0 11 struct psys_rnd3 {
nuclear@0 12 vec3_t value, range;
nuclear@0 13 };
nuclear@0 14
nuclear@0 15 struct psys_anm_rnd {
nuclear@0 16 struct psys_track value, range;
nuclear@0 17 };
nuclear@0 18
nuclear@0 19 struct psys_anm_rnd3 {
nuclear@0 20 struct psys_track3 value, range;
nuclear@0 21 };
nuclear@0 22
nuclear@0 23 #define PSYS_EVAL_CUR ANM_TIME_INVAL
nuclear@0 24
nuclear@0 25 #ifdef __cplusplus
nuclear@0 26 extern "C" {
nuclear@0 27 #endif
nuclear@0 28
nuclear@0 29 int psys_init_anm_rnd(struct psys_anm_rnd *v);
nuclear@0 30 void psys_destroy_anm_rnd(struct psys_anm_rnd *v);
nuclear@0 31 int psys_init_anm_rnd3(struct psys_anm_rnd3 *v);
nuclear@0 32 void psys_destroy_anm_rnd3(struct psys_anm_rnd3 *v);
nuclear@0 33
nuclear@0 34 void psys_copy_anm_rnd(struct psys_anm_rnd *dest, const struct psys_anm_rnd *src);
nuclear@0 35 void psys_copy_anm_rnd3(struct psys_anm_rnd3 *dest, const struct psys_anm_rnd3 *src);
nuclear@0 36
nuclear@0 37 void psys_set_rnd(struct psys_rnd *r, float val, float range);
nuclear@0 38 void psys_set_rnd3(struct psys_rnd3 *r, vec3_t val, vec3_t range);
nuclear@0 39
nuclear@0 40 void psys_set_anm_rnd(struct psys_anm_rnd *r, anm_time_t tm, float val, float range);
nuclear@0 41 void psys_set_anm_rnd3(struct psys_anm_rnd3 *r, anm_time_t tm, vec3_t val, vec3_t range);
nuclear@0 42
nuclear@0 43 float psys_eval_rnd(struct psys_rnd *r);
nuclear@0 44 vec3_t psys_eval_rnd3(struct psys_rnd3 *r);
nuclear@0 45
nuclear@0 46 float psys_eval_anm_rnd(struct psys_anm_rnd *r, anm_time_t tm);
nuclear@0 47 vec3_t psys_eval_anm_rnd3(struct psys_anm_rnd3 *r, anm_time_t tm);
nuclear@0 48
nuclear@0 49 #ifdef __cplusplus
nuclear@0 50 }
nuclear@0 51 #endif
nuclear@0 52
nuclear@0 53 #endif /* RNDVAL_H_ */