17.06.2013 Views

Analisi e sintesi dei gesti comunicativi per gli - Maurizio Mancini

Analisi e sintesi dei gesti comunicativi per gli - Maurizio Mancini

Analisi e sintesi dei gesti comunicativi per gli - Maurizio Mancini

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendice A<br />

//tempmat conterrà la matrice di rotazione finale<br />

tempmat[0][0]=1;<br />

tempmat[0][1]=0;<br />

tempmat[0][2]=0;<br />

tempmat[1][0]=0;<br />

tempmat[1][1]=1;<br />

tempmat[1][2]=0;<br />

tempmat[2][0]=0;<br />

tempmat[2][1]=0;<br />

tempmat[2][2]=1;<br />

tempmat=tempmat*rotmatz;<br />

tempmat=tempmat*rotmaty;<br />

tempmat=tempmat*rotmatx;<br />

//ora <strong>per</strong> ogni vertice della parte del corpo associata a questa giuntura effettuare<br />

//la rotazione<br />

for (i=0; itranslation.x;<br />

center.y=center.y-prevjoint->translation.y;<br />

center.z=center.z-prevjoint->translation.z;<br />

}<br />

//spostarsi nella precedente e ripeti<br />

prevjoint=prevjoint->parent;<br />

}<br />

//l’algoritmo su tutti i vertici di questa giuntura è terminato, passare ora alle giunture<br />

//fi<strong>gli</strong>e<br />

for(i=0; iModelDraw(jointname,totaltranslation,vertex_new,normal_new)<br />

}<br />

112

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!