This page has been translated automatically.
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::Unigine::dvec4 Struct

 Header: #include

Vector of 4 double components.

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

## dvec4(const hvec4 & v)

### Arguments

• const hvec4 & v

## dvec4()

Default constructor that produces a zero vector.

## dvec4(const dvec4 & v)

Initialization by a vector.

### Arguments

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

## dvec4(const dvec2 & v, double z, double w)

Initialization by a vector and two scalars.

### Arguments

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

## dvec4(const dvec3 & v, double w)

Initialization by a vector and a scalar.

### Arguments

• const dvec3 & v - The value of the vector.
• double w - W component of the vector.

## dvec4(double x, double y, double z, double w)

Initialization by scalars.

### Arguments

• double x - X component of the vector.
• double y - Y component of the vector.
• double z - Z component of the vector.
• double w - W component of the vector.

## explicit dvec4(double v)

Initialization by a scalar.

### Arguments

• double v - The value of the scalar.

## explicit dvec4(const dvec2 & v)

Initialization by a two component vector: x=v.x, y=v.y, z=0.0f, w=1.0.

### Arguments

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

## explicit dvec4(const dvec3 & v)

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

### Arguments

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

## explicit dvec4(const vec4 & v)

Initialization by a vector.

### Arguments

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

## explicit dvec4(const ivec4 & v)

Initialization by a vector of integer components.

### Arguments

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

## explicit dvec4(const bvec4 & v)

Initialization by a vector of byte components.

### Arguments

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

## explicit dvec4(const double * v)

Initialization by a pointer to the vector.

### Arguments

• const double * v - Pointer to the vector.

## voidset(double x_, double y_, double z_, double w_)

Set vector.

### Arguments

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

## voidset(const double * val)

Set vector.

### Arguments

• const double * val - Pointer to the vector.

## voidset(const dvec4 & val)

### Arguments

• const dvec4 & val

## voidset(const dvec3 & val, double w_)

### Arguments

• const dvec3 & val
• double w_

• double val

## voidset(const dvec2 & val, double z_, double w_)

### Arguments

• const dvec2 & val
• double z_
• double w_

## voidget(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.

## dvec4 &operator*=(double val)

Scalar multiplication.

### Arguments

• double val - The value of the scalar.

### Return value

The resulting vector.

## dvec4 &operator*=(const dvec4 & val)

Vector multiplication.

### Arguments

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

### Return value

The resulting vector.

## dvec4 &operator+=(const dvec4 & val)

Vector addition.

### Arguments

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

### Return value

The resulting vector.

## dvec4operator-() const

Vector negation.

### Return value

The resulting vector.

## dvec4 &operator-=(const dvec4 & val)

Vector subtraction.

### Arguments

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

### Return value

The resulting vector.

## dvec4 &operator/=(const dvec4 & val)

### Arguments

• const dvec4 & val

• double val

## dvec4 &operator=(const dvec4 & val)

### Arguments

• const dvec4 & val

## double &operator[](int i)

Array access.

### Arguments

• int i - Array item index.

The array item.

## doubleoperator[](int i) const

Constant array access.

### Arguments

• int i - Array item index.

The array item.

## voidsse(const __m128d & v0, const __m128d & v1)

### Arguments

• const __m128d & v0
• const __m128d & v1

## voidsse0(const __m128d & val)

### Arguments

• const __m128d & val

## voidsse1(const __m128d & val)

### Arguments

• const __m128d & val

## int ZERO

Last update: 2017-07-03