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
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::hvec2 Class

Header:#include <UnigineMathLib.h>

The hvec2 vector consists of 2 ushort (16-bit integer) values.

hvec2 Class

Members


hvec2()

Default constructor. Initialized the vector with two 0 values.
Source code (C++)
hvec2(0,0);

hvec2(const hvec2 & v)

Constructor. Initializes the vector by copying given one.

Arguments

  • const hvec2 & v - hvec2 vector to be copied.

hvec2(half x, half y)

Constructor. Initializes the vector by using given half values.

Arguments

  • half x - The fisrt component of the hvec2 vector.
  • half y - The second component of the hvec2 vector.

hvec2(half v)

Constructor. Initializes the vector by using given half value.

Arguments

  • half v - Half value for all hvec2 components.

hvec2(float v)

Constructor. Initializes the vector by using given float value.

Arguments

  • float v - Float value for all hvec2 components.

hvec2(const vec2 & v)

Constructor. Initializes the vector by using given vec2 vector.

Arguments

  • const vec2 & v - vec2 value for corresponding hvec2 vector components.

hvec2(const dvec2 & v)

Constructor. Initializes the vector by using given dvec2 vector.

Arguments

  • const dvec2 & v - dvec2 value for corresponding hvec2 vector components.

const half * operator const Unigine::Math::half *()

const void * operator const void *()

half * operator Unigine::Math::half *()

void * operator void *()

hvec2 & operator=(const hvec2 & v)

Performs vector assignment. Source vector = Destination vector.

Arguments

  • const hvec2 & v - Destination vector.

Return value

Source vector.

half & operator[](int i)

Performs array access to the vector item reference by using given item index.

Arguments

  • int i - Index of the vector item.

Return value

Vector item reference.

half operator[](int i)

Performs array access to the vector item by using given item index.

Arguments

  • int i - Index of the vector item.

Return value

Vector item.

int ONE

int ZERO

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