Original Post
I''ve set up a quad which is rotated through a quaternion ! The problem is that it rotates along it''s center, and I''ve not been able to set up the object rotation along another point (let''s say somewhere up on the Y axis, for example). This is the code of the draw function, somebody can help me ? Thanks !
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0,-20,-100);
glRotatef(-90,1,0,0);
glPushMatrix();
dudes_quat.getMatrix( dudes_matrix );
glMultMatrixf(dudes_matrix);
glColor3f(0.5f,0.5f,1.0f);
glBegin(GL_QUADS);
glVertex3f(-10.0f, 10.0f, 2.0f);
glVertex3f( 10.0f, 10.0f, 2.0f);
glVertex3f( 10.0f,-10.0f, 2.0f);
glVertex3f(-10.0f,-10.0f, 2.0f);
glEnd();
glPopMatrix();