Return a copy of this
Retrieves the type of this mutable subclass as the name of the runtime class
The type of the mutable
See EventTarget.addEventListener for reference. Works with EventListenerUnified and EventUnified
Optional
_options: boolean | AddEventListenerOptionsConjugates this quaternion and returns it
Recreates this instance of Serializable with the information from the given Serialization.
See EventTarget.dispatchEvent for reference. Works with with EventUnified
Collect applicable attributes of the instance and copies of their values in a Mutator-object. By default, a mutator cannot be extended, since extensions are not available in the object the mutator belongs to. A mutator may be reduced by the descendants of Mutable to contain only the properties needed.
Returns an associative array with the same attributes as the given mutator, but with the corresponding types as string-values Does not recurse into objects!
Collect the attributes of the instance and their values applicable for animation. Basic functionality is identical to getMutator, returned mutator should then be reduced by the subclassed instance
Collect the attributes of the instance and their values applicable for the user interface. Basic functionality is identical to getMutator, returned mutator should then be reduced by the subclassed instance
Multiply this quaternion with the given quaternion
Updates the attribute values of the instance according to the state of the mutator. The mutation may be restricted to a subset of the mutator and the event dispatching suppressed. Uses mutateBase, but can be overwritten in subclasses
Negate this quaternion and returns it
Normalizes this quaternion to a length of 1 (a unit quaternion) making it a valid rotation representation
See EventTarget.removeEventListener for reference. Works with EventListenerUnified and EventUnified
Optional
_options: boolean | AddEventListenerOptionsReturns a Serialization of this object.
Updates the values of the given mutator according to the current state of the instance
Static
CONJUGATIONComputes and returns the conjugate of a passed quaternion.
Static
DOTReturns the dot product of two quaternions.
Static
IDENTITYRetrieve a new identity quaternion
Static
INVERSIONComputes and returns the inverse of a passed quaternion.
Static
LERPReturns the normalized linear interpolation between two quaternions based on the given _factor. When _factor is 0 the result is _from, when _factor is 1 the result is _to.
Static
MULTIPLICATIONComputes and returns the product of two passed quaternions.
Static
NORMALIZATIONStatic
ROTATIONReturns a quaternion that rotates coordinates when multiplied by, using the angles given. Rotation occurs around the axis in the order Z-Y-X.
Static
SLERPReturns the spherical linear interpolation between two quaternions based on the given _factor. When _factor is 0 the result is _from, when _factor is 1 the result is _to.
Static
get
Storing and manipulating rotations in the form of quaternions. Constructed out of the 4 components: (x, y, z, w). Mathematical notation: w + xi + yj + zk. A Quaternion can be described with an axis and angle: (x, y, z) = sin(angle/2)*axis; w = cos(angle/2). roll: x, pitch: y, yaw: z. Note that operations are adapted to work with vectors where y is up and z is forward.
Authors
Matthias Roming, HFU, 2023 | Marko Fehrenbach, HFU, 2020 | Jonas Plotzky, HFU, 2023