template<MaterialLayer layer>
Magnum::Trade::MaterialLayerData class new in Git master

Material layer data.

Convenience wrapper that re-routes all MaterialData base material layer and attribute accessors APIS from to a layer specified in the layer template parameter. All APIs expect that given layer exists. See Material layers for more information.

Base classes

class MaterialData new in Git master
Material data.

Constructors, destructors, conversion operators

MaterialData(MaterialTypes types, Containers::Array<MaterialAttributeData>&& attributeData, const void* importerState = nullptr) explicit noexcept
Construct.
MaterialData(MaterialTypes types, std::initializer_list<MaterialAttributeData> attributeData, const void* importerState = nullptr) explicit
MaterialData(MaterialTypes types, DataFlags attributeDataFlags, Containers::ArrayView<const MaterialAttributeData> attributeData, const void* importerState = nullptr) explicit noexcept
Construct a non-owned material data.
MaterialData(MaterialTypes types, Containers::Array<MaterialAttributeData>&& attributeData, Containers::Array<UnsignedInt>&& layerData, const void* importerState = nullptr) explicit noexcept
Construct with layers.
MaterialData(MaterialTypes types, std::initializer_list<MaterialAttributeData> attributeData, std::initializer_list<UnsignedInt> layerData, const void* importerState = nullptr) explicit
MaterialData(MaterialTypes types, DataFlags attributeDataFlags, Containers::ArrayView<const MaterialAttributeData> attributeData, DataFlags layerDataFlags, Containers::ArrayView<const UnsignedInt> layerData, const void* importerState = nullptr) explicit noexcept
Construct a non-owned material data with layers.
MaterialData(const MaterialData&) deleted
Copying is not allowed.
MaterialData(MaterialData&&) noexcept
Move constructor.

Public functions

