Unigine::ivec2 Struct
Header: | #include <UnigineMathLib.h> |
Vector of 2 integer components.
To use this structure, include the UnigineMathLib.h file.
ivec2 Class
Members
ivec2()
Default constructor that produces a zero vector.ivec2(const ivec2 & v)
Initialization by a vector.Arguments
- const ivec2 & v - The value of the vector.
ivec2(int x, int y)
Initialization by scalars.Arguments
- int x - X component of the vector.
- int y - Y component of the vector.
explicit ivec2(int v)
Initialization by a scalar: x=v, y=v.Arguments
- int v - The value of the vector.
explicit ivec2(const vec2 & v)
Initialization by a vector.Arguments
- const vec2 & v - The value of the vector.
explicit ivec2(const dvec2 & v)
Initialization by a vector of double components.Arguments
- const dvec2 & v - The value of the vector.
explicit ivec2(const int * v)
Initialization by a pointer to the vector.Arguments
- const int * v - Pointer to the vector.
void set(int x_, int y_)
Set vector.Arguments
- int x_ - X component of the vector.
- int y_ - Y component of the vector.
void set(const int * val)
Set vector.Arguments
- const int * val - Pointer to the vector.
void set(const ivec2 & val)
Arguments
- const ivec2 & 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()
const int * operator const int *()
const void * operator const void *()
int * operator int *()
void * operator void *()
ivec2 & operator*=(int val)
Scalar multiplication.Arguments
- int val - The value of the scalar.
Return value
The resulting vector.ivec2 & operator*=(const ivec2 & val)
Vector multiplication.Arguments
- const ivec2 & val - The value of the vector.
Return value
The resulting vector.ivec2 & operator+=(const ivec2 & val)
Vector addition.Arguments
- const ivec2 & val - The value of the vector.
Return value
The resulting vector.ivec2 operator-() const
Vector negation.Return value
The resulting vector.ivec2 & operator-=(const ivec2 & val)
Vector subtraction.Arguments
- const ivec2 & val - The value of the vector.
Return value
The resulting vector.ivec2 & operator/=(int val)
Scalar division.Arguments
- int val - The value of the scalar.
Return value
The resulting vector.ivec2 & operator/=(const ivec2 & val)
Vector division.Arguments
- const ivec2 & val - The value of the vector.
Return value
The resulting vector.ivec2 & operator<<=(int val)
Left bit shift.Arguments
- int val - The shift amount.
Return value
The resulting vector.ivec2 & operator=(const ivec2 & val)
Arguments
- const ivec2 & val
ivec2 & 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.int ONE
int ZERO
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)