Exemplo n.º 1
0
 /**
  * Post multiplies this {@link Matrix4} with the rotation between the two provided {@link
  * Vector3}s.
  *
  * @param v1 {@link Vector3} The base vector.
  * @param v2 {@link Vector3} The target vector.
  * @return A reference to this {@link Matrix4} to facilitate chaining.
  */
 @NonNull
 public Matrix4 rotate(@NonNull Vector3 v1, @NonNull Vector3 v2) {
   return rotate(mQuat.fromRotationBetween(v1, v2));
 }
Exemplo n.º 2
0
 /**
  * Sets this {@link Matrix4} to the rotation between two {@link Vector3} objects.
  *
  * @param v1 {@link Vector3} The base vector. Should be normalized.
  * @param v2 {@link Vector3} The target vector. Should be normalized.
  * @return A reference to this {@link Matrix4} to facilitate chaining.
  */
 @NonNull
 public Matrix4 setToRotation(@NonNull Vector3 v1, @NonNull Vector3 v2) {
   return setAll(mQuat.fromRotationBetween(v1, v2));
 }
Exemplo n.º 3
0
 /**
  * Sets this {@link Matrix4} to the rotation between two vectors. The incoming vectors should be
  * normalized.
  *
  * @param x1 double The x component of the base vector.
  * @param y1 double The y component of the base vector.
  * @param z1 double The z component of the base vector.
  * @param x2 double The x component of the target vector.
  * @param y2 double The y component of the target vector.
  * @param z2 double The z component of the target vector.
  * @return A reference to this {@link Matrix4} to facilitate chaining.
  */
 @NonNull
 public Matrix4 setToRotation(double x1, double y1, double z1, double x2, double y2, double z2) {
   return setAll(mQuat.fromRotationBetween(x1, y1, z1, x2, y2, z2));
 }