libgoatvr
view src/opt.h @ 27:e819f63535b3
adding stub doc pages
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 30 Mar 2015 05:51:22 +0300 |
parents | ded3d0a74e19 |
children |
line source
1 #ifndef OPT_H_
2 #define OPT_H_
4 enum opt_type { OTYPE_INT, OTYPE_FLOAT, OTYPE_VEC };
6 struct option {
7 enum opt_type type;
8 int ival;
9 float fval;
10 float vval[4];
11 };
13 void *create_options(void);
14 void destroy_options(void *optdb);
16 void set_option_int(void *optdb, const char *key, int val);
17 void set_option_float(void *optdb, const char *key, float val);
18 void set_option_vec(void *optdb, const char *key, float *val);
19 /* convenience functions */
20 void set_option_vec3f(void *optdb, const char *key, float x, float y, float z);
21 void set_option_vec4f(void *optdb, const char *key, float x, float y, float z, float w);
23 int get_option_int(void *optdb, const char *key, int *val);
24 int get_option_float(void *optdb, const char *key, float *val);
25 int get_option_vec(void *optdb, const char *key, float *val);
27 #endif /* OPT_H_ */