#include <Magnum/Trade/MaterialLayerData.h>
template<MaterialLayer layer>
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 layerFactorTextureLayer() const -> UnsignedInt
- Layer factor array texture layer.
- 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 findAttributeId(Containers::
StringView name) const -> Containers:: Optional<UnsignedInt> - Find ID of a named attribute in this layer.
-
auto findAttributeId(MaterialAttribute name) const -> Containers::
Optional<UnsignedInt> -
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*
- auto mutableAttribute(UnsignedInt id) -> void*
- Type-erased mutable value of an attribute in this layer.
-
auto mutableAttribute(Containers::
StringView name) -> void* - auto mutableAttribute(MaterialAttribute name) -> 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
-
template<class T>auto mutableAttribute(UnsignedInt id) -> std::
conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type - Mutable value of an attribute in this layer.
-
template<class T>auto mutableAttribute(Containers::
StringView name) -> std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type -
template<class T>auto mutableAttribute(MaterialAttribute name) -> std::
conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type -
auto findAttribute(Containers::
StringView name) const -> const void* - Type-erased attribute value in this layer, if exists.
- auto findAttribute(MaterialAttribute name) const -> const void*
-
auto tryAttribute(Containers::
StringView name) const -> const void* deprecated in Git master - Type-erased attribute value in this layer, if exists.
- auto tryAttribute(MaterialAttribute name) const -> const void* deprecated in Git master
-
template<class T>auto findAttribute(Containers::
StringView name) const -> Containers:: Optional<T> - Value of a named attribute in this layer, if exists.
-
template<class T>auto findAttribute(MaterialAttribute name) const -> Containers::
Optional<T> -
template<class T>auto tryAttribute(Containers::
StringView name) const -> Containers:: Optional<T> deprecated in Git master - Type-erased attribute value in this layer, if exists.
-
template<class T>auto tryAttribute(MaterialAttribute name) const -> Containers::
Optional<T> deprecated in Git master -
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 layerFactorTextureLayer(UnsignedInt layer) const -> UnsignedInt
- Factor array texture layer for given layer.
-
auto layerFactorTextureLayer(Containers::
StringView layer) const -> UnsignedInt - Factor array texture layer for a named layer.
- auto layerFactorTextureLayer(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 findAttributeId(UnsignedInt layer,
Containers::
StringView name) const -> Containers:: Optional<UnsignedInt> - Find ID of a named attribute in given material layer.
-
auto findAttributeId(UnsignedInt layer,
MaterialAttribute name) const -> Containers::
Optional<UnsignedInt> -
auto findAttributeId(Containers::
StringView layer, Containers:: StringView name) const -> Containers:: Optional<UnsignedInt> - Find ID of a named attribute in a named material layer.
-
auto findAttributeId(Containers::
StringView layer, MaterialAttribute name) const -> Containers:: Optional<UnsignedInt> -
auto findAttributeId(MaterialLayer layer,
Containers::
StringView name) const -> Containers:: Optional<UnsignedInt> -
auto findAttributeId(MaterialLayer layer,
MaterialAttribute name) const -> Containers::
Optional<UnsignedInt> -
auto findAttributeId(Containers::
StringView name) const -> Containers:: Optional<UnsignedInt> - Find ID of a named attribute in the base material.
-
auto findAttributeId(MaterialAttribute name) const -> Containers::
Optional<UnsignedInt> -
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 mutableAttribute(UnsignedInt layer, UnsignedInt id) -> void*
- Type-erased mutable value of an attribute in given material layer.
-
auto mutableAttribute(UnsignedInt layer,
Containers::
StringView name) -> void* - Type-erased value of a named attribute in given material layer.
- auto mutableAttribute(UnsignedInt layer, MaterialAttribute name) -> void*
-
auto mutableAttribute(Containers::
StringView layer, UnsignedInt id) -> void* - Type-erased mutable value of an attribute in a named material layer.
- auto mutableAttribute(MaterialLayer layer, UnsignedInt id) -> void*
-
auto mutableAttribute(Containers::
StringView layer, Containers:: StringView name) -> void* - Type-erased mutable value of a named attribute in a named material layer.
-
auto mutableAttribute(Containers::
StringView layer, MaterialAttribute name) -> void* -
auto mutableAttribute(MaterialLayer layer,
Containers::
StringView name) -> void* - auto mutableAttribute(MaterialLayer layer, MaterialAttribute name) -> void*
- auto mutableAttribute(UnsignedInt id) -> void*
- Type-erased mutable value of an attribute in the base material.
-
auto mutableAttribute(Containers::
StringView name) -> void* - Type-erased mutable value of a named attribute in the base material.
- auto mutableAttribute(MaterialAttribute name) -> void*
-
template<class T>auto mutableAttribute(UnsignedInt layer, UnsignedInt id) -> std::
conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type - Mutable value of an attribute in given material layer.
-
template<class T>auto mutableAttribute(UnsignedInt layer, Containers::
StringView name) -> std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type - Mutable value of a named attribute in given material layer.
-
template<class T>auto mutableAttribute(UnsignedInt layer, MaterialAttribute name) -> std::
conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type -
template<class T>auto mutableAttribute(Containers::
StringView layer, UnsignedInt id) -> std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type - Mutable value of an attribute in a named material layer.
-
template<class T>auto mutableAttribute(MaterialLayer layer, UnsignedInt id) -> std::
conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type -
template<class T>auto mutableAttribute(Containers::
StringView layer, Containers:: StringView name) -> std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type - Mutable value of a named attribute in a named material layer.
-
template<class T>auto mutableAttribute(Containers::
StringView layer, MaterialAttribute name) -> std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type -
template<class T>auto mutableAttribute(MaterialLayer layer, Containers::
StringView name) -> std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type -
template<class T>auto mutableAttribute(MaterialLayer layer, MaterialAttribute name) -> std::
conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type -
template<class T>auto mutableAttribute(UnsignedInt id) -> std::
conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type - Mutable value of an attribute in the base material.
-
template<class T>auto mutableAttribute(Containers::
StringView name) -> std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type - Mutable value of a named attribute in the base material.
-
template<class T>auto mutableAttribute(MaterialAttribute name) -> std::
conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type -
auto findAttribute(UnsignedInt layer,
Containers::
StringView name) const -> const void* - Type-erased attribute value in given material layer, if exists.
- auto findAttribute(UnsignedInt layer, MaterialAttribute name) const -> const void*
-
auto findAttribute(Containers::
StringView layer, Containers:: StringView name) const -> const void* - Type-erased attribute value in a named material layer, if exists.
-
auto findAttribute(Containers::
StringView layer, MaterialAttribute name) const -> const void* -
auto findAttribute(MaterialLayer layer,
Containers::
StringView name) const -> const void* - auto findAttribute(MaterialLayer layer, MaterialAttribute name) const -> const void*
-
template<class T>auto findAttribute(UnsignedInt layer, Containers::
StringView name) const -> Containers:: Optional<T> - Value of a named attribute in given material layer, if exists.
-
template<class T>auto findAttribute(UnsignedInt layer, MaterialAttribute name) const -> Containers::
Optional<T> -
template<class T>auto findAttribute(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 findAttribute(Containers::
StringView layer, MaterialAttribute name) const -> Containers:: Optional<T> -
template<class T>auto findAttribute(MaterialLayer layer, Containers::
StringView name) const -> Containers:: Optional<T> -
template<class T>auto findAttribute(MaterialLayer layer, MaterialAttribute name) const -> Containers::
Optional<T> -
auto findAttribute(Containers::
StringView name) const -> const void* - Type-erased attribute value in the base material, if exists.
- auto findAttribute(MaterialAttribute name) const -> const void*
-
template<class T>auto findAttribute(Containers::
StringView name) const -> Containers:: Optional<T> - Value of a named attribute in the base material, if exists.
-
template<class T>auto findAttribute(MaterialAttribute name) const -> Containers::
Optional<T> -
auto tryAttribute(UnsignedInt layer,
Containers::
StringView name) const -> const void* deprecated in Git master - Type-erased attribute value in given material layer, if exists.
- auto tryAttribute(UnsignedInt layer, MaterialAttribute name) const -> const void* deprecated in Git master
-
auto tryAttribute(Containers::
StringView layer, Containers:: StringView name) const -> const void* deprecated in Git master - Type-erased attribute value in a named material layer, if exists.
-
auto tryAttribute(Containers::
StringView layer, MaterialAttribute name) const -> const void* deprecated in Git master -
auto tryAttribute(MaterialLayer layer,
Containers::
StringView name) const -> const void* deprecated in Git master - auto tryAttribute(MaterialLayer layer, MaterialAttribute name) const -> const void* deprecated in Git master
-
template<class T>auto tryAttribute(UnsignedInt layer, Containers::
StringView name) const -> Containers:: Optional<T> deprecated in Git master - Type-erased attribute value in given material layer, if exists.
-
template<class T>auto tryAttribute(UnsignedInt layer, MaterialAttribute name) const -> Containers::
Optional<T> deprecated in Git master -
template<class T>auto tryAttribute(Containers::
StringView layer, Containers:: StringView name) const -> Containers:: Optional<T> deprecated in Git master - Type-erased attribute value in a named material layer, if exists.
-
template<class T>auto tryAttribute(Containers::
StringView layer, MaterialAttribute name) const -> Containers:: Optional<T> deprecated in Git master -
template<class T>auto tryAttribute(MaterialLayer layer, Containers::
StringView name) const -> Containers:: Optional<T> deprecated in Git master - Type-erased attribute value in given material layer, if exists.
-
template<class T>auto tryAttribute(MaterialLayer layer, MaterialAttribute name) const -> Containers::
Optional<T> deprecated in Git master -
auto tryAttribute(Containers::
StringView name) const -> const void* deprecated in Git master - Type-erased attribute value in this layer, if exists.
- auto tryAttribute(MaterialAttribute name) const -> const void* deprecated in Git master
-
template<class T>auto tryAttribute(Containers::
StringView name) const -> Containers:: Optional<T> deprecated in Git master - Type-erased attribute value in this layer, if exists.
-
template<class T>auto tryAttribute(MaterialAttribute name) const -> Containers::
Optional<T> deprecated in Git master -
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.
The attributeDataFlags() / layerDataFlags() are implicitly set to a combination of DataFlag::
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 | Attribute data flags |
attributeData | Attribute data |
importerState | Importer-specific state |
Compared to MaterialData(MaterialTypes, Containers::attributeData
is expected to be already sorted by name, without duplicates. The attributeDataFlags
can contain DataFlag::
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 counting up to attributeData
size, with i-th item specifying end offset of i-th layer.
The attributeDataFlags() / layerDataFlags() are implicitly set to a combination of DataFlag::
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 | Attribute data flags |
attributeData | Attribute data |
layerDataFlags | Layer offset data flags |
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 counting up to attributeData
size, with i-th item specifying end offset of i-th layer.
The attributeDataFlags
/ layerDataFlags
parameters can contain DataFlag::
template<MaterialLayer layer>
Containers:: StringView Magnum:: Trade:: MaterialLayerData<layer>:: layerName() const
Layer name.
Same as calling MaterialData::layer
.
template<MaterialLayer layer>
Float Magnum:: Trade:: MaterialLayerData<layer>:: layerFactor() const
Layer factor.
Same as calling MaterialData::layer
.
template<MaterialLayer layer>
UnsignedInt Magnum:: Trade:: MaterialLayerData<layer>:: layerFactorTexture() const
Layer factor texture ID.
Same as calling MaterialData::layer
.
template<MaterialLayer layer>
MaterialTextureSwizzle Magnum:: Trade:: MaterialLayerData<layer>:: layerFactorTextureSwizzle() const
Layer factor texture swizzle.
Same as calling MaterialData::layer
.
template<MaterialLayer layer>
Matrix3 Magnum:: Trade:: MaterialLayerData<layer>:: layerFactorTextureMatrix() const
Layer factor texture coordinate transformation matrix.
Same as calling MaterialData::layer
.
template<MaterialLayer layer>
UnsignedInt Magnum:: Trade:: MaterialLayerData<layer>:: layerFactorTextureCoordinates() const
Layer factor texture coordinate set.
Same as calling MaterialData::layer
.
template<MaterialLayer layer>
UnsignedInt Magnum:: Trade:: MaterialLayerData<layer>:: layerFactorTextureLayer() const
Layer factor array texture layer.
Same as calling MaterialData::layer
.
template<MaterialLayer layer>
UnsignedInt Magnum:: Trade:: MaterialLayerData<layer>:: attributeCount() const
Attribute count in this layer.
Same as calling MaterialData::layer
.
template<MaterialLayer layer>
bool Magnum:: Trade:: MaterialLayerData<layer>:: hasAttribute(Containers:: StringView name) const
Whether this layer has given attribute.
Same as calling MaterialData::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>
Containers:: Optional<UnsignedInt> Magnum:: Trade:: MaterialLayerData<layer>:: findAttributeId(Containers:: StringView name) const
Find ID of a named attribute in this layer.
Same as calling MaterialData::layer
.
template<MaterialLayer layer>
Containers:: Optional<UnsignedInt> Magnum:: Trade:: MaterialLayerData<layer>:: findAttributeId(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::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::layer
.
template<MaterialLayer layer>
MaterialAttributeType Magnum:: Trade:: MaterialLayerData<layer>:: attributeType(UnsignedInt id) const
Type of an attribute in this layer.
Same as calling MaterialData::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::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>
void* Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(UnsignedInt id)
Type-erased mutable value of an attribute in this layer.
Same as calling MaterialData::layer
.
template<MaterialLayer layer>
void* Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(Containers:: StringView name)
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>
void* Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(MaterialAttribute name)
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::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>
template<class T>
std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(UnsignedInt id)
Mutable value of an attribute in this layer.
Same as calling MaterialData::layer
.
template<MaterialLayer layer>
template<class T>
std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(Containers:: StringView name)
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>
std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(MaterialAttribute name)
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>:: findAttribute(Containers:: StringView name) const
Type-erased attribute value in this layer, if exists.
Same as calling MaterialData::layer
.
template<MaterialLayer layer>
const void* Magnum:: Trade:: MaterialLayerData<layer>:: findAttribute(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.
template<MaterialLayer layer>
const void* Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(MaterialAttribute name) const
template<MaterialLayer layer>
template<class T>
Containers:: Optional<T> Magnum:: Trade:: MaterialLayerData<layer>:: findAttribute(Containers:: StringView name) const
Value of a named attribute in this layer, if exists.
Same as calling MaterialData::layer
.
template<MaterialLayer layer>
template<class T>
Containers:: Optional<T> Magnum:: Trade:: MaterialLayerData<layer>:: findAttribute(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
Type-erased attribute value in this layer, if exists.
template<MaterialLayer layer>
template<class T>
Containers:: Optional<T> Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(MaterialAttribute name) const
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::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::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::1.0f
. The layer
is expected to be smaller than layerCount() const.
If the layer has MaterialAttribute::
template<MaterialLayer layer>
Float Magnum:: Trade:: MaterialLayerData<layer>:: layerFactor(Containers:: StringView layer) const
Factor of a named layer.
Convenience access to the MaterialAttribute::1.0f
. The layer
is expected to exist.
If the layer has MaterialAttribute::
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::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::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::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::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::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::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::0
. Available only if the MaterialAttribute::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::0
. Available only if the MaterialAttribute::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>:: layerFactorTextureLayer(UnsignedInt layer) const
Factor array texture layer for given layer.
Convenience access to the MaterialAttribute::0
. Available only if the MaterialAttribute::layer
is expected to be smaller than layerCount().
template<MaterialLayer layer>
UnsignedInt Magnum:: Trade:: MaterialLayerData<layer>:: layerFactorTextureLayer(Containers:: StringView layer) const
Factor array texture layer for a named layer.
Convenience access to the MaterialAttribute::0
. Available only if the MaterialAttribute::layer
is expected to exist.
template<MaterialLayer layer>
UnsignedInt Magnum:: Trade:: MaterialLayerData<layer>:: layerFactorTextureLayer(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::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>
Containers:: Optional<UnsignedInt> Magnum:: Trade:: MaterialLayerData<layer>:: findAttributeId(UnsignedInt layer,
Containers:: StringView name) const
Find ID of a named attribute in given material layer.
If name
doesn't exist, returns Containers::layer
is expected to be smaller than layerCount() const. The lookup is done in an complexity with being attribute count in given layer
.
template<MaterialLayer layer>
Containers:: Optional<UnsignedInt> Magnum:: Trade:: MaterialLayerData<layer>:: findAttributeId(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>
Containers:: Optional<UnsignedInt> Magnum:: Trade:: MaterialLayerData<layer>:: findAttributeId(Containers:: StringView layer,
Containers:: StringView name) const
Find ID of a named attribute in a named material layer.
If name
doesn't exist, returns Containers::layer
is expected to exist. The lookup is done in an complexity with being layer count and being attribute count in given layer
.
template<MaterialLayer layer>
Containers:: Optional<UnsignedInt> Magnum:: Trade:: MaterialLayerData<layer>:: findAttributeId(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>
Containers:: Optional<UnsignedInt> Magnum:: Trade:: MaterialLayerData<layer>:: findAttributeId(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>
Containers:: Optional<UnsignedInt> Magnum:: Trade:: MaterialLayerData<layer>:: findAttributeId(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>
Containers:: Optional<UnsignedInt> Magnum:: Trade:: MaterialLayerData<layer>:: findAttributeId(Containers:: StringView name) const
Find ID of a named attribute in the base material.
Equivalent to calling findAttributeId(UnsignedInt, Containers::layer
set to 0
.
template<MaterialLayer layer>
Containers:: Optional<UnsignedInt> Magnum:: Trade:: MaterialLayerData<layer>:: findAttributeId(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.
Like findAttributeId(UnsignedInt, Containers::name
is expected to exist.
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.
Like findAttributeId(Containers::name
is expected to exist.
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::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 Containers::
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::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().
- In case of a MaterialAttributeType::
Pointer or a MaterialAttributeType:: MutablePointer, returns a pointer to a pointer, not the pointer value itself. - In case of a MaterialAttributeType::
String returns a null-terminated const char*
(not a pointer to Containers::StringView). This doesn't preserve the actual string size in case the string data contain zero bytes, thus prefer to use typed access in that case. - In case of a MaterialAttributeType::
Buffer returns a pointer to the data with no size information, Prefer to use typed access in that case.
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().
- In case of a MaterialAttributeType::
Pointer or a MaterialAttributeType:: MutablePointer, returns a pointer to a pointer, not the pointer value itself. - In case of a MaterialAttributeType::
String returns a null-terminated const char*
(not a pointer to Containers::StringView). This doesn't preserve the actual string size in case the string data contain zero bytes, thus prefer to use typed access in that case. - In case of a MaterialAttributeType::
Buffer returns a pointer to the data with no size information, Prefer to use typed access in that case.
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().
- In case of a MaterialAttributeType::
Pointer or a MaterialAttributeType:: MutablePointer, returns a pointer to a pointer, not the pointer value itself. - In case of a MaterialAttributeType::
String returns a null-terminated const char*
(not a pointer to Containers::StringView). This doesn't preserve the actual string size in case the string data contain zero bytes, thus prefer to use typed access in that case. - In case of a MaterialAttributeType::
Buffer returns a pointer to the data with no size information, Prefer to use typed access in that case.
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().
- In case of a MaterialAttributeType::
Pointer or a MaterialAttributeType:: MutablePointer, returns a pointer to a pointer, not the pointer value itself. - In case of a MaterialAttributeType::
String returns a null-terminated const char*
(not a pointer to Containers::StringView). This doesn't preserve the actual string size in case the string data contain zero bytes, thus prefer to use typed access in that case. - In case of a MaterialAttributeType::
Buffer returns a pointer to the data with no size information, Prefer to use typed access in that case.
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::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 Containers::
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::layer
and name
. In case of a string, the returned view always has Containers::
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::layer
and id
. In case of a string, the returned view always has Containers::
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::layer
and name
. In case of a string, the returned view always has Containers::
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::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>
void* Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(UnsignedInt layer,
UnsignedInt id)
Type-erased mutable value of an attribute in given material layer.
Like attribute(UnsignedInt, UnsignedInt) const but returns a mutable pointer. Expects that the material is mutable.
template<MaterialLayer layer>
void* Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(UnsignedInt layer,
Containers:: StringView name)
Type-erased value of a named attribute in given material layer.
Like attribute(UnsignedInt, Containers::
template<MaterialLayer layer>
void* Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(UnsignedInt layer,
MaterialAttribute name)
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>
void* Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(Containers:: StringView layer,
UnsignedInt id)
Type-erased mutable value of an attribute in a named material layer.
Like attribute(Containers::
template<MaterialLayer layer>
void* Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(MaterialLayer layer,
UnsignedInt id)
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>
void* Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(Containers:: StringView layer,
Containers:: StringView name)
Type-erased mutable value of a named attribute in a named material layer.
Like attribute(Containers::
template<MaterialLayer layer>
void* Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(Containers:: StringView layer,
MaterialAttribute name)
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>
void* Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(MaterialLayer layer,
Containers:: StringView name)
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>
void* Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(MaterialLayer layer,
MaterialAttribute name)
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>
void* Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(UnsignedInt id)
Type-erased mutable value of an attribute in the base material.
Like attribute(UnsignedInt) const but returns a mutable pointer. Expects that the material is mutable.
template<MaterialLayer layer>
void* Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(Containers:: StringView name)
Type-erased mutable value of a named attribute in the base material.
Like attribute(Containers::
template<MaterialLayer layer>
void* Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(MaterialAttribute name)
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>
std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(UnsignedInt layer,
UnsignedInt id)
Mutable value of an attribute in given material layer.
Like attribute(UnsignedInt, UnsignedInt) const but returns a mutable reference. Expects that the material is mutable. In case of a string / buffer, you're expected to use Containers::T
and you get a Containers::
template<MaterialLayer layer>
template<class T>
std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(UnsignedInt layer,
Containers:: StringView name)
Mutable value of a named attribute in given material layer.
Like attribute(UnsignedInt, Containers::T
and you get a Containers::
template<MaterialLayer layer>
template<class T>
std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(UnsignedInt layer,
MaterialAttribute name)
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>
std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(Containers:: StringView layer,
UnsignedInt id)
Mutable value of an attribute in a named material layer.
Like attribute(Containers::T
and you get a Containers::
template<MaterialLayer layer>
template<class T>
std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(MaterialLayer layer,
UnsignedInt id)
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>
std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(Containers:: StringView layer,
Containers:: StringView name)
Mutable value of a named attribute in a named material layer.
Like attribute(Containers::T
and you get a Containers::
template<MaterialLayer layer>
template<class T>
std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(Containers:: StringView layer,
MaterialAttribute name)
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>
std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(MaterialLayer layer,
Containers:: StringView name)
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>
std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(MaterialLayer layer,
MaterialAttribute name)
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>
std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(UnsignedInt id)
Mutable value of an attribute in the base material.
Equivalent to calling mutableAttribute(UnsignedInt, UnsignedInt) with layer
set to 0
.
template<MaterialLayer layer>
template<class T>
std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(Containers:: StringView name)
Mutable value of a named attribute in the base material.
Equivalent to calling mutableAttribute(UnsignedInt, Containers::layer
set to 0
.
template<MaterialLayer layer>
template<class T>
std:: conditional<std:: is_same<T, Containers:: MutableStringView>::value||std:: is_same<T, Containers:: ArrayView<void>>::value, T, T&>::type Magnum:: Trade:: MaterialLayerData<layer>:: mutableAttribute(MaterialAttribute name)
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>:: findAttribute(UnsignedInt layer,
Containers:: StringView name) const
Type-erased attribute value in given material layer, if exists.
Compared to attribute(UnsignedInt, Containers::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>:: findAttribute(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>:: findAttribute(Containers:: StringView layer,
Containers:: StringView name) const
Type-erased attribute value in a named material layer, if exists.
Compared to attribute(Containers::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>:: findAttribute(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>:: findAttribute(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>:: findAttribute(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>:: findAttribute(UnsignedInt layer,
Containers:: StringView name) const
Value of a named attribute in given material layer, if exists.
Compared to attribute(UnsignedInt, Containers::name
doesn't exist, returns Containers::layer
is smaller than layerCount() const and that T
corresponds to attributeType(UnsignedInt, Containers::layer
and name
.
template<MaterialLayer layer>
template<class T>
Containers:: Optional<T> Magnum:: Trade:: MaterialLayerData<layer>:: findAttribute(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>:: findAttribute(Containers:: StringView layer,
Containers:: StringView name) const
Value of a named attribute in a named material layer, if exists.
Compared to attribute(Containers::name
doesn't exist, returns Containers::layer
exists and that T
corresponds to attributeType(Containers::layer
and name
.
template<MaterialLayer layer>
template<class T>
Containers:: Optional<T> Magnum:: Trade:: MaterialLayerData<layer>:: findAttribute(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>:: findAttribute(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>:: findAttribute(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>:: findAttribute(Containers:: StringView name) const
Type-erased attribute value in the base material, if exists.
Equivalent to calling findAttribute(UnsignedInt, Containers::layer
set to 0
.
template<MaterialLayer layer>
const void* Magnum:: Trade:: MaterialLayerData<layer>:: findAttribute(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>:: findAttribute(Containers:: StringView name) const
Value of a named attribute in the base material, if exists.
Equivalent to calling findAttribute(UnsignedInt, Containers::layer
set to 0
.
template<MaterialLayer layer>
template<class T>
Containers:: Optional<T> Magnum:: Trade:: MaterialLayerData<layer>:: findAttribute(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.
template<MaterialLayer layer>
const void* Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(UnsignedInt layer,
MaterialAttribute name) const
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.
template<MaterialLayer layer>
const void* Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(Containers:: StringView layer,
MaterialAttribute name) const
template<MaterialLayer layer>
const void* Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(MaterialLayer layer,
Containers:: StringView name) const
template<MaterialLayer layer>
const void* Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(MaterialLayer layer,
MaterialAttribute name) const
template<MaterialLayer layer>
template<class T>
Containers:: Optional<T> Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(UnsignedInt layer,
Containers:: StringView name) const
Type-erased attribute value in given material layer, if exists.
template<MaterialLayer layer>
template<class T>
Containers:: Optional<T> Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(UnsignedInt layer,
MaterialAttribute name) const
template<MaterialLayer layer>
template<class T>
Containers:: Optional<T> Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(Containers:: StringView layer,
Containers:: StringView name) const
Type-erased attribute value in a named material layer, if exists.
template<MaterialLayer layer>
template<class T>
Containers:: Optional<T> Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(Containers:: StringView layer,
MaterialAttribute name) const
template<MaterialLayer layer>
template<class T>
Containers:: Optional<T> Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(MaterialLayer layer,
Containers:: StringView name) const
Type-erased attribute value in given material layer, if exists.
template<MaterialLayer layer>
template<class T>
Containers:: Optional<T> Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(MaterialLayer layer,
MaterialAttribute name) const
template<MaterialLayer layer>
const void* Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(Containers:: StringView name) const
Type-erased attribute value in this layer, if exists.
template<MaterialLayer layer>
const void* Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(MaterialAttribute name) const
template<MaterialLayer layer>
template<class T>
Containers:: Optional<T> Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(Containers:: StringView name) const
Type-erased attribute value in this layer, if exists.
template<MaterialLayer layer>
template<class T>
Containers:: Optional<T> Magnum:: Trade:: MaterialLayerData<layer>:: tryAttribute(MaterialAttribute name) const
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::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::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::name
doesn't exist, returns defaultValue
instead of asserting. Expects that layer
exists and that T
corresponds to attributeType(Containers::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::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.