Vector3 class final
- Implemented types
-
- I_OperatableDirectable<
_MxyTransformable< _MxyTransformable> , void> - I_OperatableScalable<
_MxyTransformable< _MxyTransformable> , void> - I_OperatableStepable<
_MxyTransformable< _MxyTransformable> , void>
- I_OperatableDirectable<
Constructors
- Vector3.new(double x, double y, double z)
Properties
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 usingrotateX
,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, ory
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