RaylibVector3Factories class

Backend-agnostic factory hub for Vector3Base construction.

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

Constructors

RaylibVector3Factories()

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

Static Methods

barycenter(Vector3Base<Vector3Base, MatrixBase, QuaternionBase, Vector4Base> p, Vector3Base<Vector3Base, MatrixBase, QuaternionBase, Vector4Base> a, Vector3Base<Vector3Base, MatrixBase, QuaternionBase, Vector4Base> b, Vector3Base<Vector3Base, MatrixBase, QuaternionBase, Vector4Base> c) Vector3Base<Vector3Base, MatrixBase, QuaternionBase, Vector4Base>
Computes the barycentric coordinates of point p relative to triangle (a, b, c).
normalized(num x, num y, num z) Vector3Base<Vector3Base, MatrixBase, QuaternionBase, Vector4Base>
Creates a vector from x, y, z and immediately normalizes it.
perpendicular(Vector3Base<Vector3Base, MatrixBase, QuaternionBase, Vector4Base> o) Vector3Base<Vector3Base, MatrixBase, QuaternionBase, Vector4Base>
Returns a vector perpendicular to o by crossing it with its least-aligned cardinal axis.