aboutsummaryrefslogtreecommitdiff
path: root/visualization/qmpvirtualpiano3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'visualization/qmpvirtualpiano3d.cpp')
-rw-r--r--visualization/qmpvirtualpiano3d.cpp268
1 files changed, 173 insertions, 95 deletions
diff --git a/visualization/qmpvirtualpiano3d.cpp b/visualization/qmpvirtualpiano3d.cpp
index 458d3ef..dca9086 100644
--- a/visualization/qmpvirtualpiano3d.cpp
+++ b/visualization/qmpvirtualpiano3d.cpp
@@ -7,11 +7,12 @@ const double gap[]={WK_TALWIDTH/2*0.92,WK_TALWIDTH/2*1.23,WK_TALWIDTH/2*1.2,
WK_TALWIDTH/2*1.3,WK_TALWIDTH/2*0.85,WK_TALWIDTH*1.1};
qmpVirtualPiano3D::qmpVirtualPiano3D()
{
- buildKeys();memset(traveld,0,sizeof(traveld));
+ ebuf=new smEntity3DBuffer();buildKeys();memset(traveld,0,sizeof(traveld));
}
qmpVirtualPiano3D::~qmpVirtualPiano3D()
{
delete wkcf;delete wkeb;delete wkd;delete wkg;delete wka;delete bk;
+ wkcf=wkeb=wkd=wkg=wka=bk=NULL;delete ebuf;ebuf=NULL;
}
void qmpVirtualPiano3D::render(smvec3d p)
{
@@ -22,26 +23,27 @@ void qmpVirtualPiano3D::render(smvec3d p)
switch(i%12)
{
case 0:case 5:
- wkcf->drawWithTransformation(m,p);
+ if(wkcf)ebuf->addTransformedEntity(wkcf,m,p);
break;
case 2:
- wkd->drawWithTransformation(m,p);
+ if(wkd)ebuf->addTransformedEntity(wkd,m,p);
break;
case 4:case 11:
- wkeb->drawWithTransformation(m,p);
+ if(wkeb)ebuf->addTransformedEntity(wkeb,m,p);
break;
case 7:
- wkg->drawWithTransformation(m,p);
+ if(wkg)ebuf->addTransformedEntity(wkg,m,p);
break;
case 9:
- wka->drawWithTransformation(m,p);
+ if(wka)ebuf->addTransformedEntity(wka,m,p);
break;
case 1:case 3:case 6:case 8:case 10:
- bk->drawWithTransformation(m,p);
+ if(bk)ebuf->addTransformedEntity(bk,m,p);
break;
}
p.x+=gap[i%12];
}
+ ebuf->drawBatch();
}
void qmpVirtualPiano3D::setKeyTravelDist(int k,double td)
{traveld[k]=td;}
@@ -49,93 +51,169 @@ void qmpVirtualPiano3D::setKeyTravelDist(int k,double td)
void qmpVirtualPiano3D::buildKeys()
{
wkcf=new smEntity3D();wkeb=new smEntity3D();wkd=new smEntity3D();
- wkg=new smEntity3D();wka=new smEntity3D();
- smQuad q;q.blend=BLEND_ALPHABLEND;q.tex=0;
- for(int i=0;i<4;++i)q.v[i].col=0xFFFFFFFF,q.v[i].tx=q.v[i].ty=0;
- //TAL
- configureVertex(q.v,0,-WK_TALWIDTH/2,WK_PRELEN ,WK_HEIGHT);
- configureVertex(q.v,1, WK_TALWIDTH/2,WK_PRELEN ,WK_HEIGHT);
- configureVertex(q.v,2, WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,WK_HEIGHT);
- configureVertex(q.v,3,-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,WK_HEIGHT);
- wkcf->pushSurface(q);wkeb->pushSurface(q);wkd->pushSurface(q);
- wkg->pushSurface(q);wka->pushSurface(q);
- wkcf->pushCube(
- smvec3d(-WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT),
- smvec3d( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN-WK_WING,0),
- 0xFFCCCCCC,30);
- wkeb->pushCube(
- smvec3d(-WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT),
- smvec3d( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN-WK_WING,0),
- 0xFFCCCCCC,30);
- wkd->pushCube(
- smvec3d(-WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT),
- smvec3d( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN-WK_WING,0),
- 0xFFCCCCCC,30);
- wkg->pushCube(
- smvec3d(-WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT),
- smvec3d( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN-WK_WING,0),
- 0xFFCCCCCC,30);
- wka->pushCube(
- smvec3d(-WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT),
- smvec3d( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN-WK_WING,0),
- 0xFFCCCCCC,30);
- //PRE
- configureVertex(q.v,0,-WK_TALWIDTH/2,0 ,WK_HEIGHT);
- configureVertex(q.v,1, WK_TALWIDTH/2,0 ,WK_HEIGHT);
- configureVertex(q.v,2, WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT);
- configureVertex(q.v,3,-WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT);
- wkcf->pushSurface(q);wkeb->pushSurface(q);wkd->pushSurface(q);
- wkg->pushSurface(q);wka->pushSurface(q);
- wkcf->pushCube(
- smvec3d(-WK_TALWIDTH/2,0,WK_HEIGHT),
- smvec3d(-WK_TALWIDTH/2+WK_PREWIDTH,WK_PRELEN,0),
- 0xFFCCCCCC,46);
- wkeb->pushCube(
- smvec3d(WK_TALWIDTH/2-WK_PREWIDTH,0,WK_HEIGHT),
- smvec3d(WK_TALWIDTH/2,WK_PRELEN,0),
- 0xFFCCCCCC,46);
- wkd->pushCube(
- smvec3d(-WK_TALWIDTH/2+(WK_TALWIDTH-WK_PREWIDTH)/2,0,WK_HEIGHT),
- smvec3d( WK_TALWIDTH/2-(WK_TALWIDTH-WK_PREWIDTH)/2,WK_PRELEN,0),
- 0xFFCCCCCC,46);
- wkg->pushCube(
- smvec3d(-WK_TALWIDTH/2+WK_WING+WK_TALWIDTH/12,0,WK_HEIGHT),
- smvec3d(-WK_TALWIDTH/2+WK_WING+WK_TALWIDTH/12+WK_PREWIDTH,WK_PRELEN,0),
- 0xFFCCCCCC,46);
- wka->pushCube(
- smvec3d(WK_TALWIDTH/2-WK_WING-WK_TALWIDTH/24,0,WK_HEIGHT),
- smvec3d(WK_TALWIDTH/2-WK_WING-WK_TALWIDTH/24-WK_PREWIDTH,WK_PRELEN,0),
- 0xFFCCCCCC,46);
+ wkg=new smEntity3D();wka=new smEntity3D();bk=new smEntity3D();
+ wkcf->addVerices(19,
+ makeVertex(-WK_TALWIDTH/2,0,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2+WK_PREWIDTH,0,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2+WK_PREWIDTH,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN+WK_WING,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN+WK_WING,WK_HEIGHT,0xFFFFFFFF,0,0),////
+ makeVertex(-WK_TALWIDTH/2,0,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2+WK_PREWIDTH,0,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2+WK_PREWIDTH,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,0,0,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2+WK_PREWIDTH,0,0,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2+WK_PREWIDTH,WK_PRELEN,0,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN,0,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,0,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,0,0xFFCCCCCC,0,0));
+ wkcf->addIndices(48,
+ 0,1,3, 1,2,3, 3,4,6, 4,5,6,
+ 7,8,13, 8,13,14, 8,14,15, 8,9,15,
+ 9,10,15, 10,15,16, 10,11,17, 10,16,17,
+ 11,12,18, 11,17,18, 18,12,13, 12,13,7);
- bk=new smEntity3D();
- for(int i=0;i<4;++i)q.v[i].col=0xFF000000;
- bk->pushCube(
- smvec3d(-BK_WIDTH/2,0,BK_HEIGHT+BK_BOTTOM),
- smvec3d( BK_WIDTH/2,BK_PRELEN,BK_BOTTOM),
- 0xFF000000,47);
- configureVertex(q.v,0,-BK_WIDTH/2,BK_PRELEN,BK_HEIGHT+BK_BOTTOM);
- configureVertex(q.v,1, BK_WIDTH/2,BK_PRELEN,BK_HEIGHT+BK_BOTTOM);
- configureVertex(q.v,2, BK_WIDTH/2,WK_PRELEN*0.95,BK_DBOTTOM+BK_BOTTOM);
- configureVertex(q.v,3,-BK_WIDTH/2,WK_PRELEN*0.95,BK_DBOTTOM+BK_BOTTOM);
- bk->pushSurface(q);
- configureVertex(q.v,0,-BK_WIDTH/2,BK_PRELEN,BK_HEIGHT+BK_BOTTOM);
- configureVertex(q.v,1,-BK_WIDTH/2,WK_PRELEN*0.95,BK_DBOTTOM+BK_BOTTOM);
- configureVertex(q.v,2,-BK_WIDTH/2,WK_PRELEN*0.95,BK_BOTTOM);
- configureVertex(q.v,3,-BK_WIDTH/2,BK_PRELEN,BK_BOTTOM);
- bk->pushSurface(q);
- configureVertex(q.v,0, BK_WIDTH/2,BK_PRELEN,BK_HEIGHT+BK_BOTTOM);
- configureVertex(q.v,1, BK_WIDTH/2,WK_PRELEN*0.95,BK_DBOTTOM+BK_BOTTOM);
- configureVertex(q.v,2, BK_WIDTH/2,WK_PRELEN*0.95,BK_BOTTOM);
- configureVertex(q.v,3, BK_WIDTH/2,BK_PRELEN,BK_BOTTOM);
- bk->pushSurface(q);
- configureVertex(q.v,0,-BK_WIDTH/2,WK_PRELEN*0.95,BK_DBOTTOM+BK_BOTTOM);
- configureVertex(q.v,1, BK_WIDTH/2,WK_PRELEN*0.95,BK_DBOTTOM+BK_BOTTOM);
- configureVertex(q.v,2, BK_WIDTH/2,WK_PRELEN*0.95,BK_BOTTOM);
- configureVertex(q.v,3,-BK_WIDTH/2,WK_PRELEN*0.95,BK_BOTTOM);
- bk->pushSurface(q);
- configureVertex(q.v,0,-BK_WIDTH/2,BK_PRELEN,BK_BOTTOM);
- configureVertex(q.v,1, BK_WIDTH/2,BK_PRELEN,BK_BOTTOM);
- configureVertex(q.v,2, BK_WIDTH/2,WK_PRELEN*0.95,BK_BOTTOM);
- configureVertex(q.v,3,-BK_WIDTH/2,WK_PRELEN*0.95,BK_BOTTOM);
- bk->pushSurface(q);
+ wkeb->addVerices(19,
+ makeVertex( WK_TALWIDTH/2,0,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex( WK_TALWIDTH/2-WK_PREWIDTH,0,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex( WK_TALWIDTH/2-WK_PREWIDTH,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN+WK_WING,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN+WK_WING,WK_HEIGHT,0xFFFFFFFF,0,0),////
+ makeVertex( WK_TALWIDTH/2,0,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2-WK_PREWIDTH,0,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2-WK_PREWIDTH,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,0,0,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2-WK_PREWIDTH,0,0,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2-WK_PREWIDTH,WK_PRELEN,0,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN,0,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,0,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,0,0xFFCCCCCC,0,0));
+ wkeb->addIndices(48,
+ 0,1,3, 1,2,3, 3,4,6, 4,5,6,
+ 7,8,13, 8,13,14, 8,14,15, 8,9,15,
+ 9,10,15, 10,15,16, 10,11,17, 10,16,17,
+ 11,12,18, 11,17,18, 18,12,13, 12,13,7);
+
+ wkd->addVerices(24,
+ makeVertex(-WK_TALWIDTH/2+(WK_TALWIDTH-WK_PREWIDTH)/2,0,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex( WK_TALWIDTH/2-(WK_TALWIDTH-WK_PREWIDTH)/2,0,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex( WK_TALWIDTH/2-(WK_TALWIDTH-WK_PREWIDTH)/2,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2+(WK_TALWIDTH-WK_PREWIDTH)/2,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN+WK_WING,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN+WK_WING,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),////
+ makeVertex(-WK_TALWIDTH/2+(WK_TALWIDTH-WK_PREWIDTH)/2,0,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2-(WK_TALWIDTH-WK_PREWIDTH)/2,0,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2-(WK_TALWIDTH-WK_PREWIDTH)/2,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2+(WK_TALWIDTH-WK_PREWIDTH)/2,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),////
+ makeVertex(-WK_TALWIDTH/2+(WK_TALWIDTH-WK_PREWIDTH)/2,0,0,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2-(WK_TALWIDTH-WK_PREWIDTH)/2,0,0,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2-(WK_TALWIDTH-WK_PREWIDTH)/2,WK_PRELEN,0,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2+(WK_TALWIDTH-WK_PREWIDTH)/2,WK_PRELEN,0,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN,0,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,0,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,0,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN,0,0xFFCCCCCC,0,0));
+ wkd->addIndices(60,
+ 0,1,2, 0,2,3, 4,5,6, 4,6,7,
+ 8,9,16, 9,16,17, 9,10,18, 9,17,18,
+ 10,12,18, 12,18,19, 12,13,20, 12,19,20,
+ 13,14,21, 13,20,21, 14,15,21, 15,21,22,
+ 15,11,22, 11,22,23, 11,23,8, 23,16,8);
+
+ wkg->addVerices(24,
+ makeVertex(-WK_TALWIDTH/2+WK_WING+WK_TALWIDTH/12,0,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2+WK_WING+WK_TALWIDTH/12+WK_PREWIDTH,0,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2+WK_WING+WK_TALWIDTH/12+WK_PREWIDTH,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2+WK_WING+WK_TALWIDTH/12,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN+WK_WING,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN+WK_WING,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),////
+ makeVertex(-WK_TALWIDTH/2+WK_WING+WK_TALWIDTH/12,0,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2+WK_WING+WK_TALWIDTH/12+WK_PREWIDTH,0,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2+WK_WING+WK_TALWIDTH/12+WK_PREWIDTH,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2+WK_WING+WK_TALWIDTH/12,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),////
+ makeVertex(-WK_TALWIDTH/2+WK_WING+WK_TALWIDTH/12,0,0,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2+WK_WING+WK_TALWIDTH/12+WK_PREWIDTH,0,0,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2+WK_WING+WK_TALWIDTH/12+WK_PREWIDTH,WK_PRELEN,0,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2+WK_WING+WK_TALWIDTH/12,WK_PRELEN,0,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN,0,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,0,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,0,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN,0,0xFFCCCCCC,0,0));
+ wkg->addIndices(60,
+ 0,1,2, 0,2,3, 4,5,6, 4,6,7,
+ 8,9,16, 9,16,17, 9,10,18, 9,17,18,
+ 10,12,18, 12,18,19, 12,13,20, 12,19,20,
+ 13,14,21, 13,20,21, 14,15,21, 15,21,22,
+ 15,11,22, 11,22,23, 11,23,8, 23,16,8);
+
+ wka->addVerices(24,
+ makeVertex(WK_TALWIDTH/2-WK_WING-WK_TALWIDTH/24-WK_PREWIDTH,0,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(WK_TALWIDTH/2-WK_WING-WK_TALWIDTH/24,0,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(WK_TALWIDTH/2-WK_WING-WK_TALWIDTH/24,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(WK_TALWIDTH/2-WK_WING-WK_TALWIDTH/24-WK_PREWIDTH,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN+WK_WING,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN+WK_WING,WK_HEIGHT,0xFFFFFFFF,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFFFFFFF,0,0),////
+ makeVertex(WK_TALWIDTH/2-WK_WING-WK_TALWIDTH/24-WK_PREWIDTH,0,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(WK_TALWIDTH/2-WK_WING-WK_TALWIDTH/24,0,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(WK_TALWIDTH/2-WK_WING-WK_TALWIDTH/24,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(WK_TALWIDTH/2-WK_WING-WK_TALWIDTH/24-WK_PREWIDTH,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,WK_HEIGHT,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN,WK_HEIGHT,0xFFCCCCCC,0,0),////
+ makeVertex(WK_TALWIDTH/2-WK_WING-WK_TALWIDTH/24-WK_PREWIDTH,0,0,0xFFCCCCCC,0,0),
+ makeVertex(WK_TALWIDTH/2-WK_WING-WK_TALWIDTH/24,0,0,0xFFCCCCCC,0,0),
+ makeVertex(WK_TALWIDTH/2-WK_WING-WK_TALWIDTH/24,WK_PRELEN,0,0xFFCCCCCC,0,0),
+ makeVertex(WK_TALWIDTH/2-WK_WING-WK_TALWIDTH/24-WK_PREWIDTH,WK_PRELEN,0,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN,0,0xFFCCCCCC,0,0),
+ makeVertex( WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,0,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN+WK_TALLEN,0,0xFFCCCCCC,0,0),
+ makeVertex(-WK_TALWIDTH/2,WK_PRELEN,0,0xFFCCCCCC,0,0));
+ wka->addIndices(60,
+ 0,1,2, 0,2,3, 4,5,6, 4,6,7,
+ 8,9,16, 9,16,17, 9,10,18, 9,17,18,
+ 10,12,18, 12,18,19, 12,13,20, 12,19,20,
+ 13,14,21, 13,20,21, 14,15,21, 15,21,22,
+ 15,11,22, 11,22,23, 11,23,8, 23,16,8);
+
+ bk->addVerices(10,
+ makeVertex(-BK_WIDTH/2,0,BK_HEIGHT+BK_BOTTOM,0xFF000000,0,0),
+ makeVertex( BK_WIDTH/2,0,BK_HEIGHT+BK_BOTTOM,0xFF000000,0,0),
+ makeVertex( BK_WIDTH/2,BK_PRELEN,BK_HEIGHT+BK_BOTTOM,0xFF000000,0,0),
+ makeVertex(-BK_WIDTH/2,BK_PRELEN,BK_HEIGHT+BK_BOTTOM,0xFF000000,0,0),
+ makeVertex(-BK_WIDTH/2,WK_PRELEN*0.95,BK_DBOTTOM+BK_BOTTOM,0xFF000000,0,0),
+ makeVertex( BK_WIDTH/2,WK_PRELEN*0.95,BK_DBOTTOM+BK_BOTTOM,0xFF000000,0,0),
+ makeVertex( BK_WIDTH/2,WK_PRELEN*0.95,BK_BOTTOM,0xFF000000,0,0),
+ makeVertex(-BK_WIDTH/2,WK_PRELEN*0.95,BK_BOTTOM,0xFF000000,0,0),
+ makeVertex(-BK_WIDTH/2,0,BK_BOTTOM,0xFF000000,0,0),
+ makeVertex( BK_WIDTH/2,0,BK_BOTTOM,0xFF000000,0,0));
+ bk->addIndices(48,
+ 0,1,3, 1,2,3, 2,3,4, 2,4,5,
+ 4,5,7, 5,6,7, 6,7,8, 6,8,9,
+ 0,1,8, 1,8,9, 2,5,6, 2,6,9,
+ 2,9,1, 3,4,7, 3,7,8, 3,8,0);
}