UniformValueBag Class Template
Typed uniform container keyed by compile-time uniform tags. More...
Declaration
Public Constructors Index
template <typename TUniformScope> | |
| UniformValueBag () | |
|
Constructs a value bag and resets all stored values. More... | |
Public Member Functions Index
template <typename TUniformScope> | |
| void | clearValues () |
|
Resets all stored uniform values to defaults. More... | |
template <typename TUniform> | |
| bool | has () const noexcept |
|
Checks whether a typed uniform value is marked as active. More... | |
template <typename TUniformScope> | |
| bool | has (const UniformSemantics semantics) const noexcept |
|
Checks whether a semantic slot is marked as active. More... | |
template <typename TUniform> | |
| const TUniform::value_type & | get () |
|
Returns the stored value for a typed uniform. More... | |
template <typename TUniform> | |
| void | set (const typename TUniform::value_type &value) |
|
Stores a value for a typed uniform and marks it active. More... | |
template <typename TUniformScope> | |
| const helios::math::mat4f * | mat4f (const UniformSemantics semantics) const noexcept |
|
Returns a matrix pointer for a matrix semantic. More... | |
template <typename TUniformScope> | |
| const helios::math::vec4f * | vec4f (const UniformSemantics semantics) const noexcept |
|
Returns a vector pointer for a vector semantic. More... | |
Private Member Attributes Index
template <typename TUniformScope> | |
| helios::math::mat4f | modelMatrix |
template <typename TUniformScope> | |
| helios::math::mat4f | projectionMatrix |
template <typename TUniformScope> | |
| helios::math::mat4f | viewMatrix |
template <typename TUniformScope> | |
| helios::math::vec4f | materialBaseColor |
template <typename TUniformScope> | |
| helios::math::vec4f | textColor |
template <typename TUniformScope> | |
| int | textTexture |
template <typename TUniformScope> | |
| float | materialRoughness |
template <typename TUniformScope> | |
| float | deltaTime |
template <typename TUniformScope> | |
| float | totalTime |
template <typename TUniformScope> | |
| std::bitset< std::to_underlying(UniformSemantics::size_)> | active_ |
Description
Typed uniform container keyed by compile-time uniform tags.
- Template Parameters
-
TUniformScope Uniform lifetime scope tag (for example pass or draw).
Definition at line 29 of file UniformValueBag.ixx.
Public Constructors
UniformValueBag()
| inline |
Constructs a value bag and resets all stored values.
Definition at line 50 of file UniformValueBag.ixx.
Reference helios::engine::rendering::shader::UniformValueBag< TUniformScope >::clearValues.
Public Member Functions
clearValues()
| inline |
Resets all stored uniform values to defaults.
Definition at line 58 of file UniformValueBag.ixx.
References helios::engine::rendering::shader::types::deltaTime and helios::engine::rendering::shader::types::totalTime.
Referenced by helios::engine::rendering::shader::UniformValueBag< TUniformScope >::UniformValueBag.
get()
| inline |
Returns the stored value for a typed uniform.
- Template Parameters
-
TUniform Uniform tag type.
- Returns
Const reference to the stored value.
Definition at line 97 of file UniformValueBag.ixx.
has()
| inline noexcept |
Checks whether a typed uniform value is marked as active.
- Template Parameters
-
TUniform Uniform tag type providing semantics.
- Returns
true if the semantic slot is active.
Definition at line 78 of file UniformValueBag.ixx.
Referenced by helios::engine::rendering::shader::UniformValueBag< TUniformScope >::mat4f and helios::engine::rendering::shader::UniformValueBag< TUniformScope >::vec4f.
has()
| inline noexcept |
Checks whether a semantic slot is marked as active.
- Parameters
-
semantics Semantic slot to query.
- Returns
true if the semantic slot is active.
Definition at line 87 of file UniformValueBag.ixx.
mat4f()
| inline noexcept |
Returns a matrix pointer for a matrix semantic.
- Parameters
-
semantics Semantic slot to query.
- Returns
Pointer to mat4f or nullptr.
Definition at line 140 of file UniformValueBag.ixx.
References helios::engine::rendering::shader::UniformValueBag< TUniformScope >::has and helios::engine::rendering::registerComponents.
set()
| inline |
Stores a value for a typed uniform and marks it active.
- Template Parameters
-
TUniform Uniform tag type.
- Parameters
-
value Value to store.
Definition at line 119 of file UniformValueBag.ixx.
vec4f()
| inline noexcept |
Returns a vector pointer for a vector semantic.
- Parameters
-
semantics Semantic slot to query.
- Returns
Pointer to vec4f or nullptr.
Definition at line 162 of file UniformValueBag.ixx.
References helios::engine::rendering::shader::UniformValueBag< TUniformScope >::has and helios::engine::rendering::registerComponents.
Private Member Attributes
active_
|
Definition at line 43 of file UniformValueBag.ixx.
deltaTime
|
Definition at line 40 of file UniformValueBag.ixx.
materialBaseColor
|
Definition at line 33 of file UniformValueBag.ixx.
materialRoughness
|
Definition at line 39 of file UniformValueBag.ixx.
modelMatrix
|
Definition at line 30 of file UniformValueBag.ixx.
projectionMatrix
|
Definition at line 31 of file UniformValueBag.ixx.
textColor
|
Definition at line 35 of file UniformValueBag.ixx.
textTexture
|
Definition at line 37 of file UniformValueBag.ixx.
totalTime
|
Definition at line 41 of file UniformValueBag.ixx.
viewMatrix
|
Definition at line 32 of file UniformValueBag.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.