setRotationFromMatrix method

void setRotationFromMatrix(
  1. dynamic m
)

m - rotate the quaternion by the rotation component of the matrix.

Calls setFromRotationMatrix (m) on the quaternion.

Note that this assumes that the upper 3x3 of m is a pure rotation matrix (i.e, unscaled).

Implementation

void setRotationFromMatrix(m) {
  // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)
  quaternion.setFromRotationMatrix(m);
}