auto layerName() const -> Containers::StringView
Layer name.
auto layerFactor() const -> Float
Layer factor.
auto layerFactorTexture() const -> UnsignedInt
Layer factor texture ID.
auto layerFactorTextureSwizzle() const -> MaterialTextureSwizzle
Layer factor texture swizzle.
auto layerFactorTextureMatrix() const -> Matrix3
Layer factor texture coordinate transformation matrix.
auto layerFactorTextureCoordinates() const -> UnsignedInt
Layer factor texture coordinate set.
auto attributeCount() const -> UnsignedInt
Attribute count in this layer.
auto hasAttribute(Containers::StringView name) const -> bool
Whether this layer has given attribute.
auto hasAttribute(MaterialAttribute name) const -> bool
auto attributeId(Containers::StringView name) const -> UnsignedInt
ID of a named attribute in this layer.
auto attributeId(MaterialAttribute name) const -> UnsignedInt
auto attributeName(UnsignedInt id) const -> Containers::StringView
Name of an attribute in this layer.
auto attributeType(UnsignedInt id) const -> MaterialAttributeType
Type of an attribute in this layer.
auto attributeType(Containers::StringView name) const -> MaterialAttributeType
auto attributeType(MaterialAttribute name) const -> MaterialAttributeType
auto attribute(UnsignedInt id) const -> const void*
Type-erased value of an attribute in this layer.
auto attribute(Containers::StringView name) const -> const void*
auto attribute(MaterialAttribute name) const -> const void*
template<class T>
auto attribute(UnsignedInt id) const -> T
Value of an attribute in this layer.
template<class T>
auto attribute(Containers::StringView name) const -> T
template<class T>
auto attribute(MaterialAttribute name) const -> T
auto tryAttribute(Containers::StringView name) const -> const void*
Type-erased attribute value in this layer, if exists.
auto tryAttribute(MaterialAttribute name) const -> const void*
template<class T>
auto tryAttribute(Containers::StringView name) const -> Containers::Optional<T>
Value of a named attribute in this layer, if exists.
template<class T>
auto tryAttribute(MaterialAttribute name) const -> Containers::Optional<T>
template<class T>
auto attributeOr(Containers::StringView name, const T& defaultValue) const -> T
Value of a named attribute in this layer or a default.
template<class T>
auto attributeOr(MaterialAttribute name, const T& defaultValue) const -> T
auto layerName(UnsignedInt layer) const -> Containers::StringView
Layer name.
auto layerFactor(UnsignedInt layer) const -> Float
Factor of given layer.
auto layerFactor(Containers::StringView layer) const -> Float
Factor of a named layer.
auto layerFactor(MaterialLayer layer) const -> Float
auto layerFactorTexture(UnsignedInt layer) const -> UnsignedInt
Factor texture ID for given layer.
auto layerFactorTexture(Containers::StringView layer) const -> UnsignedInt
Factor texture ID for a named layer.
auto layerFactorTexture(MaterialLayer layer) const -> UnsignedInt
auto layerFactorTextureSwizzle(UnsignedInt layer) const -> MaterialTextureSwizzle
Factor texture swizzle for given layer.
auto layerFactorTextureSwizzle(Containers::StringView layer) const -> MaterialTextureSwizzle
Factor texture swizzle for a named layer.
auto layerFactorTextureSwizzle(MaterialLayer layer) const -> MaterialTextureSwizzle
auto layerFactorTextureMatrix(UnsignedInt layer) const -> Matrix3
Factor texture coordinate transformation matrix for given layer.
auto layerFactorTextureMatrix(Containers::StringView layer) const -> Matrix3
Factor texture coordinate transformation matrix for a named layer.
auto layerFactorTextureMatrix(MaterialLayer layer) const -> Matrix3
auto layerFactorTextureCoordinates(UnsignedInt layer) const -> UnsignedInt
Factor texture coordinate set for given layer.
auto layerFactorTextureCoordinates(Containers::StringView layer) const -> UnsignedInt
Factor texture coordinate set for a named layer.
auto layerFactorTextureCoordinates(MaterialLayer layer) const -> UnsignedInt
auto attributeCount(UnsignedInt layer) const -> UnsignedInt
Attribute count in given layer.
auto attributeCount(Containers::StringView layer) const -> UnsignedInt
Attribute count in a named layer.
auto attributeCount(MaterialLayer layer) const -> UnsignedInt
auto attributeCount() const -> UnsignedInt
Attribute count in the base material.
auto hasAttribute(UnsignedInt layer, Containers::StringView name) const -> bool
Whether a material layer has given attribute.
auto hasAttribute(UnsignedInt layer, MaterialAttribute name) const -> bool
auto hasAttribute(Containers::StringView layer, Containers::StringView name) const -> bool
Whether a named material layer has given attribute.
auto hasAttribute(Containers::StringView layer, MaterialAttribute name) const -> bool
auto hasAttribute(MaterialLayer layer, Containers::StringView name) const -> bool
auto hasAttribute(MaterialLayer layer, MaterialAttribute name) const -> bool
auto hasAttribute(Containers::StringView name) const -> bool
Whether the base material has given attribute.
auto hasAttribute(MaterialAttribute name) const -> bool
auto attributeId(UnsignedInt layer, Containers::StringView name) const -> UnsignedInt
ID of a named attribute in given material layer.
auto attributeId(UnsignedInt layer, MaterialAttribute name) const -> UnsignedInt
auto attributeId(Containers::StringView layer, Containers::StringView name) const -> UnsignedInt
ID of a named attribute in a named material layer.
auto attributeId(Containers::StringView layer, MaterialAttribute name) const -> UnsignedInt
auto attributeId(MaterialLayer layer, Containers::StringView name) const -> UnsignedInt
auto attributeId(MaterialLayer layer, MaterialAttribute name) const -> UnsignedInt
auto attributeId(Containers::StringView name) const -> UnsignedInt
ID of a named attribute in the base material.
auto attributeId(MaterialAttribute name) const -> UnsignedInt
auto attributeName(UnsignedInt layer, UnsignedInt id) const -> Containers::StringView
Name of an attribute in given material layer.
auto attributeName(Containers::StringView layer, UnsignedInt id) const -> Containers::StringView
Name of an attribute in a named material layer.
auto attributeName(MaterialLayer layer, UnsignedInt id) const -> Containers::StringView
auto attributeName(UnsignedInt id) const -> Containers::StringView
Name of an attribute in the base material.
auto attributeType(UnsignedInt layer, UnsignedInt id) const -> MaterialAttributeType
Type of an attribute in given material layer.
auto attributeType(UnsignedInt layer, Containers::StringView name) const -> MaterialAttributeType
Type of a named attribute in given material layer.
auto attributeType(UnsignedInt layer, MaterialAttribute name) const -> MaterialAttributeType
auto attributeType(Containers::StringView layer, UnsignedInt id) const -> MaterialAttributeType
Type of an attribute in a named material layer.
auto attributeType(MaterialLayer layer, UnsignedInt id) const -> MaterialAttributeType
auto attributeType(Containers::StringView layer, Containers::StringView name) const -> MaterialAttributeType
Type of a named attribute in a named material layer.
auto attributeType(Containers::StringView layer, MaterialAttribute name) const -> MaterialAttributeType
auto attributeType(MaterialLayer layer, Containers::StringView name) const -> MaterialAttributeType
auto attributeType(MaterialLayer layer, MaterialAttribute name) const -> MaterialAttributeType
auto attributeType(UnsignedInt id) const -> MaterialAttributeType
Type of an attribute in the base material.
auto attributeType(Containers::StringView name) const -> MaterialAttributeType
Type of a named attribute in the base material.
auto attributeType(MaterialAttribute name) const -> MaterialAttributeType
auto attribute(UnsignedInt layer, UnsignedInt id) const -> const void*
Type-erased value of an attribute in given material layer.
auto attribute(UnsignedInt layer, Containers::StringView name) const -> const void*
Type-erased value of a named attribute in given material layer.
auto attribute(UnsignedInt layer, MaterialAttribute name) const -> const void*
auto attribute(Containers::StringView layer, UnsignedInt id) const -> const void*
Type-erased value of an attribute in a named material layer.
auto attribute(MaterialLayer layer, UnsignedInt id) const -> const void*
auto attribute(Containers::StringView layer, Containers::StringView name) const -> const void*
Type-erased value of a named attribute in a named material layer.
auto attribute(Containers::StringView layer, MaterialAttribute name) const -> const void*
auto attribute(MaterialLayer layer, Containers::StringView name) const -> const void*
auto attribute(MaterialLayer layer, MaterialAttribute name) const -> const void*
auto attribute(UnsignedInt id) const -> const void*
Type-erased value of an attribute in the base material.
auto attribute(Containers::StringView name) const -> const void*
Type-erased value of a named attribute in the base material.
auto attribute(MaterialAttribute name) const -> const void*
template<class T>
auto attribute(UnsignedInt layer, UnsignedInt id) const -> T
Value of an attribute in given material layer.
template<class T>
auto attribute(UnsignedInt layer, Containers::StringView name) const -> T
Value of a named attribute in given material layer.
template<class T>
auto attribute(UnsignedInt layer, MaterialAttribute name) const -> T
template<class T>
auto attribute(Containers::StringView layer, UnsignedInt id) const -> T
Value of an attribute in a named material layer.
template<class T>
auto attribute(MaterialLayer layer, UnsignedInt id) const -> T
template<class T>
auto attribute(Containers::StringView layer, Containers::StringView name) const -> T
Value of a named attribute in a named material layer.
template<class T>
auto attribute(Containers::StringView layer, MaterialAttribute name) const -> T
template<class T>
auto attribute(MaterialLayer layer, Containers::StringView name) const -> T
template<class T>
auto attribute(MaterialLayer layer, MaterialAttribute name) const -> T
template<class T>
auto attribute(UnsignedInt id) const -> T
Value of an attribute in the base material.
template<class T>
auto attribute(Containers::StringView name) const -> T
Value of a named attribute in the base material.
template<class T>
auto attribute(MaterialAttribute name) const -> T
auto tryAttribute(UnsignedInt layer, Containers::StringView name) const -> const void*
Type-erased attribute value in given material layer, if exists.
auto tryAttribute(UnsignedInt layer, MaterialAttribute name) const -> const void*
auto tryAttribute(Containers::StringView layer, Containers::StringView name) const -> const void*
Type-erased attribute value in a named material layer, if exists.
auto tryAttribute(Containers::StringView layer, MaterialAttribute name) const -> const void*
auto tryAttribute(MaterialLayer layer, Containers::StringView name) const -> const void*
auto tryAttribute(MaterialLayer layer, MaterialAttribute name) const -> const void*
template<class T>
auto tryAttribute(UnsignedInt layer, Containers::StringView name) const -> Containers::Optional<T>
Value of a named attribute in given material layer, if exists.
template<class T>
auto tryAttribute(UnsignedInt layer, MaterialAttribute name) const -> Containers::Optional<T>
template<class T>
auto tryAttribute(Containers::StringView layer, Containers::StringView name) const -> Containers::Optional<T>
Value of a named attribute in a named material layer, if exists.
template<class T>
auto tryAttribute(Containers::StringView layer, MaterialAttribute name) const -> Containers::Optional<T>
template<class T>
auto tryAttribute(MaterialLayer layer, Containers::StringView name) const -> Containers::Optional<T>
template<class T>
auto tryAttribute(MaterialLayer layer, MaterialAttribute name) const -> Containers::Optional<T>
auto tryAttribute(Containers::StringView name) const -> const void*
Type-erased attribute value in the base material, if exists.
auto tryAttribute(MaterialAttribute name) const -> const void*
template<class T>
auto tryAttribute(Containers::StringView name) const -> Containers::Optional<T>
Value of a named attribute in the base material, if exists.
template<class T>
auto tryAttribute(MaterialAttribute name) const -> Containers::Optional<T>
template<class T>
auto attributeOr(UnsignedInt layer, Containers::StringView name, const T& defaultValue) const -> T
Value of a named attribute in given layer or a default.
template<class T>
auto attributeOr(UnsignedInt layer, MaterialAttribute name, const T& defaultValue) const -> T
template<class T>
auto attributeOr(Containers::StringView layer, Containers::StringView name, const T& defaultValue) const -> T
Value of a named attribute in a named layer or a default.
template<class T>
auto attributeOr(Containers::StringView layer, MaterialAttribute name, const T& defaultValue) const -> T
template<class T>
auto attributeOr(MaterialLayer layer, Containers::StringView name, const T& defaultValue) const -> T
template<class T>
auto attributeOr(MaterialLayer layer, MaterialAttribute name, const T& defaultValue) const -> T
template<class T>
auto attributeOr(Containers::StringView name, const T& defaultValue) const -> T
Value of a named attribute in the base material or a default.
template<class T>
auto attributeOr(MaterialAttribute name, const T& defaultValue) const -> T

