Representation of material requirements as a fast-searchable bit field. More...
#include <kanzi/core.ui/graphics3d/material_requirements.hpp>
Public Types | |
| using | data_type |
| Internal data type. | |
| enum class | Requirement : unsigned int { KanziShaderOutputColor , KanziShaderOutputColorIndex , KanziShaderOutputNormal , KanziShaderOutputNormalIndex , KanziShaderOutputPbrSettings , KanziShaderOutputPbrSettingsIndex , KanziShaderLightCountDirectional , KanziShaderLightCountPoint , KanziShaderLightCountSpot , KanziShaderShadowMapCountDirectional , KanziShaderShadowMapCountPoint , KanziShaderShadowMapCountSpot , KanziShaderUseSsaoTexture , Count } |
| Enum representing the bit indices. More... | |
Public Member Functions | |
| size_t | count () const |
| Gets the number of requirements bits set to true. | |
| bool | getFlag (Requirement requirement) const |
| Gets the flag at given index. | |
| bool | getFlag (size_t index) const |
| Gets the flag at given index. | |
| unsigned int | getThreeBitValue (Requirement requirement) const |
| Gets the flag at given index. | |
| unsigned int | getThreeBitValue (size_t index) const |
| Gets the three-bit value at given index. | |
| MaterialRequirements ()=default | |
| Default constructor. | |
| MaterialRequirements (const MaterialRequirements &)=default | |
| Default copy constructor. | |
| MaterialRequirements (MaterialRequirements &&)=default | |
| Default move constructor. | |
| MaterialRequirements (string_view parsedString) | |
| Constructor. | |
| bool | operator< (const MaterialRequirements &rhs) const |
| Less than -operator. | |
| MaterialRequirements & | operator= (const MaterialRequirements &)=default |
| Default copy operator. | |
| MaterialRequirements & | operator= (MaterialRequirements &&)=default |
| Default copy operator. | |
Static Public Attributes | |
| static const size_t | BitFieldSize |
| Number of bits. | |
Protected Member Functions | |
| void | parseData (string_view parsedString) |
| Parse the internal data contents. | |
| void | parseDefinition (string_view parsedString) |
| Parse an individual definition into the correct location in the data. | |
Protected Attributes | |
| data_type | m_data |
| Actual data for the requirements. | |
Representation of material requirements as a fast-searchable bit field.
Internal data type.
Enum representing the bit indices.
|
explicitdefault |
Default constructor.
|
inlineexplicit |
Constructor.
| parsedString | String to parse for contents. |
|
default |
Default copy constructor.
|
default |
Default move constructor.
|
default |
Default copy operator.
|
default |
Default copy operator.
|
protected |
Parse the internal data contents.
| parsedString | String to parse for contents. |
|
protected |
Parse an individual definition into the correct location in the data.
| parsedString | Definition string to parse. |
|
inline |
Gets the number of requirements bits set to true.
|
inline |
Gets the flag at given index.
| index | Index to check. |
|
inline |
Gets the flag at given index.
| requirement | Requirement to check. |
Gets the three-bit value at given index.
| index | Index to check. |
|
inline |
Gets the flag at given index.
| requirement | Requirement to check. |
| bool kanzi::MaterialRequirements::operator< | ( | const MaterialRequirements & | rhs | ) | const |
Less than -operator.
| rhs | Right-hand-side operand. |
|
static |
Number of bits.
|
protected |
Actual data for the requirements.
Stored as a bitset to make searching as fast as possible.