Vector3 class

Inheritance

Constructors

Vector3([double? x, double? y, double? z])
Vector3.copy(Vector3 v)
Vector3.fromJson(List<double>? json)
Vector3.zero([double x = 0, double y = 0, double z = 0])

Properties

hashCode int
The hash code for this object.
no setterinherited
length double
no setteroverride
length2 double
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage Float32List
getter/setter pairinherited
x double
getter/setter pairinherited
y double
getter/setter pairinherited
z double
getter/setter pair

Methods

add(Vector a) Vector3
override
add2(Vector a, Vector b) Vector3
addScalar(num s) Vector3
override
addScaled(Vector v, num s) Vector3
override
angleTo(dynamic v) double
applyAxisAngle(dynamic axis, dynamic angle) Vector3
applyEuler(Euler euler) Vector3
applyMatrix3(Matrix3 m) Vector3
override
applyMatrix4(Matrix4 m) Vector3
applyNormalMatrix(Matrix3 m) Vector3
applyQuaternion(Quaternion q) Vector3
ceil() Vector3
override
clamp(Vector3 min, Vector3 max) Vector3
clampLength<T extends num>(T min, T max) Vector3
override
clampScalar(double minVal, double maxVal) Vector3
override
clone() Vector3
override
copyFromArray(List<double> array, [int offset = 0]) Vector3
override
copyFromUnknown(dynamic array, [int offset = 0]) Vector3
override
copyIntoArray([List<double>? array, int offset = 0]) List<double>
override
cross(Vector3 v) Vector3
cross2(Vector3 a, Vector3 b) Vector3
distanceTo(Vector v) double
override
distanceToSquared(Vector v) double
override
divide(Vector3 v) Vector3
divideScalar(num scalar) Vector3
override
dot(Vector v) double
override
equals(Vector v) bool
override
floor() Vector3
override
fromBuffer(BufferAttribute<NativeArray<num>> attribute, int index) Vector3
override
fromNativeArray(NativeArray<num> array, [int offset = 0]) Vector3
override
getComponent(int index) double
override
lerp(Vector3 v, num alpha) Vector3
lerpVectors(Vector3 v1, Vector3 v2, num alpha) Vector3
manhattanDistanceTo(Vector3 v) double
manhattanLength() double
override
max(Vector3 v) Vector3
min(Vector3 v) Vector3
multiply(Vector3 v) Vector3
multiplyVectors(Vector3 a, Vector3 b) Vector3
negate() Vector3
override
normalize() Vector3
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
project(dynamic camera) Vector3
projectOnPlane(Vector3 planeNormal) Vector3
projectOnVector(Vector3 v) Vector3
random() Vector3
override
randomDirection() Vector3
reflect(Vector3 normal) Vector3
round() Vector3
override
roundToZero() Vector3
override
scale(num scalar) Vector3
override
setComponent(int index, double value) Vector3
setFrom(Vector v) Vector3
override
setFromCylindrical(dynamic c) Vector3
setFromCylindricalCoords(double radius, double theta, double y) Vector3
setFromEuler(Euler e) Vector3
setFromMatrix3Column(Matrix3 m, int index) Vector3
setFromMatrixColumn(Matrix4 m, int index) Vector3
setFromMatrixPosition(dynamic m) Vector3
setFromMatrixScale(dynamic m) Vector3
setFromSpherical(dynamic s) Vector3
setFromSphericalCoords(num radius, num phi, num theta) Vector3
setLength(double length) Vector3
override
setP(String p, double v) → void
setScalar(double scalar) Vector3
override
setValues(double x, double y, [double? z]) Vector3
override
setX(double x) Vector3
setY(double y) Vector3
setZ(double z) Vector3
sub(Vector a) Vector3
override
sub2(Vector a, Vector b) Vector3
subScalar(num s) Vector3
override
toJson() Map<String, dynamic>
override
toList() List<double>
override
toNumArray(List<num> array, [int offset = 0]) List<num>
override
toString() String
A string representation of this object.
override
transformDirection(Matrix4 m) Vector3
unproject(dynamic camera) Vector3

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int i) double
operator []=(int i, double v) → void