| 75 struct { float x, y; }; |
75 struct { float x, y; }; |
| 76 struct { float width, height; }; |
76 struct { float width, height; }; |
| 77 struct { float u, v; }; |
77 struct { float u, v; }; |
| 78 float data[2]; |
78 float data[2]; |
| 79 } asc_vec2f; |
79 } asc_vec2f; |
| 80 #define asc_vec2f_new(x, y, z) (asc_vec2f){{(float)x, (float)y}} |
80 #define asc_vec2f_new(x, y) (asc_vec2f){{(float)x, (float)y}} |
| |
81 #define asc_vec2f_zero (asc_vec2f){{0, 0}} |
| |
82 #define asc_vec2f_one (asc_vec2f){{1, 1}} |
| 81 |
83 |
| 82 typedef union asc_vec3f { |
84 typedef union asc_vec3f { |
| 83 struct { float x, y, z; }; |
85 struct { float x, y, z; }; |
| 84 struct { float width, height, depth; }; |
86 struct { float width, height, depth; }; |
| 85 struct { float pitch, yaw, roll; }; |
87 struct { float pitch, yaw, roll; }; |
| 86 float data[3]; |
88 float data[3]; |
| 87 } asc_vec3f; |
89 } asc_vec3f; |
| 88 #define asc_vec3f_new(x, y, z) (asc_vec3f){{(float)x, (float)y, (float)(z)}} |
90 #define asc_vec3f_new(x, y, z) (asc_vec3f){{(float)x, (float)y, (float)(z)}} |
| |
91 #define asc_vec3f_zero (asc_vec3f){{0, 0, 0}} |
| |
92 #define asc_vec3f_one (asc_vec3f){{1, 1, 1}} |
| 89 |
93 |
| 90 typedef struct asc_col4i { |
94 typedef struct asc_col4i { |
| 91 asc_ubyte red, green, blue, alpha; |
95 asc_ubyte red, green, blue, alpha; |
| 92 } asc_col4i; |
96 } asc_col4i; |
| 93 #define asc_col4i_new(r, g, b, a) (asc_col4i){(asc_ubyte)r, (asc_ubyte)g, (asc_ubyte)b, (asc_ubyte)a} |
97 #define asc_col4i_new(r, g, b, a) (asc_col4i){(asc_ubyte)r, (asc_ubyte)g, (asc_ubyte)b, (asc_ubyte)a} |