QuaternionD class
- Inheritance
- Mixed-in types
Constructors
-
QuaternionD({WasmStructPointer<
QuaternionD> ? originalPointer, double x = 0, double y = 0, double z = 0, double w = 0}) - QuaternionD.fromAxisAngle(Vector3D axis, double angle)
-
factory
- QuaternionD.fromEuler(double pitch, double yaw, double roll)
-
factory
- QuaternionD.fromMatrix(MatrixD mat)
-
factory
- QuaternionD.fromVector3ToVector3(Vector3D from, Vector3D to)
-
factory
- QuaternionD.fromVector4(Vector4D v)
-
factory
- QuaternionD.identity()
-
factory
- QuaternionD.one()
-
factory
- QuaternionD.quat(num x, num y, num z, num w)
-
factory
- QuaternionD.zero()
-
factory
Properties
- $state → RaylibTempStructState
-
Per-instance allocation state tracking slot keys, disposal, and identity.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- length → double
-
Euclidean length (magnitude) of this quaternion.
no setterinherited
- lengthSqr → double
-
Squared length of this quaternion.
no setterinherited
-
originalPointer
↔ WasmStructPointer<
QuaternionD> ? -
The C-owned or RaylibTemp-owned native pointer for this struct, if any.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- structIsDisposed → bool
-
Whether structMarkDisposed has been called on this instance.
no setterinherited
- structName → String
-
The Dart-side type name of this struct
no setterinherited
- structRequiresOriginalPointer → bool
-
Whether this struct requires an originalPointer to function correctly.
no setterinherited
- w ↔ double
-
Real (scalar) component
getter/setter pairoverride
- wasmByteSize → int
-
no setteroverride
- x ↔ double
-
Imaginary i component
getter/setter pairoverride
- y ↔ double
-
Imaginary j component
getter/setter pairoverride
- z ↔ double
-
Imaginary k component
getter/setter pairoverride
Methods
-
add(
QuaternionD o) → QuaternionD -
Returns a new quaternion that is the component-wise sum of this and
o.inherited -
addValue(
num value) → QuaternionD -
Returns a new quaternion with
valueadded to each component.inherited -
clone(
) → QuaternionD -
Returns a deep copy of this instance, preserving RaylibStructBase.originalPointer if present.
override
-
copy(
) → QuaternionD -
Returns a deep copy of this instance without RaylibStructBase.originalPointer.
inherited
-
cubicHermiteSpline(
QuaternionD outTangent1, QuaternionD q2, QuaternionD inTangent2, double t) → QuaternionD -
Interpolates along a cubic Hermite spline between this and
q2.inherited -
distance(
QuaternionD o) → double -
Euclidean distance between this quaternion and
oin 4D space.inherited -
distanceSqr(
QuaternionD o) → double -
Squared Euclidean distance between this quaternion and
o.inherited -
div(
QuaternionD o) → QuaternionD -
Returns a new quaternion that is the component-wise quotient of this and
o.inherited -
divideBy(
num o) → QuaternionD -
Returns a new quaternion with all components divided by
o.inherited -
dotProduct(
QuaternionD o) → double -
Dot product of this quaternion and
o.inherited -
equals(
QuaternionD o) → bool -
Returns
trueif this quaternion is approximately equal too.inherited -
format(
[int x0 = 0, int? y0, int? z0, int? w0]) → String -
Returns a formatted string representation of this quaternion.
inherited
-
getOriginalPointer(
) → WasmStructPointer< QuaternionD> -
Returns originalPointer, throwing a descriptive StateError if unavailable or this instance RaylibTempStructState.isDisposed.
inherited
-
getOriginalPointerAndDispose(
) → WasmStructPointer< QuaternionD> -
Returns originalPointer and immediately calls structMarkDisposed.
inherited
-
invert(
) → QuaternionD -
Returns the inverse (conjugate divided by squared length) of this quaternion.
inherited
-
lerp(
QuaternionD o, double amount) → QuaternionD -
Linear interpolation between this and
obyamount(component-wise).inherited -
max(
QuaternionD o) → QuaternionD -
Returns a new quaternion with each component being the component-wise maximum of this and
o.inherited -
min(
QuaternionD o) → QuaternionD -
Returns a new quaternion with each component being the component-wise minimum of this and
o.inherited -
mul(
QuaternionD o) → QuaternionD -
Returns the Hamilton product of this quaternion and
o.inherited -
negate(
) → QuaternionD -
Returns a new quaternion with all components negated.
inherited
-
nLerp(
QuaternionD o, double amount) → QuaternionD -
Normalized linear interpolation between this and
obyamount.inherited -
normalize(
) → QuaternionD -
Returns a normalized (unit-length) copy of this quaternion.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scale(
num o) → QuaternionD -
Returns a new quaternion with all components scaled by
o.inherited -
set(
num x, num y, num z, num w) → QuaternionD -
Sets all components at once.
inherited
-
setD(
QuaternionD o) → QuaternionD -
Copies the fields of
ointo this instance and returnsthis.override -
signature(
) → String -
Returns a human-readable representation of this struct.
inherited
-
sLerp(
QuaternionD o, double amount) → QuaternionD -
Spherical linear interpolation between this and
obyamount.inherited -
structAllocateInto(
RaylibTemp temp, WasmStructPointer< QuaternionD> p, String key) → void -
Allocates nested pointers into
tempunderkeyas needed.inherited -
structMarkDisposed(
) → void -
Marks this instance as disposed and clears originalPointer.
inherited
-
structOnOp(
void callback(WasmStructPointer< QuaternionD> p)) → void -
Calls
callbackwith originalPointer if it is set, otherwise no-ops.inherited -
structReadFrom(
WasmStructPointer< QuaternionD> p) → void -
Reads all fields from the memory at
p.inherited -
structSetTag(
String newTag) → QuaternionD -
Sets RaylibTempStructState.tag to
newTagand returnsthisfor chaining.inherited -
structSyncFromMemory(
) → void -
Syncs all fields from the memory. Requires originalPointer.
inherited
-
structSyncInto(
RaylibTemp temp, WasmStructPointer< QuaternionD> p, String key) → void -
Syncs Dart-side fields into the already-allocated native pointer
p. Defaults to structWriteInto.inherited -
structSyncToMemory(
) → void -
Syncs all fields to the memory. Requires originalPointer.
inherited
-
structWriteInto(
WasmStructPointer< QuaternionD> p) → void -
Writes all fields into the memory at
p.inherited -
sub(
QuaternionD o) → QuaternionD -
Returns a new quaternion that is the component-wise difference of this and
o.inherited -
subValue(
num value) → QuaternionD -
Returns a new quaternion with
valuesubtracted from each component.inherited -
toArray(
) → List< double> -
Returns the components as a new double list.
inherited
-
toAxisAngle(
) → (Vector3D, double) -
Decomposes this quaternion into an axis–angle representation.
inherited
-
toEuler(
) → Vector3D -
Converts this quaternion to Euler angles
(roll, pitch, yaw)in radians.inherited -
toMatrix(
) → MatrixD -
Converts this quaternion to an equivalent rotation matrix.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toVector4(
) → Vector4D -
Converts this quaternion to a
V4with the same(x, y, z, w)components.inherited -
transform(
MatrixD mat) → QuaternionD -
Transforms this quaternion by the given matrix
mat.inherited -
wasmReader(
[int? offset]) → WasmReader -
inherited
-
wasmReaderOr(
int address) → WasmReader -
inherited
-
wasmReadFrom(
WasmReader reader) → void -
override
-
wasmWriteInto(
WasmWriter writer) → void -
override
-
wasmWriter(
[int? offset]) → WasmWriter -
inherited
-
wasmWriterOr(
int address) → WasmReader -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited