This page has been translated automatically.
编程
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
应用程序接口
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::dvec2 Struct

Header:#include <UnigineMathLib.h>

Vector of 2 double components.

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

dvec2 Class

Members


dvec2(const __m128d & v)

Arguments

  • const __m128d & v

dvec2(const hvec2 & v)

Arguments

  • const hvec2 & v

dvec2()

Default constructor that produces a zero vector.

dvec2(const dvec2 & v)

Initialization by a vector.

Arguments

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

dvec2(double x, double y)

Initialization by scalars.

Arguments

  • double x - X component of the vector.
  • double y - Y component of the vector.

explicit dvec2(double v)

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

Arguments

  • double v - The value of the vector.

explicit dvec2(const dvec3 & v)

Initialization by a four component vector: x=v.x, y=v.y.

Arguments

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

explicit dvec2(const dvec4 & v)

Initialization by a four component vector: x=v.x, y=v.y.

Arguments

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

explicit dvec2(const vec2 & v)

Initialization by a vector.

Arguments

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

explicit dvec2(const ivec2 & v)

Initialization by a vector of integer components.

Arguments

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

explicit dvec2(const double * v)

Initialization by a pointer to the vector.

Arguments

  • const double * v - Pointer to the vector.

void set(double x_, double y_)

Set vector.

Arguments

  • double x_ - X component of the vector.
  • double y_ - Y component of the vector.

void set(const double * val)

Set vector.

Arguments

  • const double * val - Pointer to the vector.

void set(double val)

Arguments

  • double val

void set(const dvec2 & val)

Arguments

  • const dvec2 & val

void get(double * val) const

Get vector.

Arguments

  • double * val - Pointer to the vector.

double * get()

Get a pointer to the vector.

Return value

Pointer to the vector.

const double * get() const

Get a constant pointer to the vector.

Return value

Pointer to the vector.

double length()

double length2()

dvec2 & normalize()

__m128d operator __m128d()

const double * operator const double *()

const void * operator const void *()

double * operator double *()

void * operator void *()

dvec2 & operator*=(double val)

Scalar multiplication.

Arguments

  • double val - The value of the scalar.

Return value

The resulting vector.

dvec2 & operator*=(const dvec2 & val)

Vector multiplication.

Arguments

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

Return value

The resulting vector.

dvec2 & operator+=(const dvec2 & val)

Vector addition.

Arguments

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

Return value

The resulting vector.

dvec2 operator-() const

Vector negation.

Return value

The resulting vector.

dvec2 & operator-=(const dvec2 & val)

Vector subtraction.

Arguments

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

Return value

The resulting vector.

dvec2 & operator/=(double val)

Arguments

  • double val

dvec2 & operator/=(const dvec2 & val)

Arguments

  • const dvec2 & val

dvec2 & operator=(const __m128d & val)

Arguments

  • const __m128d & val

dvec2 & operator=(const dvec2 & val)

Arguments

  • const dvec2 & val

double & operator[](int i)

Array access.

Arguments

  • int i - Array item index.

Return value

The array item.

double operator[](int i) const

Constant array access.

Arguments

  • int i - Array item index.

Return value

The array item.

void sse(const __m128d & val)

Arguments

  • const __m128d & val

__m128d sse()


int EPS

int INF

int ONE

int ZERO

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