jyoung77
01-13-2003, 06:10 PM
Hi,
I want to draw a cylinder with top pt at (1., 1., 1.) and an axis pointing to (2., 2., 2.). Could someone help me to finish the following code? Bascially I have the problem with the rotation part? The cylinder should be correctly shown even after the model is rotated. Thanks very much for your help.
glPushMatrix();
glTranslated(1., 1., 1.);
glRotate(?, ?, ?);
gluCylinder(pQuarObj, .0, 1., 1., 100, 100);
glPopMatrix();
I want to draw a cylinder with top pt at (1., 1., 1.) and an axis pointing to (2., 2., 2.). Could someone help me to finish the following code? Bascially I have the problem with the rotation part? The cylinder should be correctly shown even after the model is rotated. Thanks very much for your help.
glPushMatrix();
glTranslated(1., 1., 1.);
glRotate(?, ?, ?);
gluCylinder(pQuarObj, .0, 1., 1., 100, 100);
glPopMatrix();