This page has been translated automatically.
Getting Started
Migrating to UNIGINE 2.0
C++ API Migration
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
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::dvec3 Struct

Vector of 3 double components.

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

Unigine::dvec3 Structure

Members


UNIGINE_DECLARE_USE_MEMORY UNIGINE_INLINE dvec3 ()

Default constructor that produces a zero vector.

UNIGINE_INLINE dvec3 (const dvec3 & v)

Initialization by a vector.

Arguments

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

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

UNIGINE_INLINE 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 UNIGINE_INLINE dvec3 (double v)

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

Arguments

  • double v - The value of the vector.

explicit UNIGINE_INLINE 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 UNIGINE_INLINE 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 UNIGINE_INLINE dvec3 (const vec3 & v)

Initialization by a vector.

Arguments

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

explicit UNIGINE_INLINE dvec3 (const ivec3 & v)

Initialization by a vector of integer components.

Arguments

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

explicit UNIGINE_INLINE dvec3 (const double * v)

Initialization by a pointer to the vector.

Arguments

  • const double * v - Pointer to the vector.

UNIGINE_INLINE dvec3 operator- () const

Vector negation.

Return value

The resulting vector.

UNIGINE_INLINE dvec3 & operator*= (double v)

Scalar multiplication.

Arguments

  • double v - The value of the scalar.

Return value

The resulting vector.

UNIGINE_INLINE dvec3 & operator*= (const dvec3 & v)

Vector multiplication.

Arguments

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

Return value

The resulting vector.

UNIGINE_INLINE dvec3 & operator+= (const dvec3 & v)

Vector addition.

Arguments

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

Return value

The resulting vector.

UNIGINE_INLINE dvec3 & operator-= (const dvec3 & v)

Vector subtraction.

Arguments

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

Return value

The resulting vector.

UNIGINE_INLINE double & operator[] (int i)

Array access.

Arguments

  • int i - Array item index.

Return value

The array item.

UNIGINE_INLINE double operator[] (int i) const

Constant array access.

Arguments

  • int i - Array item index.

Return value

The array item.

UNIGINE_INLINE void set (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.

UNIGINE_INLINE void set (const double * v)

Set vector.

Arguments

  • const double * v - Pointer to the vector.

UNIGINE_INLINE void get (double * v) const

Get vector.

Arguments

  • double * v - Pointer to the vector.

UNIGINE_INLINE double * get ()

Get a pointer to the vector.

Return value

Pointer to the vector.

UNIGINE_INLINE const double * get () const

Get a constant pointer to the vector.

Return value

Pointer to the vector.

Unigine::dvec3:: Union

union {
struct {
double x;
double y;
double z;
double w;
};
double v[4];
};
Last update: 2017-07-03
Build: ()