Unigine::dvec4 Struct
Vector of 4 double components.
To use this structure, include the UnigineMathLib.h file.
Unigine::dvec4 Structure
Members
UNIGINE_INLINE dvec4 ()
Default constructor that produces a zero vector.UNIGINE_INLINE dvec4 (const dvec4 & v)
Initialization by a vector.Arguments
- const dvec4 & v - The value of the vector.
UNIGINE_INLINE 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.
UNIGINE_INLINE 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.
UNIGINE_INLINE 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 UNIGINE_INLINE dvec4 (double v)
Initialization by a scalar.Arguments
- double v - The value of the scalar.
explicit UNIGINE_INLINE 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 UNIGINE_INLINE 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 UNIGINE_INLINE dvec4 (const vec4 & v)
Initialization by a vector.Arguments
- const vec4 & v - The value of the vector.
explicit UNIGINE_INLINE dvec4 (const ivec4 & v)
Initialization by a vector of integer components.Arguments
- const ivec4 & v - The value of the vector.
explicit UNIGINE_INLINE dvec4 (const double * v)
Initialization by a pointer to the vector.Arguments
- const double * v - Pointer to the vector.
UNIGINE_INLINE dvec4 operator- () const
Vector negation.Return value
The resulting vector.UNIGINE_INLINE dvec4 & operator*= (double v)
Scalar multiplication.Arguments
- double v - The value of the scalar.
Return value
The resulting vector.UNIGINE_INLINE dvec4 & operator*= (const dvec4 & v)
Vector multiplication.Arguments
- const dvec4 & v - The value of the vector.
Return value
The resulting vector.UNIGINE_INLINE dvec4 & operator+= (const dvec4 & v)
Vector addition.Arguments
- const dvec4 & v - The value of the vector.
Return value
The resulting vector.UNIGINE_INLINE dvec4 & operator-= (const dvec4 & v)
Vector subtraction.Arguments
- const dvec4 & 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_, 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.
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::dvec4:: Union
union {
struct
{
double x;
double y;
double z;
double w;
};
double v[4];
};
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)