169 float xb = -
width*0.5f;
170 float xe =
width*0.5f;
174 float zshadow = -0.005f;
176 float zborder = 0.01f;
179 float zz = zback+zshadow;
182 sg::rgba* mat =
new sg::rgba();
183 mat->color = colorf_black();
186 normal* nm =
new normal;
190 vertices* vtxs =
new vertices;
196 vtxs->add(xb+dx,yb+dy,zz);
197 vtxs->add(xe+dx,yb+dy,zz);
198 vtxs->add(xe+dx,ye+dy,zz);
199 vtxs->add(xb+dx,ye+dy,zz);
203 normal* nm =
new normal;
211 atb_vertices* vtxs =
new atb_vertices;
217 unsigned int ncol = 50;
221 colorf col_beg =
color.value();
224 float dr = (col_end.r()-col_beg.r())/ncol;
225 float dg = (col_end.g()-col_beg.g())/ncol;
226 float db = (col_end.b()-col_beg.b())/ncol;
227 float da = (col_end.a()-col_beg.a())/ncol;
228 vec4f dcol(dr,dg,db,da);
230 colorf col = col_beg;
233 vtxs->add_color(col);
236 vtxs->add_color(col);
238 for(
unsigned int index=0;index<ncol;index++) {
242 vtxs->add_color(col);
243 vtxs->add_color(col);
254 sg::rgba* mat =
new sg::rgba();
258 vertices* vtxs =
new vertices;
270 vtxs->add(xe,yb+r,zz);
271 vtxs->add(xe,ye-r,zz);
274 float angle = dangle;
278 for(
unsigned int i=0;i<nslice;i++,angle+=dangle) {
279 vtxs->add(r*
fcos(angle)+xc,r*
fsin(angle)+yc,zz);
284 vtxs->add(xe-r,ye,zz);
287 vtxs->add(xb+r,ye,zz);
293 for(
unsigned int i=0;i<nslice;i++,angle+=dangle) {
294 vtxs->add(r*
fcos(angle)+xc,r*
fsin(angle)+yc,zz);
299 vtxs->add(xb,ye-r,zz);
302 vtxs->add(xb,yb+r,zz);
308 for(
unsigned int i=0;i<nslice;i++,angle+=dangle) {
309 vtxs->add(r*
fcos(angle)+xc,r*
fsin(angle)+yc,zz);
314 vtxs->add(xb+r,yb,zz);
317 vtxs->add(xe-r,yb,zz);
323 for(
unsigned int i=0;i<nslice;i++,angle+=dangle) {
324 vtxs->add(r*
fcos(angle)+xc,r*
fsin(angle)+yc,zz);
329 vtxs->add(xe,yb+r,zz);
345 sg::rgba* mat =
new sg::rgba();
349 draw_style* ds =
new draw_style;
354 vertices* vtxs =
new vertices;
365 vtxs->add(xe,yb+r,zz);
366 vtxs->add(xe,ye-r,zz);
369 float angle = dangle;
373 for(
unsigned int i=0;i<nslice;i++,angle+=dangle) {
374 vtxs->add(r*
fcos(angle)+xc,r*
fsin(angle)+yc,zz);
379 vtxs->add(xe-r,ye,zz);
382 vtxs->add(xb+r,ye,zz);
388 for(
unsigned int i=0;i<nslice;i++,angle+=dangle) {
389 vtxs->add(r*
fcos(angle)+xc,r*
fsin(angle)+yc,zz);
394 vtxs->add(xb,ye-r,zz);
397 vtxs->add(xb,yb+r,zz);
403 for(
unsigned int i=0;i<nslice;i++,angle+=dangle) {
404 vtxs->add(r*
fcos(angle)+xc,r*
fsin(angle)+yc,zz);
409 vtxs->add(xb+r,yb,zz);
412 vtxs->add(xe-r,yb,zz);
418 for(
unsigned int i=0;i<nslice;i++,angle+=dangle) {
419 vtxs->add(r*
fcos(angle)+xc,r*
fsin(angle)+yc,zz);
424 vtxs->add(xe,yb+r,zz);