Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

# Unigine::Unigine::ivec3 Struct

Vector of 3 integer components.

To use this structure, include the UnigineMathLib.h file.

## ivec3(const __m128i & v)

### Arguments

• const __m128i & v

## ivec3()

Default constructor that produces a zero vector.

## ivec3(const ivec3 & v)

Initialization by a vector.

### Arguments

• const ivec3 & v - The value of the vector.

## ivec3(int x, int y, int z)

Initialization by scalars.

### Arguments

• int x - X component of the vector.
• int y - Y component of the vector.
• int z - Z component of the vector.

## explicit ivec3(int v)

Initialization by a scalar: x=v, y=v, z=v.

### Arguments

• int v - The value of the vector.

## explicit ivec3(const vec3 & v)

Initialization by a vector.

### Arguments

• const vec3 & v - The value of the vector.

## explicit ivec3(const dvec3 & v)

Initialization by a vector of double components.

### Arguments

• const dvec3 & v - The value of the vector.

## explicit ivec3(const int * v)

Initialization by a pointer to the vector.

### Arguments

• const int * v - Pointer to the vector.

## voidset(int x_, int y_, int z_)

Set vector.

### Arguments

• int x_ - X component of the vector.
• int y_ - Y component of the vector.
• int z_ - Z component of the vector.

## voidset(const int * val)

Set vector.

### Arguments

• const int * val - Pointer to the vector.

## voidset(const ivec3 & val)

### Arguments

• const ivec3 & val

• int val

## int *get()

Get a pointer to the vector.

### Return value

Pointer to the vector.

## const int *get() const

Get a constant pointer to the vector.

### Return value

Pointer to the vector.

• int * val

## ivec3 &operator*=(int val)

Scalar multiplication.

### Arguments

• int val - The value of the scalar.

### Return value

The resulting vector.

## ivec3 &operator*=(const ivec3 & val)

Vector multiplication.

### Arguments

• const ivec3 & val - The value of the vector.

### Return value

The resulting vector.

## ivec3 &operator+=(const ivec3 & val)

### Arguments

• const ivec3 & val - The value of the vector.

### Return value

The resulting vector.

## ivec3operator-() const

Vector negation.

### Return value

The resulting vector.

## ivec3 &operator-=(const ivec3 & val)

Vector subtraction.

### Arguments

• const ivec3 & val - The value of the vector.

### Return value

The resulting vector.

## ivec3 &operator/=(int val)

Scalar division.

### Arguments

• int val - The value of the scalar.

### Return value

The resulting vector.

## ivec3 &operator/=(const ivec3 & val)

Vector division.

### Arguments

• const ivec3 & val - The value of the vector.

### Return value

The resulting vector.

## ivec3 &operator<<=(int val)

Left bit shift.

### Arguments

• int val - The shift amount.

### Return value

The resulting vector.

## ivec3 &operator=(const ivec3 & val)

### Arguments

• const ivec3 & val

## ivec3 &operator=(const __m128i & val)

### Arguments

• const __m128i & val

## ivec3 &operator>>=(int val)

Right bit shift.

### Arguments

• int val - The shift amount.

### Return value

The resulting vector.

## int &operator[](int i)

Array access.

### Arguments

• int i - Array item index.

The array item.

## intoperator[](int i) const

Constant array access.

### Arguments

• int i - Array item index.

The array item.

## voidsse(const __m128i & val)

### Arguments

• const __m128i & val

## int ZERO

Last update: 2017-07-03