Signed integer 3 component vector structure. More...
#include <int.hpp>
Public Member Functions | |
constexpr | int3 (int32 xyz=0) noexcept |
Creates a new signed integer 3 component vector structure. | |
constexpr | int3 (int32 x, int32 y, int32 z) noexcept |
Creates a new signed integer 3 component vector structure. | |
constexpr | int3 (int2 xy, int32 z) noexcept |
Creates a new signed integer 3 component vector structure. | |
constexpr | int3 (int32 x, int2 yz) noexcept |
Creates a new signed integer 3 component vector structure. | |
constexpr | int3 (uint3 xyz) noexcept |
Creates a new signed integer 3 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 uint3 () const noexcept |
Returns as 3 component unsigned 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. (xy) | |
constexpr | operator int32 () const noexcept |
Returns first vector component value. (xy) | |
constexpr int3 | operator+ (int3 v) const noexcept |
constexpr int3 | operator- (int3 v) const noexcept |
constexpr int3 | operator* (int3 v) const noexcept |
constexpr int3 | operator/ (int3 v) const noexcept |
constexpr int3 | operator% (int3 v) const noexcept |
constexpr int3 | operator& (int3 v) const noexcept |
constexpr int3 | operator| (int3 v) const noexcept |
constexpr int3 | operator^ (int3 v) const noexcept |
constexpr int3 | operator>> (int3 v) const noexcept |
constexpr int3 | operator<< (int3 v) const noexcept |
constexpr int3 | operator+ (int32 n) const noexcept |
constexpr int3 | operator- (int32 n) const noexcept |
constexpr int3 | operator* (int32 n) const noexcept |
constexpr int3 | operator/ (int32 n) const noexcept |
constexpr int3 | operator% (int32 n) const noexcept |
constexpr int3 | operator& (int32 n) const noexcept |
constexpr int3 | operator| (int32 n) const noexcept |
constexpr int3 | operator^ (int32 n) const noexcept |
constexpr int3 | operator>> (int32 n) const noexcept |
constexpr int3 | operator<< (int32 n) const noexcept |
constexpr int3 | operator- () const noexcept |
constexpr int3 | operator! () const noexcept |
constexpr int3 | operator~ () const noexcept |
int3 & | operator+= (int3 v) noexcept |
int3 & | operator-= (int3 v) noexcept |
int3 & | operator*= (int3 v) noexcept |
int3 & | operator/= (int3 v) noexcept |
int3 & | operator%= (int3 v) noexcept |
int3 & | operator&= (int3 v) noexcept |
int3 & | operator|= (int3 v) noexcept |
int3 & | operator^= (int3 v) noexcept |
int3 & | operator>>= (int3 v) noexcept |
int3 & | operator<<= (int3 v) noexcept |
int3 & | operator+= (int32 n) noexcept |
int3 & | operator-= (int32 n) noexcept |
int3 & | operator*= (int32 n) noexcept |
int3 & | operator/= (int32 n) noexcept |
int3 & | operator%= (int32 n) noexcept |
int3 & | operator&= (int32 n) noexcept |
int3 & | operator|= (int32 n) noexcept |
int3 & | operator^= (int32 n) noexcept |
int3 & | operator>>= (int32 n) noexcept |
int3 & | operator<<= (int32 n) noexcept |
int3 & | operator= (int32 n) noexcept |
constexpr bool | operator== (int3 v) const noexcept |
constexpr bool | operator!= (int3 v) const noexcept |
constexpr uint3 | operator< (int3 v) const noexcept |
constexpr uint3 | operator> (int3 v) const noexcept |
constexpr uint3 | operator<= (int3 v) const noexcept |
constexpr uint3 | operator>= (int3 v) const noexcept |
constexpr bool | operator== (int32 n) const noexcept |
constexpr bool | operator!= (int32 n) const noexcept |
constexpr uint3 | operator< (int32 n) const noexcept |
constexpr uint3 | operator> (int32 n) const noexcept |
constexpr uint3 | operator<= (int32 n) const noexcept |
constexpr uint3 | operator>= (int32 n) const noexcept |
Public Attributes | |
int32 | x |
int32 | y |
int32 | z |
Static Public Attributes | |
static const int3 | zero = int3(0) |
static const int3 | one = int3(1) |
static const int3 | minusOne = int3(-1) |
static const int3 | left = int3(-1, 0, 0) |
static const int3 | right = int3(1, 0, 0) |
static const int3 | bottom = int3(0, -1, 0) |
static const int3 | top = int3(0, 1, 0) |
static const int3 | back = int3(0, 0, -1) |
static const int3 | front = int3(0, 0, 1) |
Signed integer 3 component vector structure.
Commonly used to represent: points, positions, directions, velocities, etc.
Creates a new signed integer 3 component vector structure.
xyz | target value for all vector components |
Creates a new signed integer 3 component vector structure.
x | first vector component value |
y | second vector component value |
z | third vector component value |
Creates a new signed integer 3 component vector structure.
xy | first and second vector components value |
z | third vector component value |
Creates a new signed integer 3 component vector structure.
x | first vector component value |
yz | second and third vector components value |
Creates a new signed integer 3 component vector structure.
xyz | 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.