Matrix4d.billboardSpherical

Set this matrix to a spherical billboard transformation that rotates the local +Z axis of a given object with position <code>objPos</code> towards a target position at <code>targetPos</code>. <p> This method can be used to create the complete model transformation for a given object, including the translation of the object to its position <code>objPos</code>. <p> If preserving an <i>up</i> vector is not necessary when rotating the +Z axis, then a shortest arc rotation can be obtained using {@link #billboardSpherical(ref Vector3d, Vector3d)}.

@see #billboardSpherical(ref Vector3d, Vector3d)

@param objPos the position of the object to rotate towards <code>targetPos</code> @param targetPos the position of the target (for example the camera) towards which to rotate the object @param up the up axis used to orient the object @return this

  1. Matrix4d billboardSpherical(Vector3d objPos, Vector3d targetPos, Vector3d up)
    struct Matrix4d
    ref return
    billboardSpherical
  2. Matrix4d billboardSpherical(Vector3d objPos, Vector3d targetPos)

Meta