Vector3
- class Vector3(x, y, z)[source]
Bases:
objectInitialize a 3-dimensional vector.
- Parameters:
- Returns:
None
- classmethod right()[source]
Create a right-direction unit vector
(1.0, 0.0, 0.0).- Return Vector3:
A unit vector pointing in the positive X direction.
- classmethod up()[source]
Create an up-direction unit vector
(0.0, 1.0, 0.0).- Return Vector3:
A unit vector pointing in the positive Y direction.
- classmethod forward()[source]
Create a forward-direction unit vector
(0.0, 0.0, 1.0).- Return Vector3:
A unit vector pointing in the positive Z direction.
- classmethod zero()[source]
Create a zero vector
(0.0, 0.0, 0.0).- Return Vector3:
A vector with all components set to zero.
- classmethod one()[source]
Create a ones vector
(1.0, 1.0, 1.0).- Return Vector3:
A vector with all components set to one.
- magnitude()[source]
Compute the magnitude (Euclidean length) of the vector.
- Return float:
The computed vector magnitude.