Function documentation

template<MaterialLayer layer>
Magnum::Trade::MaterialLayerData<layer>::MaterialData(MaterialTypes types, Containers::Array<MaterialAttributeData>&& attributeData, const void* importerState = nullptr) explicit noexcept

Construct.

Parameters
types Which material types are described by this data. Can be an empty set.
attributeData Attribute data
importerState Importer-specific state

The attributeData gets sorted by name internally, expecting no duplicates.

template<MaterialLayer layer>
Magnum::Trade::MaterialLayerData<layer>::MaterialData(MaterialTypes types, std::initializer_list<MaterialAttributeData> attributeData, const void* importerState = nullptr) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
Magnum::Trade::MaterialLayerData<layer>::MaterialData(MaterialTypes types, DataFlags attributeDataFlags, Containers::ArrayView<const MaterialAttributeData> attributeData, const void* importerState = nullptr) explicit noexcept

Construct a non-owned material data.

Parameters
types Which material types are described by this data. Can be an empty set.
attributeDataFlags Ignored. Used only for a safer distinction from the owning constructor.
attributeData Attribute data
importerState Importer-specific state

The attributeData is expected to be already sorted by name, without duplicates.

template<MaterialLayer layer>
Magnum::Trade::MaterialLayerData<layer>::MaterialData(MaterialTypes types, Containers::Array<MaterialAttributeData>&& attributeData, Containers::Array<UnsignedInt>&& layerData, const void* importerState = nullptr) explicit noexcept

