Vector3
Overview
Vector3 is a class in Aspose.3d for Python.
Vector3.set sets the x, y, and z components to the given values.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
x | float | Read | Is the X coordinate component |
y | float | Read | |
z | float | Read | |
length | float | Read | |
length2 | float | Read | Is the squared magnitude of the vector |
zero | 'Vector3' | Read | Is a vector with all components equal to zero |
one | 'Vector3' | Read | |
unit_x | 'Vector3' | Read | Is a unit vector pointing along the positive X axis |
unit_y | 'Vector3' | Read | |
unit_z | 'Vector3' | Read |
Methods
| Signature | Description |
|---|---|
__init__(x, y, z) | |
set(new_x: float, new_y: float, new_z: float) | Sets the x, y, and z components to the given values |
dot(rhs: 'Vector3') → float | Returns the dot product of this vector with another |
cross(rhs: 'Vector3') → 'Vector3' | Returns a new vector that is the cross product with another |
normalize() → 'Vector3' | Returns a unit-length vector 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 vector of the sine of each component |
cos() → 'Vector3' | Returns a vector of the cosine of each component |
compare_to(other: 'Vector3') → int | Returns an integer indicating ordering compared to another vector |
parse(input: str) → 'Vector3' | Creates a Vector3 from a string representation |