Quaterniond.lookAlong
- Quaterniond lookAlong(Vector3d dir, Vector3d up)
struct Quaterniond
ref public return
lookAlong
- Quaterniond lookAlong(Vector3d dir, Vector3d up, Quaterniond dest)
- Quaterniond lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)
- Quaterniond lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Quaterniond dest)
doml quaternion_d Quaterniond
constructorsfunctionsvariables
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 dir the direction to map to the positive Z axis @param up the vector which will be mapped to a vector parallel to the plane spanned by the given <code>dir</code> and <code>up</code> @return this