Construct with layers.

Parameters
types Which material types are described by this data. Can be an empty set.
attributeData Attribute data
layerData Layer offset data
importerState Importer-specific state

The attributeData gets sorted by name internally, expecting no duplicates inside each layer. The layerData is expected to be either empty or a monotonically non-decreasing sequence of offsets not larger than attributeData size, with i-th item specifying end offset of i-th layer.

template<MaterialLayer layer>
Magnum::Trade::MaterialLayerData<layer>::MaterialData(MaterialTypes types, std::initializer_list<MaterialAttributeData> attributeData, std::initializer_list<UnsignedInt> layerData, const void* importerState = nullptr) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
Magnum::Trade::MaterialLayerData<layer>::MaterialData(MaterialTypes types, DataFlags attributeDataFlags, Containers::ArrayView<const MaterialAttributeData> attributeData, DataFlags layerDataFlags, Containers::ArrayView<const UnsignedInt> layerData, const void* importerState = nullptr) explicit noexcept

Construct a non-owned material data with layers.

Parameters
types Which material types are described by this data. Can be an empty set.
attributeDataFlags Ignored. Used only for a safer distinction from the owning constructor.
attributeData Attribute data
layerDataFlags Ignored. Used only for a safer distinction from the owning constructor.
layerData Layer offset data
importerState Importer-specific state

The data is expected to be already sorted by name, without duplicates inside each layer. The layerData is expected to be either empty or a monotonically non-decreasing sequence of offsets not larger than attributeData size, with i-th item specifying end offset of i-th layer.

template<MaterialLayer layer>
Containers::StringView Magnum::Trade::MaterialLayerData<layer>::layerName() const

Layer name.

Same as calling MaterialData::layerName() with layerId() for layer.

template<MaterialLayer layer>
Float Magnum::Trade::MaterialLayerData<layer>::layerFactor() const

Layer factor.

Same as calling MaterialData::layerFactor() with layer.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::layerFactorTexture() const

Layer factor texture ID.

Same as calling MaterialData::layerFactorTexture() with layer.

template<MaterialLayer layer>
MaterialTextureSwizzle Magnum::Trade::MaterialLayerData<layer>::layerFactorTextureSwizzle() const

Layer factor texture swizzle.

Same as calling MaterialData::layerFactorTextureSwizzle() with layer.

template<MaterialLayer layer>
Matrix3 Magnum::Trade::MaterialLayerData<layer>::layerFactorTextureMatrix() const

Layer factor texture coordinate transformation matrix.

Same as calling MaterialData::layerFactorTextureMatrix() with layer.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::layerFactorTextureCoordinates() const

Layer factor texture coordinate set.

Same as calling MaterialData::layerFactorTextureCoordinates() with layer.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::attributeCount() const

Attribute count in this layer.

Same as calling MaterialData::attributeCount() with layer.

template<MaterialLayer layer>
bool Magnum::Trade::MaterialLayerData<layer>::hasAttribute(Containers::StringView name) const

Whether this layer has given attribute.

Same as calling MaterialData::hasAttribute() with layer.

