RaylibVector4Factories class

Backend-agnostic factory hub for Vector4Base construction.

zeroFactory and createFactory are injected by the concrete backend package before use (e.g. RaylibVector4Factories.createFactory = Vector4D.vec4). Derived helpers are implemented here in terms of those factories so the math stays in one place.

Constructors

RaylibVector4Factories()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

createFactory Vector4Base<Vector4Base, QuaternionBase, MatrixBase, Vector3Base> Function(num x, num y, num z, num w)
Creates a vector from x, y, z, w components. Injected by the backend package.
getter/setter pair
zeroFactory Vector4Base<Vector4Base, QuaternionBase, MatrixBase, Vector3Base> Function()
Creates a zero vector (0, 0, 0, 0). Injected by the backend package.
getter/setter pair

Static Methods

colorNormalize(ColorBase<ColorBase> color) Vector4Base<Vector4Base, QuaternionBase, MatrixBase, Vector3Base>
Converts color RGBA channels from 0–255 to normalized 0.0–1.0 components.
fromAxisAngle(Vector3Base<Vector3Base, MatrixBase, QuaternionBase, Vector4Base> axis, double angle) Vector4Base<Vector4Base, QuaternionBase, MatrixBase, Vector3Base>
Creates a quaternion from an axis and rotation angle (in radians).
fromQuaternion(QuaternionBase<QuaternionBase, MatrixBase, Vector3Base, Vector4Base> q) Vector4Base<Vector4Base, QuaternionBase, MatrixBase, Vector3Base>
Creates a Vector4Base from the raw XYZW components of q.