NotifyingQuaternion.fromRotation constructor

NotifyingQuaternion.fromRotation(
  1. Matrix3 rotationMatrix
)

Extension of the standard Quaternion class, implementing the ChangeNotifier functionality. This allows any interested party to be notified when the value of this quaternion changes.

This class can be used as a regular Quaternion class. However, if you do subscribe to notifications, don't forget to eventually unsubscribe in order to avoid resource leaks.

Direct modification of this quaternion's storage is not allowed.

Constructs a quaternion from a rotation matrix rotationMatrix.

Implementation

factory NotifyingQuaternion.fromRotation(Matrix3 rotationMatrix) =>
    NotifyingQuaternion._()..setFromRotation(rotationMatrix);