template<MaterialLayer layer>
bool Magnum::Trade::MaterialLayerData<layer>::hasAttribute(MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::attributeId(Containers::StringView name) const

ID of a named attribute in this layer.

Same as calling MaterialData::attributeId() with layer.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::attributeId(MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
Containers::StringView Magnum::Trade::MaterialLayerData<layer>::attributeName(UnsignedInt id) const

Name of an attribute in this layer.

Same as calling MaterialData::attributeName() with layer.

template<MaterialLayer layer>
MaterialAttributeType Magnum::Trade::MaterialLayerData<layer>::attributeType(UnsignedInt id) const

Type of an attribute in this layer.

Same as calling MaterialData::attributeType() with layer.

template<MaterialLayer layer>
MaterialAttributeType Magnum::Trade::MaterialLayerData<layer>::attributeType(Containers::StringView name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
MaterialAttributeType Magnum::Trade::MaterialLayerData<layer>::attributeType(MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::attribute(UnsignedInt id) const

Type-erased value of an attribute in this layer.

Same as calling MaterialData::attribute() with layer.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::attribute(Containers::StringView name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::attribute(MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attribute(UnsignedInt id) const

Value of an attribute in this layer.

Same as calling MaterialData::attribute() with layer.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attribute(Containers::StringView name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attribute(MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::tryAttribute(Containers::StringView name) const

Type-erased attribute value in this layer, if exists.

Same as calling MaterialData::tryAttribute() with layer.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::tryAttribute(MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
Containers::Optional<T> Magnum::Trade::MaterialLayerData<layer>::tryAttribute(Containers::StringView name) const

Value of a named attribute in this layer, if exists.

Same as calling MaterialData::tryAttribute() with layer.

template<MaterialLayer layer> template<class T>
Containers::Optional<T> Magnum::Trade::MaterialLayerData<layer>::tryAttribute(MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attributeOr(Containers::StringView name, const T& defaultValue) const

Value of a named attribute in this layer or a default.

Same as calling MaterialData::attributeOr() with layer.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attributeOr(MaterialAttribute name, const T& defaultValue) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
Containers::StringView Magnum::Trade::MaterialLayerData<layer>::layerName(UnsignedInt layer) const

Layer name.

Retrieves a MaterialAttribute::LayerName attribute from given layer, if present. Returns a nullptr view if the layer has no name, and an empty non-null view if the layer name is empty. The layer is expected to be smaller than layerCount() const.

The name, if present, is ignored for the base material (layer 0) to avoid confsing base material with a layer. If you want to create a material consisting of just a layer, use 0 for the first layer offset in the constructor.

template<MaterialLayer layer>
Float Magnum::Trade::MaterialLayerData<layer>::layerFactor(UnsignedInt layer) const

Factor of given layer.

Convenience access to the MaterialAttribute::LayerFactor attribute. If not present, the default is 1.0f. The layer is expected to be smaller than layerCount() const.

If the layer has MaterialAttribute::LayerFactorTexture, the factor and texture is meant to be multiplied together.

template<MaterialLayer layer>
Float Magnum::Trade::MaterialLayerData<layer>::layerFactor(Containers::StringView layer) const

Factor of a named layer.

Convenience access to the MaterialAttribute::LayerFactor attribute. If not present, the default is 1.0f. The layer is expected to exist.

If the layer has MaterialAttribute::LayerFactorTexture, the factor and texture is meant to be multiplied together.

template<MaterialLayer layer>
Float Magnum::Trade::MaterialLayerData<layer>::layerFactor(MaterialLayer layer) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::layerFactorTexture(UnsignedInt layer) const

Factor texture ID for given layer.

Available only if the MaterialAttribute::LayerFactorTexture attribute is present. Meant to be multiplied with layerFactor(). The layer is expected to be smaller than layerCount().

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::layerFactorTexture(Containers::StringView layer) const

Factor texture ID for a named layer.

Available only if the MaterialAttribute::LayerFactorTexture attribute is present. Meant to be multiplied with layerFactor(). The layer is expected to exist.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::layerFactorTexture(MaterialLayer layer) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
MaterialTextureSwizzle Magnum::Trade::MaterialLayerData<layer>::layerFactorTextureSwizzle(UnsignedInt layer) const

Factor texture swizzle for given layer.

Convenience access to the MaterialAttribute::LayerFactorTextureSwizzle attribute. If not present, the default is MaterialTextureSwizzle::R. Available only if the MaterialAttribute::LayerFactorTexture attribute is present. The layer is expected to be smaller than layerCount().

template<MaterialLayer layer>
MaterialTextureSwizzle Magnum::Trade::MaterialLayerData<layer>::layerFactorTextureSwizzle(Containers::StringView layer) const

Factor texture swizzle for a named layer.

Convenience access to the MaterialAttribute::LayerFactorTextureSwizzle attribute. If not present, the default is MaterialTextureSwizzle::R. Available only if the MaterialAttribute::LayerFactorTexture attribute is present. The layer is expected to exist.

template<MaterialLayer layer>
MaterialTextureSwizzle Magnum::Trade::MaterialLayerData<layer>::layerFactorTextureSwizzle(MaterialLayer layer) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
Matrix3 Magnum::Trade::MaterialLayerData<layer>::layerFactorTextureMatrix(UnsignedInt layer) const

Factor texture coordinate transformation matrix for given layer.

Convenience access to the MaterialAttribute::LayerFactorTextureMatrix / MaterialAttribute::TextureMatrix attributes in given layer or a MaterialAttribute::TextureMatrix attribute in the base material. If neither is present, the default is an identity matrix. Available only if the MaterialAttribute::LayerFactorTexture attribute is present. The layer is expected to be smaller than layerCount().

template<MaterialLayer layer>
Matrix3 Magnum::Trade::MaterialLayerData<layer>::layerFactorTextureMatrix(Containers::StringView layer) const

Factor texture coordinate transformation matrix for a named layer.

Convenience access to the MaterialAttribute::LayerFactorTextureMatrix / MaterialAttribute::TextureMatrix attributes in given layer or a MaterialAttribute::TextureMatrix attribute in the base material. If neither is present, the default is an identity matrix. Available only if the MaterialAttribute::LayerFactorTexture attribute is present. The layer is expected to exist.

template<MaterialLayer layer>
Matrix3 Magnum::Trade::MaterialLayerData<layer>::layerFactorTextureMatrix(MaterialLayer layer) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::layerFactorTextureCoordinates(UnsignedInt layer) const

Factor texture coordinate set for given layer.

Convenience access to the MaterialAttribute::LayerFactorTextureCoordinates / MaterialAttribute::TextureCoordinates attributes in given layer or a MaterialAttribute::TextureCoordinates attribute in the base material. If neither is present, the default is 0. Available only if the MaterialAttribute::LayerFactorTexture attribute is present. The layer is expected to be smaller than layerCount().

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::layerFactorTextureCoordinates(Containers::StringView layer) const

Factor texture coordinate set for a named layer.

Convenience access to the MaterialAttribute::LayerFactorTextureCoordinates / MaterialAttribute::TextureCoordinates attributes in given layer or a MaterialAttribute::TextureCoordinates attribute in the base material. If not present, the default is 0. Available only if the MaterialAttribute::LayerFactorTexture attribute is present. The layer is expected to exist.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::layerFactorTextureCoordinates(MaterialLayer layer) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::attributeCount(UnsignedInt layer) const

Attribute count in given layer.

The layer is expected to be smaller than layerCount() const.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::attributeCount(Containers::StringView layer) const

Attribute count in a named layer.

The layer is expected to exist.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::attributeCount(MaterialLayer layer) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::attributeCount() const

Attribute count in the base material.

Equivalent to calling attributeCount(UnsignedInt) const with layer set to 0.

template<MaterialLayer layer>
bool Magnum::Trade::MaterialLayerData<layer>::hasAttribute(UnsignedInt layer, Containers::StringView name) const

Whether a material layer has given attribute.

The layer is expected to be smaller than layerCount() const.

template<MaterialLayer layer>
bool Magnum::Trade::MaterialLayerData<layer>::hasAttribute(UnsignedInt layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
bool Magnum::Trade::MaterialLayerData<layer>::hasAttribute(Containers::StringView layer, Containers::StringView name) const

Whether a named material layer has given attribute.

The layer is expected to exist.

template<MaterialLayer layer>
bool Magnum::Trade::MaterialLayerData<layer>::hasAttribute(Containers::StringView layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
bool Magnum::Trade::MaterialLayerData<layer>::hasAttribute(MaterialLayer layer, Containers::StringView name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
bool Magnum::Trade::MaterialLayerData<layer>::hasAttribute(MaterialLayer layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
bool Magnum::Trade::MaterialLayerData<layer>::hasAttribute(Containers::StringView name) const

Whether the base material has given attribute.

Equivalent to calling hasAttribute(UnsignedInt, Containers::StringView) const with layer set to 0.

template<MaterialLayer layer>
bool Magnum::Trade::MaterialLayerData<layer>::hasAttribute(MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::attributeId(UnsignedInt layer, Containers::StringView name) const

ID of a named attribute in given material layer.

The layer is expected to be smaller than layerCount() const and name is expected to exist in that layer.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::attributeId(UnsignedInt layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::attributeId(Containers::StringView layer, Containers::StringView name) const

ID of a named attribute in a named material layer.

The layer is expected to exist and name is expected to exist in that layer.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::attributeId(Containers::StringView layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::attributeId(MaterialLayer layer, Containers::StringView name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::attributeId(MaterialLayer layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::attributeId(Containers::StringView name) const

ID of a named attribute in the base material.

Equivalent to calling attributeId(UnsignedInt, Containers::StringView) const with layer set to 0.

template<MaterialLayer layer>
UnsignedInt Magnum::Trade::MaterialLayerData<layer>::attributeId(MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
Containers::StringView Magnum::Trade::MaterialLayerData<layer>::attributeName(UnsignedInt layer, UnsignedInt id) const

Name of an attribute in given material layer.

The layer is expected to be smaller than layerCount() const and the id is expected to be smaller than attributeCount(UnsignedInt) const in that layer. The returned view always has Corrade::Containers::StringViewFlag::NullTerminated set.

template<MaterialLayer layer>
Containers::StringView Magnum::Trade::MaterialLayerData<layer>::attributeName(Containers::StringView layer, UnsignedInt id) const

Name of an attribute in a named material layer.

The layer is expected to exist and the id is expected to be smaller than attributeCount(UnsignedInt) const in that layer.

template<MaterialLayer layer>
Containers::StringView Magnum::Trade::MaterialLayerData<layer>::attributeName(MaterialLayer layer, UnsignedInt id) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
Containers::StringView Magnum::Trade::MaterialLayerData<layer>::attributeName(UnsignedInt id) const

Name of an attribute in the base material.

Equivalent to calling attributeName(UnsignedInt, UnsignedInt) const with layer set to 0.

template<MaterialLayer layer>
MaterialAttributeType Magnum::Trade::MaterialLayerData<layer>::attributeType(UnsignedInt layer, UnsignedInt id) const

Type of an attribute in given material layer.

The layer is expected to be smaller than layerCount() const and id is expected to be smaller than attributeCount(UnsignedInt) const in that layer.

template<MaterialLayer layer>
MaterialAttributeType Magnum::Trade::MaterialLayerData<layer>::attributeType(UnsignedInt layer, Containers::StringView name) const

Type of a named attribute in given material layer.

The layer is expected to be smaller than layerCount() const and name is expected to exist in that layer.

template<MaterialLayer layer>
MaterialAttributeType Magnum::Trade::MaterialLayerData<layer>::attributeType(UnsignedInt layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
MaterialAttributeType Magnum::Trade::MaterialLayerData<layer>::attributeType(Containers::StringView layer, UnsignedInt id) const

Type of an attribute in a named material layer.

The layer is expected to exist and the id is expected to be smaller than attributeCount(UnsignedInt) const in that layer.

template<MaterialLayer layer>
MaterialAttributeType Magnum::Trade::MaterialLayerData<layer>::attributeType(MaterialLayer layer, UnsignedInt id) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
MaterialAttributeType Magnum::Trade::MaterialLayerData<layer>::attributeType(Containers::StringView layer, Containers::StringView name) const

Type of a named attribute in a named material layer.

The layer is expected to exist and name is expected to exist in that layer.

template<MaterialLayer layer>
MaterialAttributeType Magnum::Trade::MaterialLayerData<layer>::attributeType(Containers::StringView layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
MaterialAttributeType Magnum::Trade::MaterialLayerData<layer>::attributeType(MaterialLayer layer, Containers::StringView name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
MaterialAttributeType Magnum::Trade::MaterialLayerData<layer>::attributeType(MaterialLayer layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
MaterialAttributeType Magnum::Trade::MaterialLayerData<layer>::attributeType(UnsignedInt id) const

Type of an attribute in the base material.

Equivalent to calling attributeType(UnsignedInt, UnsignedInt) const with layer set to 0.

template<MaterialLayer layer>
MaterialAttributeType Magnum::Trade::MaterialLayerData<layer>::attributeType(Containers::StringView name) const

Type of a named attribute in the base material.

Equivalent to calling attributeType(UnsignedInt, Containers::StringView) const with layer set to 0.

template<MaterialLayer layer>
MaterialAttributeType Magnum::Trade::MaterialLayerData<layer>::attributeType(MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::attribute(UnsignedInt layer, UnsignedInt id) const

Type-erased value of an attribute in given material layer.

The layer is expected to be smaller than layerCount() const and id is expected to be smaller than attributeCount(UnsignedInt) const in that layer. Cast the pointer to a concrete type based on type().

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::attribute(UnsignedInt layer, Containers::StringView name) const

Type-erased value of a named attribute in given material layer.

The layer is expected to be smaller than layerCount() const and name is expected to exist in that layer. Cast the pointer to a concrete type based on attributeType().

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::attribute(UnsignedInt layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::attribute(Containers::StringView layer, UnsignedInt id) const

Type-erased value of an attribute in a named material layer.

The layer is expected to exist and the id is expected to be smaller than attributeCount(UnsignedInt) const in that layer. Cast the pointer to a concrete type based on attributeType().

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::attribute(MaterialLayer layer, UnsignedInt id) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::attribute(Containers::StringView layer, Containers::StringView name) const

Type-erased value of a named attribute in a named material layer.

The layer is expected to exist and name is expected to exist in that layer. Cast the pointer to a concrete type based on attributeType().

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::attribute(Containers::StringView layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::attribute(MaterialLayer layer, Containers::StringView name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::attribute(MaterialLayer layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::attribute(UnsignedInt id) const

Type-erased value of an attribute in the base material.

Equivalent to calling attribute(UnsignedInt, UnsignedInt) const with layer set to 0.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::attribute(Containers::StringView name) const

Type-erased value of a named attribute in the base material.

Equivalent to calling attribute(UnsignedInt, Containers::StringView) const with layer set to 0.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::attribute(MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attribute(UnsignedInt layer, UnsignedInt id) const

Value of an attribute in given material layer.

The layer is expected to be smaller than layerCount() const and id is expected to be smaller than attributeCount(UnsignedInt) const in that layer. Expects that T corresponds to attributeType(UnsignedInt, UnsignedInt) const for given layer and id. In case of a string, the returned view always has Corrade::Containers::StringViewFlag::NullTerminated set.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attribute(UnsignedInt layer, Containers::StringView name) const

Value of a named attribute in given material layer.

The layer is expected to be smaller than layerCount() const and name is expected to exist in that layer. Expects that T corresponds to attributeType(UnsignedInt, Containers::StringView) const for given layer and name. In case of a string, the returned view always has Corrade::Containers::StringViewFlag::NullTerminated set.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attribute(UnsignedInt layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attribute(Containers::StringView layer, UnsignedInt id) const

Value of an attribute in a named material layer.

The layer is expected to exist and id is expected to be smaller than attributeCount(UnsignedInt) const in that layer. Expects that T corresponds to attributeType(Containers::StringView, UnsignedInt) const for given layer and id. In case of a string, the returned view always has Corrade::Containers::StringViewFlag::NullTerminated set.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attribute(MaterialLayer layer, UnsignedInt id) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attribute(Containers::StringView layer, Containers::StringView name) const

Value of a named attribute in a named material layer.

The layer is expected to exist and name is expected to exist in that layer. Expects that T corresponds to attributeType(Containers::StringView, Containers::StringView) const for given layer and name. In case of a string, the returned view always has Corrade::Containers::StringViewFlag::NullTerminated set.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attribute(Containers::StringView layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attribute(MaterialLayer layer, Containers::StringView name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attribute(MaterialLayer layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attribute(UnsignedInt id) const

Value of an attribute in the base material.

Equivalent to calling attribute(UnsignedInt, UnsignedInt) const with layer set to 0.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attribute(Containers::StringView name) const

Value of a named attribute in the base material.

Equivalent to calling attribute(UnsignedInt, Containers::StringView) const with layer set to 0.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attribute(MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::tryAttribute(UnsignedInt layer, Containers::StringView name) const

Type-erased attribute value in given material layer, if exists.

Compared to attribute(UnsignedInt, Containers::StringView name) const, if name doesn't exist, returns nullptr instead of asserting. Expects that layer is smaller than layerCount() const. Cast the pointer to a concrete type based on attributeType().

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::tryAttribute(UnsignedInt layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::tryAttribute(Containers::StringView layer, Containers::StringView name) const

Type-erased attribute value in a named material layer, if exists.

Compared to attribute(Containers::StringView, Containers::StringView name) const, if name doesn't exist, returns nullptr instead of asserting. Expects that layer exists. Cast the pointer to a concrete type based on attributeType().

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::tryAttribute(Containers::StringView layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::tryAttribute(MaterialLayer layer, Containers::StringView name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::tryAttribute(MaterialLayer layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
Containers::Optional<T> Magnum::Trade::MaterialLayerData<layer>::tryAttribute(UnsignedInt layer, Containers::StringView name) const

Value of a named attribute in given material layer, if exists.

Compared to attribute(UnsignedInt, Containers::StringView name) const, if name doesn't exist, returns Corrade::Containers::NullOpt instead of asserting. Expects that layer is smaller than layerCount() const and that T corresponds to attributeType(UnsignedInt, Containers::StringView) const for given layer and name.

template<MaterialLayer layer> template<class T>
Containers::Optional<T> Magnum::Trade::MaterialLayerData<layer>::tryAttribute(UnsignedInt layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
Containers::Optional<T> Magnum::Trade::MaterialLayerData<layer>::tryAttribute(Containers::StringView layer, Containers::StringView name) const

Value of a named attribute in a named material layer, if exists.

Compared to attribute(Containers::StringView, Containers::StringView name) const, if name doesn't exist, returns Corrade::Containers::NullOpt instead of asserting. Expects that layer exists and that T corresponds to attributeType(Containers::StringView, Containers::StringView) const for given layer and name.

template<MaterialLayer layer> template<class T>
Containers::Optional<T> Magnum::Trade::MaterialLayerData<layer>::tryAttribute(Containers::StringView layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
Containers::Optional<T> Magnum::Trade::MaterialLayerData<layer>::tryAttribute(MaterialLayer layer, Containers::StringView name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
Containers::Optional<T> Magnum::Trade::MaterialLayerData<layer>::tryAttribute(MaterialLayer layer, MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::tryAttribute(Containers::StringView name) const

Type-erased attribute value in the base material, if exists.

Equivalent to calling tryAttribute(UnsignedInt, Containers::StringView) const with layer set to 0.

template<MaterialLayer layer>
const void* Magnum::Trade::MaterialLayerData<layer>::tryAttribute(MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
Containers::Optional<T> Magnum::Trade::MaterialLayerData<layer>::tryAttribute(Containers::StringView name) const

Value of a named attribute in the base material, if exists.

Equivalent to calling tryAttribute(UnsignedInt, Containers::StringView) const with layer set to 0.

template<MaterialLayer layer> template<class T>
Containers::Optional<T> Magnum::Trade::MaterialLayerData<layer>::tryAttribute(MaterialAttribute name) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attributeOr(UnsignedInt layer, Containers::StringView name, const T& defaultValue) const

Value of a named attribute in given layer or a default.

Compared to attribute(UnsignedInt, Containers::StringView name) const, if name doesn't exist, returns defaultValue instead of asserting. Expects that layer is smaller than layerCount() const and that T corresponds to attributeType(UnsignedInt, Containers::StringView) const for given layer and name.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attributeOr(UnsignedInt layer, MaterialAttribute name, const T& defaultValue) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attributeOr(Containers::StringView layer, Containers::StringView name, const T& defaultValue) const

Value of a named attribute in a named layer or a default.

Compared to attribute(Containers::StringView, Containers::StringView name) const, if name doesn't exist, returns defaultValue instead of asserting. Expects that layer exists and that T corresponds to attributeType(Containers::StringView, Containers::StringView) const for given layer and name.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attributeOr(Containers::StringView layer, MaterialAttribute name, const T& defaultValue) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attributeOr(MaterialLayer layer, Containers::StringView name, const T& defaultValue) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attributeOr(MaterialLayer layer, MaterialAttribute name, const T& defaultValue) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attributeOr(Containers::StringView name, const T& defaultValue) const

Value of a named attribute in the base material or a default.

Equivalent to calling attributeOr(UnsignedInt, Containers::StringView, const T&) const with layer set to 0.

template<MaterialLayer layer> template<class T>
T Magnum::Trade::MaterialLayerData<layer>::attributeOr(MaterialAttribute name, const T& defaultValue) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.