Quaterniond.rotateTo

Apply a rotation to <code>this</code> that rotates the <code>fromDir</code> vector to point along <code>toDir</code>. <p> Since there can be multiple possible rotations, this method chooses the one with the shortest arc. <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!

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

@param fromDirX the x-coordinate of the direction to rotate into the destination direction @param fromDirY the y-coordinate of the direction to rotate into the destination direction @param fromDirZ the z-coordinate of the direction to rotate into the destination direction @param toDirX the x-coordinate of the direction to rotate to @param toDirY the y-coordinate of the direction to rotate to @param toDirZ the z-coordinate of the direction to rotate to @return this

  1. Quaterniond rotateTo(double fromDirX, double fromDirY, double fromDirZ, double toDirX, double toDirY, double toDirZ, Quaterniond dest)
  2. Quaterniond rotateTo(double fromDirX, double fromDirY, double fromDirZ, double toDirX, double toDirY, double toDirZ)
    struct Quaterniond
    ref public return
    rotateTo
    (
    double fromDirX
    ,
    double fromDirY
    ,
    double fromDirZ
    ,
    double toDirX
    ,
    double toDirY
    ,
    double toDirZ
    )
  3. Quaterniond rotateTo(Vector3d fromDir, Vector3d toDir, Quaterniond dest)
  4. Quaterniond rotateTo(Vector3d fromDir, Vector3d toDir)

Meta