Class representing a 3-dimensional vector for both CPU and GPU. More...
Functions | |
_FCT_CPU_GPU_ int | size () const |
Return the size of the sl::Vector3. More... | |
_FCT_CPU_GPU_ | Vector3 () |
Default constructor. More... | |
_FCT_CPU_GPU_ | Vector3 (const T &t) |
Constructor. More... | |
_FCT_CPU_GPU_ | Vector3 (const T *tp) |
Constructor. More... | |
_FCT_CPU_GPU_ | Vector3 (const T v0, const T v1, const T v2) |
Constructor. More... | |
_FCT_CPU_GPU_ | Vector3 (const Vector3< T > &v) |
Copy constructor. More... | |
_FCT_CPU_GPU_ | Vector3 (const Vector2< T > &v, const T d=0) |
Constructor. More... | |
_FCT_CPU_GPU_ | Vector3 (const Vector4< T > &v) |
Constructor. More... | |
_FCT_CPU_GPU_ const T * | ptr () const |
Returns a pointer of the first component. More... | |
_FCT_CPU_GPU_ Vector3< T > & | setValues (const T *b) |
Sets the components of the sl::Vector3 to the values of the argument. More... | |
_FCT_CPU_GPU_ Vector3< T > & | operator= (const Vector4< T > &other) |
Test the equality of the sl::Vector3 with the first three components of a sl::Vector4. More... | |
_FCT_CPU_GPU_ T & | operator[] (int i) |
Returns the i-th component. More... | |
_FCT_CPU_GPU_ float | norm () |
Returns the norm of the sl::Vector3. More... | |
_FCT_CPU_GPU_ float | square () |
Returns the squared norm of the sl::Vector3. More... | |
_FCT_CPU_GPU_ float | sum () |
Returns the sum of the components of the sl::Vector3. More... | |
Static Functions | |
static _FCT_CPU_GPU_ float | dot (const Vector3< T > &a, const Vector3< T > &b) |
Returns the dot product of two sl::Vector3. More... | |
static _FCT_CPU_GPU_ float | distance (const Vector3< T > &a, const Vector3< T > &b) |
Returns the distance between two sl::Vector3. More... | |
static _FCT_CPU_GPU_ Vector3< T > | cross (const Vector3< T > &a, const Vector3< T > &b) |
Returns the cross product between two sl::Vector3. More... | |
Class representing a 3-dimensional vector for both CPU and GPU.
|
inline |
Default constructor.
Initialize the sl::Vector3 to 0.
|
inline |
Constructor.
Initialize the sl::Vector3 to ( t, t, t ).
|
inline |
Constructor.
Initialize the sl::Vector3 with the component of the argument.
|
inline |
Constructor.
Initialize the sl::Vector3 to ( v0, v1, v2 ).
Copy constructor.
Initialize the sl::Vector3 by copying another sl::Vector3.
Constructor.
Initialize the sl::Vector3 with a sl::Vector2 and a scalar (for the third component).
Constructor.
Initialize the sl::Vector3 with the first three components of a sl::Vector4.
|
inline |
Return the size of the sl::Vector3.
|
inline |
Returns a pointer of the first component.
|
inline |
Sets the components of the sl::Vector3 to the values of the argument.
Test the equality of the sl::Vector3 with the first three components of a sl::Vector4.
|
inline |
Returns the i-th component.
|
inline |
Returns the norm of the sl::Vector3.
|
inline |
Returns the squared norm of the sl::Vector3.
|
inline |
Returns the sum of the components of the sl::Vector3.
Returns the dot product of two sl::Vector3.
Returns the distance between two sl::Vector3.
|
inlinestatic |
Returns the cross product between two sl::Vector3.