![]() |
VPP
0.7
A high-level modern C++ API for Vulkan
|
Shader (GPU-side) data type for mutable variables of 4-element 32-bit float vector type. More...
#include <vppLangVectorTypes.hpp>
Public Member Functions | |
VVec4 () | |
Constructs uninitialized vector variable. | |
VVec4 (const Vec4 &rhs) | |
Constructs vector variable and initializes it with given value. | |
VVec4 (const VVec4 &rhs) | |
Constructs vector variable and initializes it with given value. | |
VVec4 (const std::initializer_list< float > &initValue) | |
Constructs vector variable and initializes it with given constant (curly braces syntax). | |
template<class Arg1T , class Arg2T > | |
VVec4 (const Arg1T &arg1, const Arg2T &arg2) | |
Constructs vector variable and initializes it from two GPU-side values. More... | |
template<class Arg1T , class Arg2T , class Arg3T > | |
VVec4 (const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3) | |
Constructs vector variable and initializes it from three GPU-side values. More... | |
template<class Arg1T , class Arg2T , class Arg3T , class Arg4T > | |
VVec4 (const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3, const Arg4T &arg4) | |
Constructs vector variable and initializes it from four GPU-side values. More... | |
const VVec4 & | operator= (const Vec4 &rhs) |
Assigns new value to vector variable. | |
const VVec4 & | operator= (const VVec4 &rhs) |
Assigns new value to vector variable. | |
operator Vec4 () const | |
Retrieves the r-value from vector variable. | |
Vec4 | operator+= (const Vec4 &rhs) |
Performs addition and assigns result to vector variable. | |
Vec4 | operator-= (const Vec4 &rhs) |
Performs subtraction and assigns result to vector variable. | |
Vec4 | operator*= (const Vec4 &rhs) |
Performs multiplication and assigns result to vector variable. | |
Vec4 | operator/= (const Vec4 &rhs) |
Performs division and assigns result to vector variable. | |
Vec4 | operator%= (const Vec4 &rhs) |
Computes remainder and assigns result to vector variable. | |
Vec4 | operator<<= (const Vec4 &rhs) |
Performs shift to the left and assigns result to vector variable. | |
Vec4 | operator>>= (const Vec4 &rhs) |
Performs shift to the right and assigns result to vector variable. | |
Vec4 | operator &= (const Vec4 &rhs) |
Performs bitwise AND and assigns result to vector variable. | |
Vec4 | operator|= (const Vec4 &rhs) |
Performs bitwise OR and assigns result to vector variable. | |
Vec4 | operator^= (const Vec4 &rhs) |
Performs bitwise XOR and assigns result to vector variable. | |
template<typename IndexT > | |
auto | operator[] (IndexT index) const |
Component selection operation. | |
Static Public Attributes | |
static const size_t | item_count = 4 |
Number of elements in this vector. | |
Shader (GPU-side) data type for mutable variables of 4-element 32-bit float vector type.
Use this type inside shader code as a counterpart of CPU-side float[4] type, when it is required to change value of the vector.
This is a l-value type. It can be initialized and changed any time.
Beware that mutable variables can degrade performance on GPU, therefore Vec4 is preferable, unless you really want a mutable variable.
vpp::VVec4::VVec4 | ( | const Arg1T & | arg1, |
const Arg2T & | arg2 | ||
) |
Constructs vector variable and initializes it from two GPU-side values.
These values can be scalars or vectors. They will be concatenated to form the resulting vector.
vpp::VVec4::VVec4 | ( | const Arg1T & | arg1, |
const Arg2T & | arg2, | ||
const Arg3T & | arg3 | ||
) |
Constructs vector variable and initializes it from three GPU-side values.
These values can be scalars or vectors. They will be concatenated to form the resulting vector.
vpp::VVec4::VVec4 | ( | const Arg1T & | arg1, |
const Arg2T & | arg2, | ||
const Arg3T & | arg3, | ||
const Arg4T & | arg4 | ||
) |
Constructs vector variable and initializes it from four GPU-side values.
These values can be scalars or vectors. They will be concatenated to form the resulting vector.