Hi everyone. The problem is as follows:
I have a line drawn between two vertices and I would like to rotate a gluCylinder so that it is pointing in the same direction (parallel to the line).
I have used the vertex coordinates of the line to calculate the components of a vector and I have calculated the magnitude of this vector (which is the length of the line).
For example: vector = (dx/length, dy/length, dz/length)
With only this information, vector components and magnitude, is it possible to use glRotate to rotate the gluCylinder to match the orientation of the line?
Thanks for any help.