Lines Matching defs:segs
93 int segs = 4;
94 int base_triangles = teeth * segs * 2 * 2;
97 float* c = (float*)malloc(teeth * segs * sizeof(float));
98 float* s = (float*)malloc(teeth * segs * sizeof(float));
99 float* dc = (float*)malloc(teeth * segs * divs * sizeof(float));
100 float* ds = (float*)malloc(teeth * segs * divs * sizeof(float));
101 int num_vertices = teeth * segs * 2 * (3 + 2 * divs);
111 da = (float)(2.0 * M_PI / (teeth * segs * divs));
112 for(i = 0; i < teeth * segs * divs; ++i) {
118 for(i = 0; i < teeth * segs; ++i) {
132 assert(segs == 4);
134 VERT(r1 * c[segs * i], r1 * s[segs * i], z);
135 VERT(r2 * c[segs * i + 1], r2 * s[segs * i + 1], z);
136 VERT(r2 * c[segs * i + 2], r2 * s[segs * i + 2], z);
137 VERT(r1 * c[segs * i + 3], r1 * s[segs * i + 3], z);
140 for(i = 0; i < teeth * segs * divs; ++i) {
145 for(j = i * segs; j < (i + 1) * segs; ++j) {
147 if(nextj == teeth * segs)
152 if(nextk == teeth * segs * divs)
154 indices.poly(teeth * segs + k, j, teeth * segs + nextk);
157 indices.poly(teeth * segs + nextj * divs, j, nextj);
161 indices.base += teeth * segs * (1 + divs);
168 float* coords = (float*)malloc((segs + 1) * 2 * sizeof(float));
175 coords[0] = r1 * c[segs * i];
176 coords[1] = r1 * s[segs * i];
177 coords[2] = r2 * c[segs * i + 1];
178 coords[3] = r2 * s[segs * i + 1];
179 coords[4] = r2 * c[segs * i + 2];
180 coords[5] = r2 * s[segs * i + 2];
181 coords[6] = r1 * c[segs * i + 3];
182 coords[7] = r1 * s[segs * i + 3];
183 coords[8] = r1 * c[segs * next];
184 coords[9] = r1 * s[segs * next];
186 for(int j = 0; j < segs; ++j) {
205 for(i = 0; i < teeth * segs * divs; i++) {
207 if(next == teeth * segs * divs)
218 indices.base += teeth * segs * divs * 2;