struct TVector3I

template<class T>

A three dimensional vector with integer coordinates.

Public

Constructors

TVector3I<T>

TVector3I<T>() = default

TVector3I<T>

constexpr TVector3I<T>(T x, T y, T z)

TVector3I<T>

constexpr explicit TVector3I<T>(T value)

TVector3I

TVector3I() = default

TVector3I

constexpr TVector3I(int x, int y, int z)

TVector3I

constexpr explicit TVector3I(int value)

TVector3I

TVector3I() = default

TVector3I

constexpr TVector3I(unsigned int x, unsigned int y, unsigned int z)

TVector3I

constexpr explicit TVector3I(unsigned int value)

Methods

Swap

void Swap(TVector3I<T> &other)

Exchange the contents of this vector with another.

ToFloat

Vector3 ToFloat() const

CalculateManhattanDistance

T CalculateManhattanDistance(const TVector3I<T> &other) const

Returns the manhattan distance between this and another point.

SquaredLength

T SquaredLength() const

Returns the square of the length(magnitude) of the vector.

Dot

T Dot(const TVector3I<T> &other) const

Calculates the dot (scalar) product of this vector with another.

Swap

void Swap(TVector3I<i32> &other)

Exchange the contents of this vector with another.

ToFloat

Vector3 ToFloat() const

CalculateManhattanDistance

int CalculateManhattanDistance(const TVector3I<i32> &other) const

Returns the manhattan distance between this and another point.

SquaredLength

int SquaredLength() const

Returns the square of the length(magnitude) of the vector.

Dot

int Dot(const TVector3I<i32> &other) const

Calculates the dot (scalar) product of this vector with another.

Swap

void Swap(TVector3I<u32> &other)

Exchange the contents of this vector with another.

ToFloat

Vector3 ToFloat() const

CalculateManhattanDistance

unsigned int CalculateManhattanDistance(const TVector3I<u32> &other) const

Returns the manhattan distance between this and another point.

SquaredLength

unsigned int SquaredLength() const

Returns the square of the length(magnitude) of the vector.

Dot

unsigned int Dot(const TVector3I<u32> &other) const

Calculates the dot (scalar) product of this vector with another.

Fields

X

T X

Y

T Y

Z

T Z

X

int X

Y

int Y

Z

int Z

X

unsigned int X

Y

unsigned int Y

Z

unsigned int Z

Operators

operator[]

T operator[](size_t index) const

operator[]

T &operator[](size_t index)

operator=

TVector3I<T> &operator=(T value)

operator==

bool operator==(const TVector3I<T> &rhs) const

operator!=

bool operator!=(const TVector3I<T> &rhs) const

operator+

TVector3I<T> operator+(const TVector3I<T> &rhs) const

operator-

TVector3I<T> operator-(const TVector3I<T> &rhs) const

operator*

TVector3I<T> operator*(T value) const

operator*

Vector3 operator*(float value) const

operator*

TVector3I<T> operator*(const TVector3I<T> &rhs) const

operator/

TVector3I<T> operator/(T value) const

operator/

Vector3 operator/(float value) const

operator/

TVector3I<T> operator/(const TVector3I<T> &rhs) const

operator+

const TVector3I<T> &operator+() const

operator+=

TVector3I<T> &operator+=(const TVector3I<T> &rhs)

operator-=

TVector3I<T> &operator-=(const TVector3I<T> &rhs)

operator*=

TVector3I<T> &operator*=(T val)

operator*=

TVector3I<T> &operator*=(const TVector3I<T> &rhs)

operator/=

TVector3I<T> &operator/=(T value)

operator/=

TVector3I<T> &operator/=(const TVector3I<T> &rhs)

operator[]

int operator[](size_t index) const

operator[]

int &operator[](size_t index)

operator=

TVector3I<i32> &operator=(int value)

operator==

bool operator==(const TVector3I<i32> &rhs) const

operator!=

bool operator!=(const TVector3I<i32> &rhs) const

operator+

TVector3I<i32> operator+(const TVector3I<i32> &rhs) const

operator-

TVector3I<i32> operator-(const TVector3I<i32> &rhs) const

operator*

TVector3I<i32> operator*(int value) const

operator*

Vector3 operator*(float value) const

operator*

TVector3I<i32> operator*(const TVector3I<i32> &rhs) const

operator/

TVector3I<i32> operator/(int value) const

operator/

Vector3 operator/(float value) const

operator/

TVector3I<i32> operator/(const TVector3I<i32> &rhs) const

operator+

const TVector3I<i32> &operator+() const

operator+=

TVector3I<i32> &operator+=(const TVector3I<i32> &rhs)

operator-=

TVector3I<i32> &operator-=(const TVector3I<i32> &rhs)

operator*=

TVector3I<i32> &operator*=(int val)

operator*=

TVector3I<i32> &operator*=(const TVector3I<i32> &rhs)

operator/=

TVector3I<i32> &operator/=(int value)

operator/=

TVector3I<i32> &operator/=(const TVector3I<i32> &rhs)

operator[]

unsigned int operator[](size_t index) const

operator[]

unsigned int &operator[](size_t index)

operator=

TVector3I<u32> &operator=(unsigned int value)

operator==

bool operator==(const TVector3I<u32> &rhs) const

operator!=

bool operator!=(const TVector3I<u32> &rhs) const

operator+

TVector3I<u32> operator+(const TVector3I<u32> &rhs) const

operator-

TVector3I<u32> operator-(const TVector3I<u32> &rhs) const

operator*

TVector3I<u32> operator*(unsigned int value) const

operator*

Vector3 operator*(float value) const

operator*

TVector3I<u32> operator*(const TVector3I<u32> &rhs) const

operator/

TVector3I<u32> operator/(unsigned int value) const

operator/

Vector3 operator/(float value) const

operator/

TVector3I<u32> operator/(const TVector3I<u32> &rhs) const

operator+

const TVector3I<u32> &operator+() const

operator+=

TVector3I<u32> &operator+=(const TVector3I<u32> &rhs)

operator-=

TVector3I<u32> &operator-=(const TVector3I<u32> &rhs)

operator*=

TVector3I<u32> &operator*=(unsigned int val)

operator*=

TVector3I<u32> &operator*=(const TVector3I<u32> &rhs)

operator/=

TVector3I<u32> &operator/=(unsigned int value)

operator/=

TVector3I<u32> &operator/=(const TVector3I<u32> &rhs)