Vector3 class final

Implemented types

Constructors

Vector3.new(double x, double y, double z)

Properties

clone Vector3
no setter
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 pairinherited
y double
getter/setter pairinherited
z double
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rotate(double azimuthal, double polar) → void
In the way of Spherical coordinate system.
inherited
rotateX(double radian) → void
When there is a rotation θ on x axis, y projects on both y axis and z axis. ( cosθ * y, sinθ * y ) z projects on both y axis and z axis, too. ( -sinθ * z, cosθ * z ) 1, 0, 0 x 0, cos, -sin y 0, sin, cos z When there is a rotation θ on y axis, x projects on both x axis and z axis. ( cosθ * x, -sinθ * x ) z projects on both x axis and z axis, too. ( sinθ * z, cosθ * z ) cos, 0, sin x 0, 1, 0 y -sin, 0, cos z When there is a rotation θ on z axis, x projects on both x axis and y axis. ( cosθ * x, sinθ * x ) y projects on both x axis and y axis, too. ( -sinθ * y, cosθ * y ) cos, -sin, 0 x sin, cos, 0 y 0, 0, 1 z Notice that using rotateX, rotateY, rotateZ together may cause unexpected rotation on one of x, y, z axis.
inherited
rotateY(double radian) → void
inherited
rotateZ(double radian) → void
inherited
toString() String
A string representation of this object.
inherited

Operators

operator %(covariant _MxyzT<_MxyzT> another) → void
inherited
operator *(covariant _MxyzT<_MxyzT> another) → void
inherited
operator +(covariant _MxyzT<_MxyzT> another) → void
inherited
operator -(covariant _MxyzT<_MxyzT> another) → void
inherited
operator /(covariant _MxyzT<_MxyzT> another) → void
inherited
operator ==(Object other) bool
The equality operator.
inherited
operator ^(double azimuthal) → void
Every vector on a 2D plane, V, can be composed by two vector: Vx: a vector parallel to x axis, or x Vy: a vector parallel to y axis, or y Every θ rotation on V can be composed by the θ rotation on Vx and θ rotation on Vy. With θ rotation, Vx projects on both x axis and y axis. ( cosθ * |Vx|, sinθ * |Vx| ) With θ rotation, Vy projects on both x axis and y axis, too. ( -sinθ * |Vy|, cosθ * |Vy| ) Or be as matrix multiplication: cosθ, -sinθ x sinθ, cosθ y Therefore, the result, x' and y', is computable: x' = x * cos(radian) - y * sin(radian); y' = x * sin(radian) + y * cos(radian);
inherited
operator unary-() → void
inherited
operator ~/(covariant _MxyzT<_MxyzT> another) → void
inherited

Static Methods

lerp(Vector3 begin, Vector3 end, [Vector3? host]) Lerper<Vector3>