Signed integer 4 component vector structure. More...
#include <int.hpp>
Public Member Functions | |
constexpr | int4 (int32 xyzw=0) noexcept |
Creates a new signed integer 4 component vector structure. | |
constexpr | int4 (int32 x, int32 y, int32 z, int32 w) noexcept |
Creates a new signed integer 4 component vector structure. | |
constexpr | int4 (int2 xy, int32 z, int32 w) noexcept |
Creates a new signed integer 4 component vector structure. | |
constexpr | int4 (int32 x, int2 yz, int32 w) noexcept |
Creates a new signed integer 4 component vector structure. | |
constexpr | int4 (int32 x, int32 y, int2 zw) noexcept |
Creates a new signed integer 4 component vector structure. | |
constexpr | int4 (int2 xy, int2 zw) noexcept |
Creates a new signed integer 4 component vector structure. | |
constexpr | int4 (int3 xyz, int32 w) noexcept |
Creates a new signed integer 4 component vector structure. | |
constexpr | int4 (int32 x, int3 yzw) noexcept |
Creates a new signed integer 4 component vector structure. | |
constexpr | int4 (uint4 xyzw) noexcept |
Creates a new signed integer 4 component vector structure. | |
int32 & | operator[] (psize i) noexcept |
Returns vector component by index. | |
int32 | operator[] (psize i) const noexcept |
Returns vector component by index. | |
constexpr | operator uint4 () const noexcept |
Returns as 4 component unsigned integer vector. (xyzw) | |
constexpr | operator uint3 () const noexcept |
Returns as 3 component unsigned integer vector. (xyz) | |
constexpr | operator int3 () const noexcept |
Returns as 3 component signed integer vector. (xyz) | |
constexpr | operator uint2 () const noexcept |
Returns as 2 component unsigned integer vector. (xy) | |
constexpr | operator int2 () const noexcept |
Returns as 2 component signed integer vector. (xy) | |
constexpr | operator uint32 () const noexcept |
Returns first vector component as unsigned integer value. (x) | |
constexpr | operator int32 () const noexcept |
Returns first vector component value. (x) | |
constexpr int4 | operator+ (int4 v) const noexcept |
constexpr int4 | operator- (int4 v) const noexcept |
constexpr int4 | operator* (int4 v) const noexcept |
constexpr int4 | operator/ (int4 v) const noexcept |
constexpr int4 | operator% (int4 v) const noexcept |
constexpr int4 | operator& (int4 v) const noexcept |
constexpr int4 | operator| (int4 v) const noexcept |
constexpr int4 | operator^ (int4 v) const noexcept |
constexpr int4 | operator>> (int4 v) const noexcept |
constexpr int4 | operator<< (int4 v) const noexcept |
constexpr int4 | operator+ (int32 n) const noexcept |
constexpr int4 | operator- (int32 n) const noexcept |
constexpr int4 | operator* (int32 n) const noexcept |
constexpr int4 | operator/ (int32 n) const noexcept |
constexpr int4 | operator% (int32 n) const noexcept |
constexpr int4 | operator& (int32 n) const noexcept |
constexpr int4 | operator| (int32 n) const noexcept |
constexpr int4 | operator^ (int32 n) const noexcept |
constexpr int4 | operator>> (int32 n) const noexcept |
constexpr int4 | operator<< (int32 n) const noexcept |
constexpr int4 | operator- () const noexcept |
constexpr int4 | operator! () const noexcept |
constexpr int4 | operator~ () const noexcept |
int4 & | operator+= (int4 v) noexcept |
int4 & | operator-= (int4 v) noexcept |
int4 & | operator*= (int4 v) noexcept |
int4 & | operator/= (int4 v) noexcept |
int4 & | operator%= (int4 v) noexcept |
int4 & | operator&= (int4 v) noexcept |
int4 & | operator|= (int4 v) noexcept |
int4 & | operator^= (int4 v) noexcept |
int4 & | operator>>= (int4 v) noexcept |
int4 & | operator<<= (int4 v) noexcept |
int4 & | operator+= (int32 n) noexcept |
int4 & | operator-= (int32 n) noexcept |
int4 & | operator*= (int32 n) noexcept |
int4 & | operator/= (int32 n) noexcept |
int4 & | operator%= (int32 n) noexcept |
int4 & | operator&= (int32 n) noexcept |
int4 & | operator|= (int32 n) noexcept |
int4 & | operator^= (int32 n) noexcept |
int4 & | operator>>= (int32 n) noexcept |
int4 & | operator<<= (int32 n) noexcept |
int4 & | operator= (int32 n) noexcept |
constexpr bool | operator== (int4 v) const noexcept |
constexpr bool | operator!= (int4 v) const noexcept |
constexpr uint4 | operator< (int4 v) const noexcept |
constexpr uint4 | operator> (int4 v) const noexcept |
constexpr uint4 | operator<= (int4 v) const noexcept |
constexpr uint4 | operator>= (int4 v) const noexcept |
constexpr bool | operator== (int32 n) const noexcept |
constexpr bool | operator!= (int32 n) const noexcept |
constexpr uint4 | operator< (int32 n) const noexcept |
constexpr uint4 | operator> (int32 n) const noexcept |
constexpr uint4 | operator<= (int32 n) const noexcept |
constexpr uint4 | operator>= (int32 n) const noexcept |
Public Attributes | |
int32 | x |
int32 | y |
int32 | z |
int32 | w |
Static Public Attributes | |
static const int4 | zero = int4(0) |
static const int4 | one = int4(1) |
static const int4 | minusOne = int4(-1) |
Signed integer 4 component vector structure.
Commonly used to represent: points, positions, directions, velocities, etc.
Creates a new signed integer 4 component vector structure.
xyzw | target value for all vector components |
Creates a new signed integer 4 component vector structure.
x | first vector component value |
y | second vector component value |
z | third vector component value |
w | fourth vector component value |
Creates a new signed integer 4 component vector structure.
xy | first and second vector components value |
z | third vector component value |
w | fourth vector component value |
Creates a new signed integer 4 component vector structure.
x | first vector component value |
yz | second and third vector components value |
w | fourth vector component value |
Creates a new signed integer 4 component vector structure.
x | first vector component value |
y | second vector component value |
zw | third and fourth vector components value |
Creates a new signed integer 4 component vector structure.
xy | first and second vector components value |
zw | third and fourth vector components value |
Creates a new signed integer 4 component vector structure.
xyz | first, second and third vector components value |
w | fourth vector component value |
Creates a new signed integer 4 component vector structure.
x | first vector component value | |
[in] | yzw | second, third and fourth vector components value |
Creates a new signed integer 4 component vector structure.
xyzw | target unsigned integer vector value |
Returns vector component by index.
i | target component index |
Returns vector component by index.
i | target component index |
int32 x |
First vector component.
int32 y |
Second vector component.
int32 z |
Third vector component.
int32 w |
Fourth vector component.