Vec3 class

Class for Vector3

Constructors

Vec3([double x = 0, double y = 0, double z = 0])
Vec3 is a vector with coordinates for 3d mapping

Properties

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

Methods

add(Vec3 a, [Vec3? b]) Vec3
Add a to this vector
addEqual(Vec3 v) Vec3
Add this vector to v
addition() double
Add x,y,z of this vector
addScaledVector(Vec3 v, double s) Vec3
Add v scaled by s thos this vector
addVectors(Vec3 a, Vec3 b) Vec3
add vector a to vector b
applyMatrix3(Mat33 m, [bool transpose = false]) Vec3
Apply a 3x3 Matrix to this vector
applyQuaternion(Quat q) Vec3
Apply a Quanternation to this vector
clone() Vec3
Clone this vector and return a new vector
copy(Vec3 v) Vec3
Copy V to this vector
cross(Vec3 a, [Vec3? b]) Vec3
Cross a with this vector if b is provided cross a with b
crossVectors(Vec3 a, Vec3 b) Vec3
Cross a with b
divideScalar(double scalar) Vec3
Divide this vector by scalar
dot(Vec3 v) double
Get the dot product with respect to v
equals(Vec3 v) bool
Is v == to this
fromArray(List<double> array, [int offset = 0]) Vec3
Place all parts of the array into this vectors positions
inverse() Vec3
Invert this vector
invert(Vec3 v) Vec3
Invert v and set it to this vector
length() double
Add the lenght of the positions e.g(sqrt(x^2+y^2+z^2))
lengthSq() double
Add the squares of the position e.g(x^2+y^2+z^2)
multiply(Vec3 v) Vec3
Multiply this vector by v
multiplyScalar(double scalar) Vec3
Multiply this vector by scalar
negate(Vec3 target) Vec3
Invert this vector
normalize() Vec3
Normalize this vector
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
scale(Vec3 v, double s) Vec3
scale vector v with s and set for this vector
scaleEqual(double s) Vec3
Scale this vector by s
set(double x, double y, double z) Vec3
Set a new position for this vector using x,y,z
sub(Vec3 a, [Vec3? b]) Vec3
Subtract a from this vector or subtract a form b
subEqual(Vec3 v) Vec3
Subtract this vecotor from v
subScaledVector(Vec3 v, double s) Vec3
Subtract v scaled by s with this vector
subVectors(Vec3 a, Vec3 b) Vec3
Subtract a from b
tangent(Vec3 a) Vec3
Get the tangent of this vector with respect to a
testDiff(Vec3 v) bool
Check if v is different to this
testZero() bool
Test if all the positions are zero e.g(x=y=z=0)
toArray(List<double> array, [int offset = 0]) → void
Place all position into the provided array
toString() String
A string representation of this object.
override
vadd(Vec3 vector, [Vec3? target]) Vec3
Vector addition
vsub(Vec3 vector, [Vec3? target]) Vec3
Vector subtraction

Operators

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