Vector3D.hpp
Go to the documentation of this file.
21 };
279 return m_floats[0] * (_obj1.m_floats[1] * _obj2.m_floats[2] - _obj1.m_floats[2] * _obj2.m_floats[1])
281 + m_floats[2] * (_obj1.m_floats[0] * _obj2.m_floats[1] - _obj1.m_floats[1] * _obj2.m_floats[0]);
531 // To siplify the writing of the code ==> this permit to have the same name with the glsl language...
Vector3D< T > & operator-=(const Vector3D< T > &_obj)
Subtract a vector from this one.
Definition: Vector3D.hpp:90
float distance2(const Vector3D< T > &_obj) const
Return the distance squared between the ends of this and another vector This is symantically treating...
Definition: Vector3D.hpp:186
void setMin(const Vector3D< T > &_obj)
Set each element to the min of the current values and the values of another Vector3D<T> ...
Definition: Vector3D.hpp:477
void getSkewSymmetricMatrix(Vector3D< T > *_obj0, Vector3D< T > *_obj1, Vector3D< T > *_obj2) const
Create a skew matrix of the object.
Definition: Vector3D.hpp:501
int32_t maxAxis() const
Return the axis with the largest value.
Definition: Vector3D.hpp:297
int32_t furthestAxis() const
Return the axis with the smallest ABSOLUTE value.
Definition: Vector3D.hpp:307
basic namespace of the etk library. (it might contain all the etk fuctions/class/structures without m...
Definition: Archive.hpp:16
Vector3D< T > operator*(const T &_val)
Scale the vector.
Definition: Vector3D.hpp:122
vec3 vec3ClipInt32(const vec3 &_val)
Limit at integer value the input vector: vec3(1.2, 5.6, -2.9) ==> vec3(1.0, 5.0, -2.0)
Definition: Vector3D.hpp:555
Vector3D< T > & operator*=(const T &_val)
Scale the vector.
Definition: Vector3D.hpp:111
Vector3D< T > & operator+=(const Vector3D< T > &_obj)
Add a vector to this one.
Definition: Vector3D.hpp:69
Vector3D< T > operator+(const Vector3D< T > &_obj)
Add a vector to this one.
Definition: Vector3D.hpp:80
vec3 vec3ClipInt64(const vec3 &_val)
Limit at integer value the input vector: vec3(1.2, 5.6, -2.9) ==> vec3(1.0, 5.0, -2.0)
Definition: Vector3D.hpp:563
Vector3D< T > rotate(const Vector3D< T > &_wAxis, const float _angle) const
Return a rotated version of this vector.
Definition: Vector3D.hpp:234
float distance(const Vector3D< T > &_obj) const
Return the distance between the ends of this and another vector This is symantically treating the vec...
Definition: Vector3D.hpp:195
void setValue(const T &_xxx, const T &_yyy, const T &_zzz)
Set Value on the vector.
Definition: Vector3D.hpp:489
Vector3D(const T &_xxx, const T &_yyy, const T &_zzz)
Constructor from scalars.
Definition: Vector3D.hpp:58
Vector3D< T > absolute() const
Return a vector will the absolute values of each element.
Definition: Vector3D.hpp:257
int32_t closestAxis() const
Return the axis with the largest ABSOLUTE value.
Definition: Vector3D.hpp:314
int32_t minAxis() const
Return the axis with the smallest value.
Definition: Vector3D.hpp:287
T triple(const Vector3D< T > &_obj1, const Vector3D< T > &_obj2) const
Return the triple product between this and another vector and another.
Definition: Vector3D.hpp:278
float dot(const Vector3D< T > &_obj) const
Return the dot product.
Definition: Vector3D.hpp:157
void setInterpolate3(const Vector3D< T > &_obj0, const Vector3D< T > &_obj1, T _ratio)
Interpolate the vector with a ration between 2 others.
Definition: Vector3D.hpp:323
bool operator!=(const Vector3D< T > &_obj) const
In-Equality compare operator with an other object.
Definition: Vector3D.hpp:457
Vector3D< T > & operator/=(const Vector3D< T > &_val)
Inversely scale the vector.
Definition: Vector3D.hpp:132
Vector3D< T > operator-(const Vector3D< T > &_obj)
Subtract a vector from this one.
Definition: Vector3D.hpp:101
Vector3D< T > normalized() const
Return a normalized version of this vector.
Definition: Vector3D.hpp:223
void setMax(const Vector3D< T > &_obj)
Set each element to the max of the current values and the values of another Vector3D<T> ...
Definition: Vector3D.hpp:467
Vector3D< T > & operator*=(const Vector3D< T > &_obj)
Elementwise multiply this vector by the other.
Definition: Vector3D.hpp:346
bool isZero() const
Check if the vector is equal to (0,0,0)
Definition: Vector3D.hpp:517
Vector3D< T > & safeNormalize()
Normalize this vector x^2 + y^2 + z^2 = 1 (check if not deviding by 0, if it is the case ==> return (...
Definition: Vector3D.hpp:202
Vector3D< T > & operator/=(const T &_val)
Inversely scale the vector.
Definition: Vector3D.hpp:143
Vector3D< T > lerp(const Vector3D< T > &_obj, const float &_ratio) const
Return the linear interpolation between this and another vector.
Definition: Vector3D.hpp:336
etk::Vector3D< float > vec3
wrapper on etk::Vector3D<float> to have the same naming has OpenGL shader
Definition: Vector3D.hpp:535
bool operator==(const Vector3D< T > &_obj) const
Equality compare operator with an other object.
Definition: Vector3D.hpp:445
Vector3D< T > cross(const Vector3D< T > &_obj) const
Return the cross product between this and another vector.
Definition: Vector3D.hpp:267
float angle(const Vector3D< T > &_obj) const
Calculate the angle between this and another vector.
Definition: Vector3D.hpp:246
float length2() const
Get the length of the vector squared.
Definition: Vector3D.hpp:166
Vector3D< T > operator*(const Vector3D< T > &_obj)
Elementwise multiply this vector by the other.
Definition: Vector3D.hpp:357
Vector3D< T > & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
Definition: Vector3D.hpp:216
Vector3D()
No initialization constructor (faster ...)
Definition: Vector3D.hpp:37