Material Class
Represents a parameterizable material. More...
Declaration
Public Constructors Index
| Material (std::shared_ptr< const helios::rendering::shader::Shader > shader, std::shared_ptr< const helios::rendering::material::MaterialShaderProperties > materialProperties) | |
Protected Constructors Index
| Material ()=default | |
Public Destructor Index
| ~Material ()=default | |
Public Member Functions Index
| const helios::rendering::material::MaterialShaderProperties & | materialProperties () const noexcept |
|
Returns a const reference to the underlying MaterialShaderProperties. More... | |
| const helios::rendering::shader::Shader & | shader () const noexcept |
|
Returns a const ref to the shader used by this instance. More... | |
| void | writeUniformValues (helios::rendering::shader::UniformValueMap &uniformValueMap) const noexcept |
|
Writes this Material's uniform values into the given map. More... | |
Protected Member Attributes Index
| std::shared_ptr< const helios::rendering::material::MaterialShaderProperties > | materialProperties_ |
|
Shared pointer for the raw, immutable MaterialShaderProperties. More... | |
| std::shared_ptr< const helios::rendering::shader::Shader > | shader_ {} |
|
Shared pointer to the immutable Shader. More... | |
Protected Static Attributes Index
| static const helios::util::log::Logger & | logger_ = helios::util::log::LogManager::loggerForScope(HELIOS_LOG_SCOPE) |
Description
Represents a parameterizable material.
A Material contains a reference to a shared, immutable `Shader` and material properties used to configure the shader at draw time.
Definition at line 26 of file Material.ixx.
Public Constructors
Material()
| inline explicit |
Creates a new Material.
- Parameters
-
shader A shared pointer to the immutable Shader used by this instance.
materialProperties A shared pointer to the MaterialShaderProperties for this Material.
- Exceptions
-
std::invalid_argument if shader or materialProperties is a null shared pointer.
Definition at line 58 of file Material.ixx.
References logger_, materialProperties, materialProperties_, shader and shader_.
Protected Constructors
Material()
| protected default |
Definition at line 30 of file Material.ixx.
Public Destructor
~Material()
| virtual default |
Definition at line 48 of file Material.ixx.
Public Member Functions
materialProperties()
| inline nodiscard noexcept |
Returns a const reference to the underlying MaterialShaderProperties.
- Returns
The const reference to this Material's MaterialShaderProperties.
Definition at line 79 of file Material.ixx.
Reference materialProperties_.
Referenced by Material.
shader()
| inline nodiscard noexcept |
Returns a const ref to the shader used by this instance.
- Returns
A const ref to the Shader used by this Material.
Definition at line 89 of file Material.ixx.
Reference shader_.
Referenced by Material.
writeUniformValues()
| inline noexcept |
Writes this Material's uniform values into the given map.
Delegates to MaterialShaderProperties::writeUniformValues().
- Parameters
-
uniformValueMap Target map receiving the uniform values.
Definition at line 101 of file Material.ixx.
Reference materialProperties_.
Protected Member Attributes
materialProperties_
| protected |
Shared pointer for the raw, immutable MaterialShaderProperties.
Definition at line 35 of file Material.ixx.
Referenced by Material, materialProperties and writeUniformValues.
shader_
| protected |
Protected Static Attributes
logger_
| protected static |
Shared logger instance for all Material objects.
Definition at line 45 of file Material.ixx.
Referenced by Material.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.