Unigine::Unigine::dvec3 Struct
Header: | #include <UnigineMathLib.h> |
Vector of 3 double components.
To use this structure, include the UnigineMathLib.h file.
dvec3 Class
Members
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.
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.
void set(const double * val)
Set vector.Arguments
- const double * val - Pointer to the vector.
void set(const dvec2 & val, double z_)
Arguments
- const dvec2 & val
- double z_
void set(const dvec3 & val)
Arguments
- const dvec3 & val
void set(double val)
Arguments
- double val
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()
dvec3 & normalize()
const double * operator const double *()
const void * operator const void *()
double * operator double *()
void * operator void *()
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)
Vector addition.Arguments
- const dvec3 & val - The value of the vector.
Return value
The resulting vector.dvec3 operator-() 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
dvec3 & operator/=(double val)
Arguments
- double val
dvec3 & operator=(const dvec3 & val)
Arguments
- const dvec3 & 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 BACK
int DOWN
int EPS
int FORWARD
int INF
int LEFT
int ONE
int RIGHT
int UP
int ZERO
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)