Vector3
Overview
Vector3 is a class in Aspose.3D FOSS for Python.
Vector3.dot returns the dot product of this vector with another Vector3.
This class provides 10 methods for working with Vector3 objects in Python programs.
Available methods include: __init__, angle_between, compare_to, cos, cross, dot, normalize, parse, set, sin.
All exported members are accessible to any Python application after installing the Aspose.3D FOSS for Python package.
Properties: length, length2, one, unit_x, unit_y, unit_z, and 4 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
x | float | Read | Gets the x. |
y | float | Read | Gets the y. |
z | float | Read | Gets the z. |
length | float | Read | Gets the length. |
length2 | float | Read | Gets the length2. |
zero | 'Vector3' | Read | Gets the zero. |
one | 'Vector3' | Read | Gets the one. |
unit_x | 'Vector3' | Read | Gets the unit x. |
unit_y | 'Vector3' | Read | Gets the unit y. |
unit_z | 'Vector3' | Read | Gets the unit z. |
Methods
| Signature | Description |
|---|---|
__init__(x, y, z) | |
set(new_x: float, new_y: float, new_z: float) → None | |
dot(rhs: 'Vector3') → float | Returns the dot product of this vector with another Vector3 |
cross(rhs: 'Vector3') → 'Vector3' | Returns a new Vector3 that is the cross product with another vector |
normalize() → 'Vector3' | Returns a unit-length Vector3 in the same direction |
angle_between(dir: 'Vector3', up) → float | Returns the angle in radians between this vector and another, using up direction |
sin() → 'Vector3' | Returns a Vector3 whose components are the sine of each component of this vector |
cos() → 'Vector3' | |
compare_to(other: 'Vector3') → int | Compares this vector to another lexicographically and returns an int |
parse(input: str) → 'Vector3' | Creates a Vector3 from a string representation |