Creates and returns a clone of this quaternion.
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.
Copies the state of the given quaternion into this quaternion.
Recreates this instance of Serializable with the information from the given Serialization.
See EventTarget.dispatchEvent for reference. Works with with EventUnified
Retrieves the specified attribute types from the metadata of this instance's class.
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! This will return the decorated meta-type instead of the runtime-type of the object, if available.
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
Invert this quaternion.
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 | AddEventListenerOptionsRotates this quaternion around the given axis by the given angle. The rotation is appended to already applied rotations, thus multiplied from the right. Set _fromLeft to true to switch and put it in front.
Returns a Serialization of this object.
Sets the components of this quaternion.
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
INVERSEComputes 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
NORMALIZATIONReturns a quaternion which is a copy of the given quaternion scaled to length 1.
Static
PRODUCTComputes and returns the product of two passed quaternions.
Static
ROTATIONReturns a quaternion that rotates coordinates when multiplied by, using the angles given. Rotation occurs around the axis in the order Z-Y-X.
Returns a quaternion that rotates coordinates when multiplied by, using the axis and angle given. Axis must be normalized. Angle is in degrees.
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