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

NameTypeAccessDescription
xfloatReadGets the x.
yfloatReadGets the y.
zfloatReadGets the z.
lengthfloatReadGets the length.
length2floatReadGets the length2.
zero'Vector3'ReadGets the zero.
one'Vector3'ReadGets the one.
unit_x'Vector3'ReadGets the unit x.
unit_y'Vector3'ReadGets the unit y.
unit_z'Vector3'ReadGets the unit z.

Methods

SignatureDescription
__init__(x, y, z)
set(new_x: float, new_y: float, new_z: float)None
dot(rhs: 'Vector3')floatReturns 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)floatReturns 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')intCompares this vector to another lexicographically and returns an int
parse(input: str)'Vector3'Creates a Vector3 from a string representation

See Also