Quaterniond.lookAlong

Apply a rotation to this quaternion that maps the given direction to the positive Z axis. <p> Because there are multiple possibilities for such a rotation, this method will choose the one that ensures the given up direction to remain parallel to the plane spanned by the <code>up</code> and <code>dir</code> vectors. <p> If <code>Q</code> is <code>this</code> quaternion and <code>R</code> the quaternion representing the specified rotation, then the new quaternion will be <code>Q * R</code>. So when transforming a vector <code>v</code> with the new quaternion by using <code>Q * R * v</code>, the rotation added by this method will be applied first! <p> Reference: <a href="http://answers.unity3d.com/questions/467614/what-is-the-source-code-of-quaternionlookrotation.html">http://answers.unity3d.com</a>

@see #lookAlong(double, double, double, double, double, double, Quaterniond)

@param dirX the x-coordinate of the direction to look along @param dirY the y-coordinate of the direction to look along @param dirZ the z-coordinate of the direction to look along @param upX the x-coordinate of the up vector @param upY the y-coordinate of the up vector @param upZ the z-coordinate of the up vector @return this

  1. Quaterniond lookAlong(Vector3d dir, Vector3d up)
  2. Quaterniond lookAlong(Vector3d dir, Vector3d up, Quaterniond dest)
  3. Quaterniond lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)
    struct Quaterniond
    ref public return
    lookAlong
    (
    double dirX
    ,
    double dirY
    ,
    double dirZ
    ,
    double upX
    ,
    double upY
    ,
    double upZ
    )
  4. Quaterniond lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Quaterniond dest)

Meta