vrshoot

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libs/psys/rndval.h	Sat Feb 01 19:58:19 2014 +0200
     1.3 @@ -0,0 +1,53 @@
     1.4 +#ifndef RNDVAL_H_
     1.5 +#define RNDVAL_H_
     1.6 +
     1.7 +#include <vmath/vmath.h>
     1.8 +#include "pstrack.h"
     1.9 +
    1.10 +struct psys_rnd {
    1.11 +	float value, range;
    1.12 +};
    1.13 +
    1.14 +struct psys_rnd3 {
    1.15 +	vec3_t value, range;
    1.16 +};
    1.17 +
    1.18 +struct psys_anm_rnd {
    1.19 +	struct psys_track value, range;
    1.20 +};
    1.21 +
    1.22 +struct psys_anm_rnd3 {
    1.23 +	struct psys_track3 value, range;
    1.24 +};
    1.25 +
    1.26 +#define PSYS_EVAL_CUR	ANM_TIME_INVAL
    1.27 +
    1.28 +#ifdef __cplusplus
    1.29 +extern "C" {
    1.30 +#endif
    1.31 +
    1.32 +int psys_init_anm_rnd(struct psys_anm_rnd *v);
    1.33 +void psys_destroy_anm_rnd(struct psys_anm_rnd *v);
    1.34 +int psys_init_anm_rnd3(struct psys_anm_rnd3 *v);
    1.35 +void psys_destroy_anm_rnd3(struct psys_anm_rnd3 *v);
    1.36 +
    1.37 +void psys_copy_anm_rnd(struct psys_anm_rnd *dest, const struct psys_anm_rnd *src);
    1.38 +void psys_copy_anm_rnd3(struct psys_anm_rnd3 *dest, const struct psys_anm_rnd3 *src);
    1.39 +
    1.40 +void psys_set_rnd(struct psys_rnd *r, float val, float range);
    1.41 +void psys_set_rnd3(struct psys_rnd3 *r, vec3_t val, vec3_t range);
    1.42 +
    1.43 +void psys_set_anm_rnd(struct psys_anm_rnd *r, anm_time_t tm, float val, float range);
    1.44 +void psys_set_anm_rnd3(struct psys_anm_rnd3 *r, anm_time_t tm, vec3_t val, vec3_t range);
    1.45 +
    1.46 +float psys_eval_rnd(struct psys_rnd *r);
    1.47 +vec3_t psys_eval_rnd3(struct psys_rnd3 *r);
    1.48 +
    1.49 +float psys_eval_anm_rnd(struct psys_anm_rnd *r, anm_time_t tm);
    1.50 +vec3_t psys_eval_anm_rnd3(struct psys_anm_rnd3 *r, anm_time_t tm);
    1.51 +
    1.52 +#ifdef __cplusplus
    1.53 +}
    1.54 +#endif
    1.55 +
    1.56 +#endif	/* RNDVAL_H_ */