This page has been translated automatically.
Programming
Fundamentials
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
Engine Classes
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility Classes
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.

ivec4 Struct (C++)

Vector of 4 integer components.

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

Unigine::ivec4Structure

Members


UNIGINE_DECLARE_USE_MEMORY UNIGINE_INLINE ivec4 ()

Default constructor that produces a zero vector.

UNIGINE_INLINE ivec4 (const ivec4 & v)

Initialization by a vector.

Arguments

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

UNIGINE_INLINE ivec4 (const ivec2 & v, int z, int w)

Initialization by a vector and two scalars.

Arguments

  • const ivec2 & v - The value of the vector.
  • int z - Z component of the vector.
  • int w - W component of the vector.

UNIGINE_INLINE ivec4 (const ivec3 & v, int w)

Initialization by a vector and a scalar.

Arguments

  • const ivec3 & v - The value of the vector.
  • int w - W component of the vector.

UNIGINE_INLINE ivec4 (int x, int y, int z, int w)

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.
  • int w - W component of the vector.

explicit UNIGINE_INLINE ivec4 (int v)

Initialization by a scalar.

Arguments

  • int v - The value of the scalar.

explicit UNIGINE_INLINE ivec4 (const ivec2 & v)

Initialization by a two component vector: x=v.x, y=v.y, z=0, w=0.

Arguments

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

explicit UNIGINE_INLINE ivec4 (const ivec3 & v)

Initialization by a three component vector: x=v.x, y=v.y, z=v.z, w=0.

Arguments

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

explicit UNIGINE_INLINE ivec4 (const vec4 & v)

Initialization by a vector.

Arguments

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

explicit UNIGINE_INLINE ivec4 (const dvec4 & v)

Initialization by a vector of double components.

Arguments

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

explicit UNIGINE_INLINE ivec4 (const bvec4 & v)

Initialization by a vector of byte components.

Arguments

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

explicit UNIGINE_INLINE ivec4 (const int * v)

Initialization by a pointer to the vector.

Arguments

  • const int * v - Pointer to the vector.

UNIGINE_INLINE ivec4 operator- () const

Vector negation.

Return value

The resulting vector.

UNIGINE_INLINE ivec4 & operator*= (int v)

Scalar multiplication.

Arguments

  • int v - The value of the scalar.

Return value

The resulting vector.

UNIGINE_INLINE ivec4 & operator*= (const ivec4 & v)

Vector multiplication.

Arguments

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

Return value

The resulting vector.

UNIGINE_INLINE ivec4 & operator/= (int v)

Scalar division.

Arguments

  • int v - The value of the scalar.

Return value

The resulting vector.

UNIGINE_INLINE ivec4 & operator/= (const ivec4 & v)

Vector division.

Arguments

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

Return value

The resulting vector.

UNIGINE_INLINE ivec4 & operator+= (const ivec4 & v)

Vector addition.

Arguments

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

Return value

The resulting vector.

UNIGINE_INLINE ivec4 & operator-= (const ivec4 & v)

Vector subtraction.

Arguments

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

Return value

The resulting vector.

UNIGINE_INLINE ivec4 & operator<<= (int v)

Left bit shift.

Arguments

  • int v - The shift amount.

Return value

The resulting vector.

UNIGINE_INLINE ivec4 & operator>>= (int v)

Right bit shift.

Arguments

  • int v - The shift amount.

Return value

The resulting vector.

UNIGINE_INLINE int & operator[] (int i)

Array access.

Arguments

  • int i - Array item index.

Return value

The array item.

UNIGINE_INLINE int operator[] (int i) const

Constant array access.

Arguments

  • int i - Array item index.

Return value

The array item.

UNIGINE_INLINE void set (int x_, int y_, int z_, int w_)

Set vector.

Arguments

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

UNIGINE_INLINE void set (const int * v)

Set vector.

Arguments

  • const int * v - Pointer to the vector.

UNIGINE_INLINE int * get ()

Get a pointer to the vector.

Return value

Pointer to the vector.

UNIGINE_INLINE const int * get () const

Get a constant pointer to the vector.

Return value

Pointer to the vector.

Unigine::ivec4::Union

union {
struct {
int x;
int y;
int z;
int w;
};
int v[4];
};
Last update: 2017-07-03
Build: ()