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::dvec3 Struct

Vector of 3 double components.

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

## dvec3(const hvec3 & v)

### Arguments

• const hvec3 & v

## dvec3()

Default constructor that produces a zero vector.

## dvec3(const dvec3 & v)

Initialization by a vector.

### Arguments

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

## dvec3(const dvec2 & v, double z)

Initialization by a vector and a scalar.

### Arguments

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

## dvec3(double x, double y, double z)

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.

## explicit dvec3(double v)

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

### Arguments

• double v - The value of the vector.

## explicit dvec3(const dvec2 & v)

Initialization by a vector of two double components: x=v.x, y=v.y, z=0.0.

### Arguments

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

## explicit dvec3(const dvec4 & v)

Initialization by a vector of four double components: x=v.x, y=v.y, z=v.z.

### Arguments

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

## explicit dvec3(const vec3 & v)

Initialization by a vector.

### Arguments

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

## explicit dvec3(const ivec3 & v)

Initialization by a vector of integer components.

### Arguments

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

## explicit dvec3(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_)

Set vector.

### Arguments

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

## voidset(const double * val)

Set vector.

### Arguments

• const double * val - Pointer to the vector.

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

### Arguments

• const dvec2 & val
• double z_

## voidset(const dvec3 & val)

### Arguments

• const dvec3 & val

• double val

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

## dvec3 &operator*=(double val)

Scalar multiplication.

### Arguments

• double val - The value of the scalar.

### Return value

The resulting vector.

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

Vector multiplication.

### Arguments

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

### Return value

The resulting vector.

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

### Arguments

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

### Return value

The resulting vector.

## dvec3operator-() const

Vector negation.

### Return value

The resulting vector.

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

Vector subtraction.

### Arguments

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

### Return value

The resulting vector.

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

### Arguments

• const dvec3 & val

• double val

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

### Arguments

• const dvec3 & 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