9 Ott 2002
Costruzione di Interfacce - Paolo Cignoni
30
Stack di Matrici
v
Il Matrix Stack e’ particolarmente utile
quando si disegnano scene strutturate
v
//
Whole
car
transformation
// eg position of the car on the road
glTranslate(CarPos)
glRotate(CarDirection,0,1,0)
For(i=0;i<4;++i)
{
gl
Push
M
atrix
();
// relative single wheel position
glTranslate(wheelpos[i]);
DrawWheel(i);
glPopMatrix();
}