title: Turning camera vertically (using Angle-Axis rotation)
body: <p>I am writing a camera class for OpenGL that is using quaternions and Angle-Axis. I managed to make a function for horizontal rotation (it was easy) but I can't manage to write a working function to rotate it vertically. All my attempts end up by camera rotating hell knows what directions... <strong>I need a formula or code how for my vertical rotation function (<em>pitchTurn()</em> in my code).</strong></p>
  
  <pre><code>Here is my current code:
  
  void Camera::yawTurn(const float&amp; angle){
      rotate(angle, 0.0f, 1.0f, 0.0f);
  }
  
  void Camera::pitchTurn(const float&amp; angle){
  // need code here
  }
  
  void Camera::rotate(const float&amp; angle, const float&amp; x, const float&amp; y, const float&amp; z){
      Quaternionf t;
      t.fromAxisAngle(angle, x, y, z);
      q_ *= t;
      q_.normalize();
  }
  </code></pre>
  
  <p>I also wonder if there is any better way to use quaternion for rotations without use Angle-Axis.</p>