PDA

View Full Version : gluQuadric - rotating.



IainToft
02-05-2002, 02:35 AM
I am having a problem using some gluQuadric's. I would like a cylinder to follow a vector in 3D space. A directional vector, positional vector and length are used. To draw the line I would like the cylinder to follow I would call.
glBegin(GL_LINES);
glVertex3f(position.x, position.y, position.z);
glVertex3f(position.x + direction.x * length, position.y + direction.y * length, position.z + direction.z * length);
glEnd();

The order of transformations seems to be wrong! Any ideas?
Iain