Welcome to Python-flavored Magnum! Please note that, while already being rather stable, this functionality is still considered experimental and some APIs might get changed without preserving full backwards compatibility.

magnum.Vector3ui class

Threee-component unsigned integral vector

Static methods

def x_axis(length: int = 1) -> Vector3ui
Vector in a direction of X axis (right)
def x_scale(scale: int) -> Vector3ui
Scaling vector in a direction of X axis (width)
def y_axis(length: int = 1) -> Vector3ui
Vector in a direction of Y axis (up)
def y_scale(scale: int) -> Vector3ui
Scaling vector in a direction of Y axis (height)
def z_axis(length: int = 1) -> Vector3ui
Vector in a direction of Z axis (backward)
def z_scale(scale: int) -> Vector3ui
Scaling vector in a direction of Z axis (depth)
def zero_init() -> Vector3ui
Construct a zero vector

Methods

def dot(self, /) -> int
Dot product of the vector
def flipped(self, /) -> Vector3ui
Flipped vector
def is_zero(self, /) -> bool
Whether the vector is zero
def max(self, /) -> int
Maximal value in the vector
def min(self, /) -> int
Minimal value in the vector
def minmax(self, /) -> typing.Tuple[int, int]
Minimal and maximal value in the vector
def product(self, /) -> int
Product of values in the vector
def sum(self, /) -> int
Sum of values in the vector

Special methods

def __add__(self, arg0: Vector3ui, /) -> Vector3ui
Add a vector
def __and__(self, arg0: Vector3ui, /) -> Vector3ui
Bitwise AND of two integral vectors
def __eq__(self, arg0: Vector3ui, /) -> bool
Equality comparison
def __ge__(self, arg0: Vector3ui, /) -> BoolVector3
Component-wise greater than or equal comparison
def __getattr__(self, arg0: str, /) -> object
Vector swizzle
def __getitem__(self, arg0: int, /) -> int
Value at given position
def __gt__(self, arg0: Vector3ui, /) -> BoolVector3
Component-wise greater than comparison
def __iadd__(self, arg0: Vector3ui, /) -> Vector3ui
Add and assign a vector
def __iand__(self, arg0: Vector3ui, /) -> Vector3ui
Do bitwise AND of two integral vectors and assign
def __ilshift__(self, arg0: int, /) -> Vector3ui
Do bitwise left shift of an integral vector and assign
def __imod__(self, arg0: int, /) -> Vector3ui
Do modulo of an integral vector and assign
def __imod__(self, arg0: Vector3ui, /) -> Vector3ui
Do module of two integral vectors and assign
def __imul__(self, arg0: int, /) -> Vector3ui
Multiply with a scalar and assign
def __imul__(self, arg0: Vector3ui, /) -> Vector3ui
Multiply a vector component-wise and assign
def __imul__(self, arg0: float, /) -> Vector3ui
Multiply an integral vector with a floating-point number and assign
def __init__(self, arg0: Vector3i, /) -> None
Construct from different underlying type
def __init__(self, arg0: Vector3, /) -> None
Construct from different underlying type
def __init__(self, arg0: Vector3d, /) -> None
Construct from different underlying type
def __init__(self, arg0: buffer, /) -> None
Construct from a buffer
def __init__(self, /) -> None
Default constructor
def __init__(self, arg0: int, /) -> None
Construct a vector with one value for all components
def __init__(self, arg0: int, arg1: int, arg2: int, /) -> None
Constructor
def __init__(self, arg0: typing.Tuple[int, int, int], /) -> None
Construct from a tuple
def __invert__(self, /) -> Vector3ui
Bitwise NOT of an integral vector
def __ior__(self, arg0: Vector3ui, /) -> Vector3ui
Do bitwise OR of two integral vectors and assign
def __irshift__(self, arg0: int, /) -> Vector3ui
Do bitwise right shift of an integral vector and assign
def __isub__(self, arg0: Vector3ui, /) -> Vector3ui
Subtract and assign a vector
def __itruediv__(self, arg0: int, /) -> Vector3ui
Divide with a scalar and assign
def __itruediv__(self, arg0: Vector3ui, /) -> Vector3ui
Divide a vector component-wise and assign
def __itruediv__(self, arg0: float, /) -> Vector3ui
Divide an integral vector with a floating-point number and assign
def __ixor__(self, arg0: Vector3ui, /) -> Vector3ui
Do bitwise XOR of two integral vectors and assign
def __le__(self, arg0: Vector3ui, /) -> BoolVector3
Component-wise less than or equal comparison
def __len__() -> int
Vector size. Returns 3.
def __lshift__(self, arg0: int, /) -> Vector3ui
Bitwise left shift of an integral vector
def __lt__(self, arg0: Vector3ui, /) -> BoolVector3
Component-wise less than comparison
def __mod__(self, arg0: int, /) -> Vector3ui
Modulo of an integral vector
def __mod__(self, arg0: Vector3ui, /) -> Vector3ui
Modulo of two integral vectors
def __mul__(self, arg0: int, /) -> Vector3ui
Multiply with a scalar
def __mul__(self, arg0: Vector3ui, /) -> Vector3ui
Multiply a vector component-wise
def __mul__(self, arg0: float, /) -> Vector3ui
Multiply an integral vector with a floating-point number
def __ne__(self, arg0: Vector3ui, /) -> bool
Non-equality comparison
def __or__(self, arg0: Vector3ui, /) -> Vector3ui
Bitwise OR of two integral vectors
def __repr__(self, /) -> str
Object representation
def __rmul__(self, arg0: int, /) -> Vector3ui
Multiply a scalar with a vector
def __rmul__(self, arg0: float, /) -> Vector3ui
Multiply a floating-point number with an integral vector
def __rshift__(self, arg0: int, /) -> Vector3ui
Bitwise right shift of an integral vector
def __rtruediv__(self, arg0: int, /) -> Vector3ui
Divide a vector with a scalar and invert
def __setattr__(self, arg0: str, arg1: object, /) -> None
Vector swizzle
def __setitem__(self, arg0: int, arg1: int, /) -> None
Set a value at given position
def __sub__(self, arg0: Vector3ui, /) -> Vector3ui
Subtract a vector
def __truediv__(self, arg0: int, /) -> Vector3ui
Divide with a scalar
def __truediv__(self, arg0: Vector3ui, /) -> Vector3ui
Divide a vector component-wise
def __truediv__(self, arg0: float, /) -> Vector3ui
Divide an integral vector with a floating-point number
def __xor__(self, arg0: Vector3ui, /) -> Vector3ui
Bitwise XOR of two integral vectors

Properties

b: int get set
B component
g: int get set
G component
r: int get set
R component
x: int get set
X component
xy: Vector2ui get set
XY part of the vector
y: int get set
Y component
z: int get set
Z component