libpsys

diff src/rndval.h @ 3:133094e2f5a5

reorganizing
author John Tsiombikas <nuclear@mutantstargoat.com>
date Mon, 26 Sep 2011 18:20:11 +0300
parents
children 613d2bf3ea1f
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/rndval.h	Mon Sep 26 18:20:11 2011 +0300
     1.3 @@ -0,0 +1,43 @@
     1.4 +#ifndef RNDVAL_H_
     1.5 +#define RNDVAL_H_
     1.6 +
     1.7 +#include <vmath.h>
     1.8 +#include <anim/anim.h>
     1.9 +#include "anm_track3.h"
    1.10 +
    1.11 +struct psys_rnd {
    1.12 +	float value, range;
    1.13 +};
    1.14 +
    1.15 +struct psys_rnd3 {
    1.16 +	vec3_t value, range;
    1.17 +};
    1.18 +
    1.19 +struct psys_anm_rnd {
    1.20 +	struct anm_track value, range;
    1.21 +	/* current cache */
    1.22 +	anm_time_t cur_tm;
    1.23 +	struct psys_rnd cur;
    1.24 +};
    1.25 +
    1.26 +struct psys_anm_rnd3 {
    1.27 +	struct anm_track3 value, range;
    1.28 +	/* current cache */
    1.29 +	anm_time_t cur_tm;
    1.30 +	struct psys_rnd3 cur;
    1.31 +};
    1.32 +
    1.33 +
    1.34 +int psys_init_anm_rnd(struct psys_anm_rnd *v);
    1.35 +void psys_destroy_anm_rnd(struct psys_anm_rnd *v);
    1.36 +int psys_init_anm_rnd3(struct psys_anm_rnd3 *v);
    1.37 +void psys_destroy_anm_rnd3(struct psys_anm_rnd3 *v);
    1.38 +
    1.39 +float psys_eval_rnd(struct psys_rnd *r);
    1.40 +vec3_t psys_eval_rnd3(struct psys_rnd3 *r);
    1.41 +
    1.42 +float psys_eval_anm_rnd(struct psys_anm_rnd *r, anm_time_t tm);
    1.43 +vec3_t psys_eval_anm_rnd3(struct psys_anm_rnd3 *r, anm_time_t tm);
    1.44 +
    1.45 +
    1.46 +#endif	/* RNDVAL_H_ */