Matrix4d.rotationTowards

Set this matrix to a model transformation for a right-handed coordinate system, that aligns the local <code>-z</code> axis with <code>dir</code>. <p> In order to apply the rotation transformation to a previous existing transformation, use {@link #rotateTowards(double, double, double, double, double, double) rotateTowards}. <p> This method is equivalent to calling: <code>setLookAt(new Vector3d(), new Vector3d(dir).negate(), up).invertAffine()</code>

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

@param dir the direction to orient the local -z axis towards @param up the up vector @return this

  1. Matrix4d rotationTowards(Vector3d dir, Vector3d up)
    struct Matrix4d
    ref public return
    rotationTowards
  2. Matrix4d rotationTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)

Meta