Vector4 class

Vector4 class

A vector with four components.

The Vector4 type exposes the following members:

Constructors

ConstructorDescription
__init__(self, vec, w)Initializes a new instance of the Vector4 struct.
__init__(self, vec)Initializes a new instance of the Vector4 struct.
__init__(self, vec)Initializes a new instance of the Vector4 struct.
__init__(self, x, y, z)Initializes a new instance of the Vector4 struct.
__init__(self, x, y, z, w)Initializes a new instance of the Vector4 struct.
__init__(self)Constructs a new instance of Vector4

Properties

PropertyDescription
xThe x component.
yThe y component.
zThe z component.
wThe w component.

Methods

MethodDescription
set(self, new_x, new_y, new_z)Sets vector’s xyz components at a time, w will be set to 1
set(self, new_x, new_y, new_z, new_w)Sets vector’s all components at a time
compare_to(self, other)Compare current vector to another instance.

See Also