Vector3Base<V3 extends Vector3Base<V3, M, Q, V4> , M extends MatrixBase<M, V3, Q, V4> , Q extends QuaternionBase<Q, M, V3, V4> , V4 extends Vector4Base<V4, Q, M, V3> > mixin
Backend-agnostic contract for Vector3Base structs.
Must be mixed into every concrete platform implementation of a Raylib type to ensure a unified API surface across different backends.
- Superclass constraints
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 setter
- lengthSqr → double
-
Squared length of this vector.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- structName → String
-
The Dart-side type name of this struct
no setterinherited
- x ↔ double
-
X component
getter/setter pair
- y ↔ double
-
Y component
getter/setter pair
- z ↔ double
-
Z component
getter/setter pair
Methods
-
add(
V3 o) → V3 -
Returns a new vector that is the component-wise sum of this and
o. -
addValue(
num value) → V3 -
Returns a new vector with
valueadded to each component. -
angle(
V3 o) → double -
Angle between this vector and
oin radians, in the range[0, π]. -
clamp(
V3 min, V3 max) → V3 -
Clamps each component of this vector between the corresponding components of
minandmax. -
clampValue(
double min, double max) → V3 -
Clamps the length of this vector to the range
[min, max]. -
clone(
) → V3 -
Returns a deep copy of this instance, preserving RaylibStructBase.originalPointer if present.
inherited
-
copy(
) → V3 -
Returns a deep copy of this instance without RaylibStructBase.originalPointer.
inherited
-
crossProduct(
V3 o) → V3 -
Cross product of this vector and
o. -
cubicHermite(
V3 tangent1, V3 v2, V3 tangent2, double amount) → V3 -
Interpolates along a cubic Hermite spline between this and
v2. -
distance(
V3 o) → double -
Euclidean distance between this vector and
o. -
distanceSqr(
V3 o) → double -
Squared Euclidean distance between this vector and
o. -
div(
V3 o) → V3 -
Returns a new vector that is the component-wise quotient of this and
o. -
divideBy(
num o) → V3 -
Returns a new vector with all components divided by
o. -
dotProduct(
V3 o) → double -
Dot product of this vector and
o. -
equals(
V3 o) → bool -
Returns
trueif this vector is approximately equal too. -
format(
[int x0 = 0, int? y0, int? z0]) → String - Returns a formatted string representation of this vector.
-
invert(
) → V3 -
Returns a new vector with each component replaced by its reciprocal (
1/x,1/y,1/z). -
lerp(
V3 o, double amount) → V3 -
Linear interpolation between this and
obyamount. -
max(
V3 o) → V3 -
Returns a new vector with each component being the component-wise maximum of this and
o. -
min(
V3 o) → V3 -
Returns a new vector with each component being the component-wise minimum of this and
o. -
moveTowards(
V3 target, double maxDistance) → V3 -
Moves this vector towards
targetby at mostmaxDistance. -
mul(
V3 o) → V3 -
Returns a new vector that is the component-wise product of this and
o. -
negate(
) → V3 - Returns a new vector with all components negated.
-
normalize(
) → V3 - Returns a normalized (unit-length) copy of this vector.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
orthoNormalize(
V3 o) → V3 -
Orthonormalizes this vector against
ousing the Gram-Schmidt process. -
project(
V3 o) → V3 -
Projects this vector onto
o. -
reflect(
V3 normal) → V3 -
Reflects this vector off a surface with the given
normal. -
refract(
V3 n, double r) → V3 -
Refracts this vector through a surface with normal
nand ratior. -
reject(
V3 o) → V3 -
Rejects
ofrom this vector. -
rotateByAxisAngle(
V3 axis, double angle) → V3 -
Rotates this vector around
axisbyangleradians. -
rotateByQuaternion(
Q q) → V3 -
Returns a new vector with
thisrotated by quaternionq. -
scale(
num o) → V3 -
Returns a new vector with all components scaled by
o. -
set(
num x, num y, num z) → V3 - Sets all components at once.
-
setD(
V3 o) → V3 -
Copies the fields of
ointo this instance and returnsthis.inherited -
signature(
) → String -
Returns a human-readable representation of this struct.
override
-
sub(
V3 o) → V3 -
Returns a new vector that is the component-wise difference of this and
o. -
subValue(
num value) → V3 -
Returns a new vector with
valuesubtracted from each component. -
toArray(
) → List< double> - Returns the components as a new double list.
-
toString(
) → String -
A string representation of this object.
inherited
-
transform(
M o) → V3 -
Transforms this vector by matrix
o. -
unproject(
M projection, M view) → V3 - Unprojects this screen-space vector back into world space.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited