VPP  0.8
A high-level modern C++ API for Vulkan
vpp::BVec4 Class Reference

Shader (GPU-side) data type for 4-element boolean vectors. More...

#include <vppLangVectorTypes.hpp>

Public Member Functions

 BVec4 (const std::initializer_list< bool > &init)
 Vector initialization with curly braces syntax. More...
 
 BVec4 (bool init)
 Vector initialization to single constant value.
 
 BVec4 (const BVec4 &rhs)
 Vector initialization from another vector.
 
template<class Arg1T >
 BVec4 (const Arg1T &arg1)
 Vector initialization from GPU-side value. More...
 
template<class Arg1T , class Arg2T >
 BVec4 (const Arg1T &arg1, const Arg2T &arg2)
 Vector initialization from two GPU-side values. More...
 
template<class Arg1T , class Arg2T , class Arg3T >
 BVec4 (const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3)
 Vector initialization from three GPU-side values. More...
 
template<class Arg1T , class Arg2T , class Arg3T , class Arg4T >
 BVec4 (const Arg1T &arg1, const Arg2T &arg2, const Arg3T &arg3, const Arg4T &arg4)
 Vector initialization from four GPU-side values. More...
 
BVec4 operator && (const BVec4 &rhs) const
 Logical AND operation on vector components.
 
BVec4 operator|| (const BVec4 &rhs) const
 Logical OR operation on vector components.
 
BVec4 operator! () const
 Logical NOT operation on vector components.
 
BVec4 operator== (const BVec4 &rhs) const
 Comparison (equal) operation on vector components.
 
BVec4 operator!= (const BVec4 &rhs) const
 Comparison (not equal) operation on vector components.
 
BVec4 operator> (const BVec4 &rhs) const
 Comparison (greater) operation on vector components.
 
BVec4 operator>= (const BVec4 &rhs) const
 Comparison (greater or equal) operation on vector components.
 
BVec4 operator< (const BVec4 &rhs) const
 Comparison (less) operation on vector components.
 
BVec4 operator<= (const BVec4 &rhs) const
 Comparison (less or equal) operation on vector components.
 
auto operator[] (ESwizzle sw) const
 Computes a permutation of vector components.
 

Static Public Attributes

static const size_t item_count = 4
 Number of elements in this vector.
 

Detailed Description

Shader (GPU-side) data type for 4-element boolean vectors.

Use this type inside shader code as a counterpart of CPU-side bool[4] type.

This is a r-value type. You must initialize it with value, either CPU-side one (an explicit constant), or an expression computed on GPU side. The value can not be changed.

For mutable variable type, see VBVec4. Beware that mutable variables can degrade performance on GPU, therefore BVec4 is preferable, unless you really want a mutable variable.

Constructor & Destructor Documentation

◆ BVec4() [1/5]

vpp::BVec4::BVec4 ( const std::initializer_list< bool > &  init)

Vector initialization with curly braces syntax.

For example:

BVec4 { true, false, false, false }

◆ BVec4() [2/5]

template<class Arg1T >
vpp::BVec4::BVec4 ( const Arg1T &  arg1)
explicit

Vector initialization from GPU-side value.

The value can be a scalar, or another vector.

◆ BVec4() [3/5]

template<class Arg1T , class Arg2T >
vpp::BVec4::BVec4 ( const Arg1T &  arg1,
const Arg2T &  arg2 
)

Vector initialization from two GPU-side values.

These values can be scalars or vectors. They will be concatenated to form the resulting vector.

◆ BVec4() [4/5]

template<class Arg1T , class Arg2T , class Arg3T >
vpp::BVec4::BVec4 ( const Arg1T &  arg1,
const Arg2T &  arg2,
const Arg3T &  arg3 
)

Vector initialization from three GPU-side values.

These values can be scalars or vectors. They will be concatenated to form the resulting vector.

◆ BVec4() [5/5]

template<class Arg1T , class Arg2T , class Arg3T , class Arg4T >
vpp::BVec4::BVec4 ( const Arg1T &  arg1,
const Arg2T &  arg2,
const Arg3T &  arg3,
const Arg4T &  arg4 
)

Vector initialization from four GPU-side values.

These values can be scalars or vectors. They will be concatenated to form the resulting vector.


The documentation for this class was generated from the following file: