Vector4D class

Inheritance
Mixed-in types

Constructors

Vector4D({WasmStructPointer<Vector4D>? originalPointer, double x = 0, double y = 0, double z = 0, double w = 0})
Vector4D.colorNormalize(ColorD color)
factory
Vector4D.fromAxisAngle(Vector3D axis, double angle)
factory
Vector4D.fromQuaternion(QuaternionD q)
factory
Vector4D.one()
factory
Vector4D.vec4(num x, num y, num z, num w)
factory
Vector4D.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 vector.
no setterinherited
lengthSqr double
Squared length of this vector.
no setterinherited
originalPointer WasmStructPointer<Vector4D>?
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
W component
getter/setter pairoverride
wasmByteSize int
no setteroverride
x double
X component
getter/setter pairoverride
y double
Y component
getter/setter pairoverride
z double
Z component
getter/setter pairoverride

Methods

add(Vector4D o) Vector4D
Returns a new vector that is the component-wise sum of this and o.
inherited
addValue(num value) Vector4D
Returns a new vector with value added to each component.
inherited
clone() Vector4D
Returns a deep copy of this instance, preserving RaylibStructBase.originalPointer if present.
override
copy() Vector4D
Returns a deep copy of this instance without RaylibStructBase.originalPointer.
inherited
distance(Vector4D o) double
Euclidean distance between this vector and o.
inherited
distanceSqr(Vector4D o) double
Squared Euclidean distance between this vector and o.
inherited
div(Vector4D o) Vector4D
Returns a new vector that is the component-wise quotient of this and o.
inherited
divideBy(num o) Vector4D
Returns a new vector with all components divided by o.
inherited
dotProduct(Vector4D o) double
Dot product of this vector and o.
inherited
equals(Vector4D o) bool
Returns true if this vector is approximately equal to o.
inherited
format([int x0 = 0, int? y0, int? z0, int? w0]) String
Returns a formatted string representation of this vector.
inherited
getOriginalPointer() WasmStructPointer<Vector4D>
Returns originalPointer, throwing a descriptive StateError if unavailable or this instance RaylibTempStructState.isDisposed.
inherited
getOriginalPointerAndDispose() WasmStructPointer<Vector4D>
Returns originalPointer and immediately calls structMarkDisposed.
inherited
invert() Vector4D
Returns a new vector with each component replaced by its reciprocal.
inherited
lerp(Vector4D o, double amount) Vector4D
Linear interpolation between this and o by amount.
inherited
max(Vector4D o) Vector4D
Returns a new vector with each component being the component-wise maximum of this and o.
inherited
min(Vector4D o) Vector4D
Returns a new vector with each component being the component-wise minimum of this and o.
inherited
moveTowards(Vector4D target, double maxDistance) Vector4D
Moves this vector towards target by at most maxDistance.
inherited
mul(Vector4D o) Vector4D
Returns a new vector that is the component-wise product of this and o.
inherited
negate() Vector4D
Returns a new vector with all components negated.
inherited
normalize() Vector4D
Returns a normalized (unit-length) copy of this vector.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
scale(num o) Vector4D
Returns a new vector with all components scaled by o.
inherited
set(num x, num y, num z, num w) Vector4D
Sets all components at once.
inherited
setD(Vector4D o) Vector4D
Copies the fields of o into this instance and returns this.
override
signature() String
Returns a human-readable representation of this struct.
inherited
structAllocateInto(RaylibTemp temp, WasmStructPointer<Vector4D> p, String key) → void
Allocates nested pointers into temp under key as needed.
inherited
structMarkDisposed() → void
Marks this instance as disposed and clears originalPointer.
inherited
structOnOp(void callback(WasmStructPointer<Vector4D> p)) → void
Calls callback with originalPointer if it is set, otherwise no-ops.
inherited
structReadFrom(WasmStructPointer<Vector4D> p) → void
Reads all fields from the memory at p.
inherited
structSetTag(String newTag) Vector4D
Sets RaylibTempStructState.tag to newTag and returns this for chaining.
inherited
structSyncFromMemory() → void
Syncs all fields from the memory. Requires originalPointer.
inherited
structSyncInto(RaylibTemp temp, WasmStructPointer<Vector4D> 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<Vector4D> p) → void
Writes all fields into the memory at p.
inherited
sub(Vector4D o) Vector4D
Returns a new vector that is the component-wise difference of this and o.
inherited
subValue(num value) Vector4D
Returns a new vector with value subtracted from each component.
inherited
toArray() List<double>
Returns the components as a new double list.
inherited
toQuaternion() QuaternionD
Converts this vector to a quaternion with the same (x, y, z, w) components.
inherited
toString() String
A string representation of this object.
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

Static Properties

byteSize int
final