title: How to convert Euler Angles to Front, Up, Right vectors
body: <p>I need a function that given Yaw, Pitch, and Roll, can produce the Front (or Looking At), Right, and Up vectors in "world coordinates".</p>
  
  <p>In my particular world space, starting from the origin (0,0,0), X is positive to the left, Z is positive going away from the viewer/origin, and Y is positive going up.</p>
  
  <p>For for example, given... (angles in degrees)</p>
  
  <ul>
  <li><p>yaw=0, pitch=0, roll=0, 
  the expected output is:</p>
  
  <ul>
  <li>front = (0.0,0.0,1.0)</li>
  <li>right = (-1.0,0.0,0.0)</li>
  <li>up    = (0.0,1.0,0.0)</li>
  </ul></li>
  <li><p>yaw=90, pitch=0, roll=0, 
  the expected output is:</p>
  
  <ul>
  <li>front = (1.0,0.0,0.0)</li>
  <li>right = (0,0,0.0,1.0)</li>
  <li>up    = (0.0,1.0,0.0)</li>
  </ul></li>
  <li><p>yaw=0, pitch=90, roll=0, 
  the expected output is:</p>
  
  <ul>
  <li>front = (0.0,1.0,0.0)</li>
  <li>right = (-1.0,0.0,0.0)</li>
  <li>up    = (0.0,0.0,-1.0)</li>
  </ul></li>
  <li><p>yaw=0, pitch=0, roll=90, 
  the expected output is:</p>
  
  <ul>
  <li>front = (0.0,0.0,1.0)</li>
  <li>right = (0.0,1.0,0.0)</li>
  <li>up    = (1.0,0.0,0.0)</li>
  </ul></li>
  </ul>
  
  <p>The language I'm working in is C++, and I will gladly use glm to solve this problem if that makes the most sense. If I can get there through quaternion's I'm fine with that solution as well, since I've found other tutorials that describe how to get a quaternion from euler angles.</p>