Unigine::Unigine::dvec4 Struct
Header: | #include <UnigineMathLib.h> |
Vector of 4 double components.
To use this structure, include the UnigineMathLib.h file.
dvec4 Class
Members
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.
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.
void set(const double * val)
Set vector.Arguments
- const double * val - Pointer to the vector.
void set(const dvec4 & val)
Arguments
- const dvec4 & val
void set(const dvec3 & val, double w_)
Arguments
- const dvec3 & val
- double w_
void set(double val)
Arguments
- double val
void set(const dvec2 & val, double z_, double w_)
Arguments
- const dvec2 & val
- double z_
- double w_
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()
dvec4 & normalize()
dvec4 & normalize3()
const double * operator const double *()
const void * operator const void *()
double * operator double *()
void * operator void *()
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.dvec4 operator-() 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
dvec4 & operator/=(double val)
Arguments
- double val
dvec4 & operator=(const dvec4 & val)
Arguments
- const dvec4 & 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 & v0, const __m128d & v1)
Arguments
- const __m128d & v0
- const __m128d & v1
__m128d sse0()
void sse0(const __m128d & val)
Arguments
- const __m128d & val
void sse1(const __m128d & val)
Arguments
- const __m128d & val
__m128d sse1()
int EPS
int INF
int ONE
int ZERO
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)