This page has been translated automatically.
Programming
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::Unigine::ivec3 Struct

Header:#include <UnigineMathLib.h>

Vector of 3 integer components.

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

ivec3 Class

Members


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.

void set(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.

void set(const int * val)

Set vector.

Arguments

  • const int * val - Pointer to the vector.

void set(const ivec3 & val)

Arguments

  • const ivec3 & val

void set(int val)

Arguments

  • 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.

void get(int * val)

Arguments

  • int * val

int length2()

__m128i operator __m128i()

const int * operator const int *()

const void * operator const void *()

int * operator int *()

void * operator void *()

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)

Vector addition.

Arguments

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

Return value

The resulting vector.

ivec3 operator-() 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.

Return value

The array item.

int operator[](int i) const

Constant array access.

Arguments

  • int i - Array item index.

Return value

The array item.

__m128i sse()

void sse(const __m128i & val)

Arguments

  • const __m128i & val

int ONE

int ZERO

Last update: 2017-07-03
Build: ()