Class representing a 4-dimensional vector for both CPU and GPU. More...
Functions | |
| _FCT_CPU_GPU_ int | size () const |
| Return the size of the sl::Vector4. More... | |
| _FCT_CPU_GPU_ | Vector4 () |
| Default constructor. More... | |
| _FCT_CPU_GPU_ | Vector4 (const T &t) |
| Constructor. More... | |
| _FCT_CPU_GPU_ | Vector4 (const T *tp) |
| Constructor. More... | |
| _FCT_CPU_GPU_ | Vector4 (const T v0, const T v1, const T v2, const T v3) |
| Constructor. More... | |
| _FCT_CPU_GPU_ | Vector4 (const Vector4< T > &v) |
| Copy constructor. More... | |
| _FCT_CPU_GPU_ | Vector4 (const Vector4< T > &v, const T d) |
| Constructor. More... | |
| _FCT_CPU_GPU_ | Vector4 (const Vector3< T > &v, const T d=0) |
| Constructor. More... | |
| _FCT_CPU_GPU_ const T * | ptr () const |
| Returns a pointer of the first component. More... | |
| _FCT_CPU_GPU_ Vector4< T > & | setValues (const T *b) |
| Sets the components of the sl::Vector1 to the values of the argument. More... | |
| _FCT_CPU_GPU_ Vector4< T > & | operator= (const Vector3< T > &other) |
| Test the equality of the first three components of the sl::Vector4 with a sl::Vector3. More... | |
| _FCT_CPU_GPU_ T & | operator[] (const unsigned int i) |
| Returns the i-th component. More... | |
| _FCT_CPU_GPU_ const T & | operator[] (const unsigned int i) const |
| Returns the i-th component. More... | |
| template<typename U = T> | |
| _FCT_CPU_GPU_ void | operator[] (const unsigned int i) &&=delete |
| Prevent operator from being called by temporaries (such as rvalue) More... | |
| _FCT_CPU_GPU_ float | norm () |
| Returns the norm of the sl::Vector4. More... | |
| _FCT_CPU_GPU_ float | square () |
| Returns the squared norm of the sl::Vector4. More... | |
| _FCT_CPU_GPU_ float | sum () |
| Returns the sum of the components of the sl::Vector4. More... | |
Static Functions | |
| static _FCT_CPU_GPU_ float | dot (const Vector4< T > &a, const Vector4< T > &b) |
| Returns the dot product of two sl::Vector4. More... | |
| static _FCT_CPU_GPU_ float | distance (const Vector4< T > &a, const Vector4< T > &b) |
| Returns the distance between two sl::Vector4. More... | |
Class representing a 4-dimensional vector for both CPU and GPU.
|
inline |
Default constructor.
Initialize the sl::Vector4 to 0.
|
inline |
Constructor.
Initialize the sl::Vector4 to ( t, t, t, t ).
|
inline |
Constructor.
Initialize the sl::Vector4 with the component of the argument.
|
inline |
Constructor.
Initialize the sl::Vector4 to ( v0, v1, v2, v3 ).
Copy constructor.
Initialize the sl::Vector4 by copying another sl::Vector4.
Constructor.
Initialize the sl::Vector4 with the first three components of a sl::Vector4 and a scalar (for the forth component).
Constructor.
Initialize the sl::Vector4 with a sl::Vector3 and a scalar (for the forth component).
|
inline |
Return the size of the sl::Vector4.
|
inline |
Returns a pointer of the first component.
|
inline |
Sets the components of the sl::Vector1 to the values of the argument.
Test the equality of the first three components of the sl::Vector4 with a sl::Vector3.
|
inline |
Returns the i-th component.
|
inline |
Returns the i-th component.
|
delete |
Prevent operator from being called by temporaries (such as rvalue)
|
inline |
Returns the norm of the sl::Vector4.
|
inline |
Returns the squared norm of the sl::Vector4.
|
inline |
Returns the sum of the components of the sl::Vector4.
Returns the dot product of two sl::Vector4.
Returns the distance between two sl::Vector4.