Matrix4x3d.rotateTowards

Apply a model transformation to this matrix for a right-handed coordinate system, that aligns the local <code>+Z</code> axis with <code>(dirX, dirY, dirZ)</code> and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>L</code> the lookat matrix, then the new matrix will be <code>M * L</code>. So when transforming a vector <code>v</code> with the new matrix by using <code>M * L * v</code>, the lookat transformation will be applied first! <p> In order to set the matrix to a rotation transformation without post-multiplying it, use {@link #rotationTowards(double, double, double, double, double, double) rotationTowards()}. <p> This method is equivalent to calling: <code>mul(new Matrix4x3d().lookAt(0, 0, 0, -dirX, -dirY, -dirZ, upX, upY, upZ).invert(), dest)</code>

@see #rotateTowards(Vector3d, Vector3d) @see #rotationTowards(double, double, double, double, double, double)

@param dirX the x-coordinate of the direction to rotate towards @param dirY the y-coordinate of the direction to rotate towards @param dirZ the z-coordinate of the direction to rotate towards @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 @param dest will hold the result @return dest

  1. Matrix4x3d rotateTowards(Vector3d dir, Vector3d up, Matrix4x3d dest)
  2. Matrix4x3d rotateTowards(Vector3d dir, Vector3d up)
  3. Matrix4x3d rotateTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)
  4. Matrix4x3d rotateTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix4x3d dest)
    struct Matrix4x3d
    public
    rotateTowards
    (
    double dirX
    ,
    double dirY
    ,
    double dirZ
    ,
    double upX
    ,
    double upY
    ,
    double upZ
    ,)

Meta