Uranium
Application Framework
|
Simple 3D-vector class based on numpy arrays. More...
Inherits object.
Public Member Functions | |
def | __init__ |
Initialize a new vector. More... | |
def | getData |
Get numpy array with the data. More... | |
def | setRoundDigits |
def | x |
Return the x component of this vector. | |
def | y |
Return the y component of this vector. | |
def | z |
Return the z component of this vector. | |
def | set |
def | angleToVector |
Get the angle from this vector to another. | |
def | normalized |
def | length |
def | dot |
def | cross |
def | multiply |
def | preMultiply |
def | scale |
Scale a vector by another vector. More... | |
def | __eq__ |
def | equals |
Compares this vector to another vector. More... | |
def | __add__ |
def | __iadd__ |
def | __sub__ |
def | __isub__ |
def | __mul__ |
def | __imul__ |
def | __rmul__ |
def | __truediv__ |
def | __itruediv__ |
def | __rtruediv__ |
def | __neg__ |
def | __repr__ |
def | __lt__ |
def | __gt__ |
def | __le__ |
def | __ge__ |
Public Attributes | |
round_digits | |
Static Public Attributes | |
Null = None | |
Unit_X = None | |
Unit_Y = None | |
Unit_Z = None | |
Simple 3D-vector class based on numpy arrays.
This class represents an immutable 3-dimensional vector.
def UM.Math.Vector.Vector.__init__ | ( | self, | |
x = None , |
|||
y = None , |
|||
z = None , |
|||
data = None , |
|||
round_digits = None |
|||
) |
Initialize a new vector.
x | X coordinate of vector. |
y | Y coordinate of vector. |
z | Z coordinate of vector. |
def UM.Math.Vector.Vector.equals | ( | self, | |
other, | |||
epsilon = 1e-6 |
|||
) |
Compares this vector to another vector.
epsilon | optional tolerance value for the comparision. |
def UM.Math.Vector.Vector.getData | ( | self | ) |
Get numpy array with the data.
def UM.Math.Vector.Vector.scale | ( | self, | |
other | |||
) |
Scale a vector by another vector.
This will do a component-wise multiply of the two vectors.