oculus1
diff src/bezmath.h @ 29:9a973ef0e2a3
fixed the performance issue under MacOSX by replacing glutSolidTeapot (which
uses glEvalMesh) with my own teapot generator.
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 27 Oct 2013 06:31:18 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/bezmath.h Sun Oct 27 06:31:18 2013 +0200 1.3 @@ -0,0 +1,24 @@ 1.4 +#ifndef BEZMATH_H_ 1.5 +#define BEZMATH_H_ 1.6 + 1.7 +struct vec3 { 1.8 + float x, y, z; 1.9 +}; 1.10 + 1.11 +#ifdef __cplusplus 1.12 +extern "C" 1.13 +#endif 1.14 + 1.15 +struct vec3 v3_add(struct vec3 a, struct vec3 b); 1.16 +struct vec3 v3_sub(struct vec3 a, struct vec3 b); 1.17 +struct vec3 v3_cross(struct vec3 a, struct vec3 b); 1.18 +struct vec3 v3_normalize(struct vec3 v); 1.19 + 1.20 +struct vec3 bezier_patch(struct vec3 *cp, float u, float v); 1.21 +struct vec3 bezier_patch_norm(struct vec3 *cp, float u, float v); 1.22 + 1.23 +#ifdef __cplusplus 1.24 +} 1.25 +#endif 1.26 + 1.27 +#endif /* BEZMATH_H_ */