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

NameTypeAccessDescription
xfloatReadIs the X coordinate component
yfloatRead
zfloatRead
lengthfloatRead
length2floatReadIs the squared magnitude of the vector
zero'Vector3'ReadIs a vector with all components equal to zero
one'Vector3'Read
unit_x'Vector3'ReadIs a unit vector pointing along the positive X axis
unit_y'Vector3'Read
unit_z'Vector3'Read

Methods

SignatureDescription
__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')floatReturns 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)floatReturns 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')intReturns an integer indicating ordering compared to another vector
parse(input: str)'Vector3'Creates a Vector3 from a string representation