title: C++ OpenGL Line Rotate on its axis
body: <p>trying to use glRotatef to turn lines around on their own axis, like a drill, but unable to figure it out.</p>
  
  <pre><code>|   (p2).__________.(p3)
  |       /  ^-line2
  |      /
  |     /&lt;--line1
  |    /
  |   /
  |  .(p1)
  |_______________
  </code></pre>
  
  <p>I want line 2 to spin around line 1 no matter what angle line 1 is at.</p>
  
  <p>using OpenGLs glRotatef(), has p2 and p3 spin around p1. </p>
  
  <p>Variables I use for ines.</p>
  
  <pre><code> struct Line{
       float x,y,z, angle,length;
       int parent;
    };
    vector&lt;Line&gt;line;
    //Read file set everthing for lines...
  </code></pre>