class new in Git master
PbrClearCoatMaterialDataClear coat material layer data.
Exposes properties of a MaterialLayer::
Base classes
-
template<MaterialLayer layer>class MaterialLayerData<MaterialLayer::ClearCoat> new in Git master
- Material layer data.
Public functions
- auto hasLayerFactorRoughnessTexture() const -> bool
- Whether the material has a combined layer factor / roughness texture.
- auto hasTextureTransformation() const -> bool
- Whether the material has texture transformation.
- auto hasCommonTextureTransformation() const -> bool
- Whether the material has a common transformation for all textures.
- auto hasTextureCoordinates() const -> bool
- Whether the material uses extra texture coordinate sets.
- auto hasCommonTextureCoordinates() const -> bool
- Whether the material has a common coordinate set for all textures.
- auto hasTextureLayer() const -> bool
- Whether the material uses array texture layers.
- auto hasCommonTextureLayer() const -> bool
- Whether the material has a common array texture layer for all textures.
- auto roughness() const -> Float
- Roughness factor.
- auto roughnessTexture() const -> UnsignedInt
- Roughness texture ID.
- auto roughnessTextureSwizzle() const -> MaterialTextureSwizzle
- Roughness texture swizzle.
- auto roughnessTextureMatrix() const -> Matrix3
- Roughness texture coordinate transformation matrix.
- auto roughnessTextureCoordinates() const -> UnsignedInt
- Roughness texture coordinate set.
- auto roughnessTextureLayer() const -> UnsignedInt
- Roughness array texture layer.
- auto normalTexture() const -> UnsignedInt
- Normal texture ID.
- auto normalTextureScale() const -> Float
- Normal texture scale.
- auto normalTextureSwizzle() const -> MaterialTextureSwizzle
- Normal texture swizzle.
- auto normalTextureMatrix() const -> Matrix3
- Normal texture coordinate transformation matrix.
- auto normalTextureCoordinates() const -> UnsignedInt
- Normal texture coordinate set.
- auto normalTextureLayer() const -> UnsignedInt
- Normal array texture layer.
- auto commonTextureMatrix() const -> Matrix3
- Common texture coordinate transformation matrix for all textures.
- auto commonTextureCoordinates() const -> UnsignedInt
- Common texture coordinate set for all textures.
- auto commonTextureLayer() const -> UnsignedInt
- Common array texture layer for all textures.
Function documentation
bool Magnum:: Trade:: PbrClearCoatMaterialData:: hasLayerFactorRoughnessTexture() const
Whether the material has a combined layer factor / roughness texture.
Returns true
if both MaterialAttribute::false
otherwise.
In other words, if this function returns true
, layerFactorTexture(), layerFactorTextureMatrix(), layerFactorTextureCoordinates() and layerFactorTextureLayer() return values common for both layer factor and roughness texture, and the two are packed together with layer factor occupying the R channel and roughness the G channel. This check is present in order to provide support for the KHR_
bool Magnum:: Trade:: PbrClearCoatMaterialData:: hasTextureTransformation() const
Whether the material has texture transformation.
Returns true
if any of the MaterialAttribute::false
otherwise.
bool Magnum:: Trade:: PbrClearCoatMaterialData:: hasCommonTextureTransformation() const
Whether the material has a common transformation for all textures.
Returns true
if, for each texture that is present, layerFactorTextureMatrix(), roughnessTextureMatrix() and normalTextureMatrix() have the same value, false
otherwise. In particular, returns true
also if there's no texture transformation at all. Use hasTextureTransformation() to distinguish that case.
bool Magnum:: Trade:: PbrClearCoatMaterialData:: hasTextureCoordinates() const
Whether the material uses extra texture coordinate sets.
Returns true
if any of the MaterialAttribute::false
otherwise.
bool Magnum:: Trade:: PbrClearCoatMaterialData:: hasCommonTextureCoordinates() const
Whether the material has a common coordinate set for all textures.
Returns true
if, for each texture that is present, layerFactorTextureCoordinates(), roughnessTextureCoordinates() and normalTextureCoordinates() have the same value, false
otherwise. In particular, returns true
also if there's no extra texture coordinate set used at all. Use hasTextureCoordinates() to distinguish that case.
bool Magnum:: Trade:: PbrClearCoatMaterialData:: hasTextureLayer() const
Whether the material uses array texture layers.
Returns true
if any of the MaterialAttribute::false
otherwise.
bool Magnum:: Trade:: PbrClearCoatMaterialData:: hasCommonTextureLayer() const
Whether the material has a common array texture layer for all textures.
Returns true
if, for each texture that is present, layerFactorTextureLayer(), roughnessTextureLayer() and normalTextureLayer() have the same value, false
otherwise. In particular, returns true
also if there's no array texture layer used at all. Use hasTextureLayer() to distinguish that case.
Float Magnum:: Trade:: PbrClearCoatMaterialData:: roughness() const
Roughness factor.
Convenience access to the MaterialAttribute::1.0f
.
If the layer has a MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrClearCoatMaterialData:: roughnessTexture() const
Roughness texture ID.
Available only if MaterialAttribute::
MaterialTextureSwizzle Magnum:: Trade:: PbrClearCoatMaterialData:: roughnessTextureSwizzle() const
Roughness texture swizzle.
Convenience access to the MaterialAttribute::
Matrix3 Magnum:: Trade:: PbrClearCoatMaterialData:: roughnessTextureMatrix() const
Roughness texture coordinate transformation matrix.
Convenience access to the MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrClearCoatMaterialData:: roughnessTextureCoordinates() const
Roughness texture coordinate set.
Convenience access to the MaterialAttribute::0
. Available only if MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrClearCoatMaterialData:: roughnessTextureLayer() const
Roughness array texture layer.
Convenience access to the MaterialAttribute::0
. Available only if MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrClearCoatMaterialData:: normalTexture() const
Normal texture ID.
Available only if MaterialAttribute::
Float Magnum:: Trade:: PbrClearCoatMaterialData:: normalTextureScale() const
Normal texture scale.
Convenience access to the MaterialAttribute::1.0f
. Available only if MaterialAttribute::
MaterialTextureSwizzle Magnum:: Trade:: PbrClearCoatMaterialData:: normalTextureSwizzle() const
Normal texture swizzle.
Convenience access to the MaterialAttribute::
The texture can be also just two-component, in which case the remaining component is implicit and calculated as .
Matrix3 Magnum:: Trade:: PbrClearCoatMaterialData:: normalTextureMatrix() const
Normal texture coordinate transformation matrix.
Convenience access to the MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrClearCoatMaterialData:: normalTextureCoordinates() const
Normal texture coordinate set.
Convenience access to the MaterialAttribute::0
. Available only if MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrClearCoatMaterialData:: normalTextureLayer() const
Normal array texture layer.
Convenience access to the MaterialAttribute::0
. Available only if MaterialAttribute::
Matrix3 Magnum:: Trade:: PbrClearCoatMaterialData:: commonTextureMatrix() const
Common texture coordinate transformation matrix for all textures.
Expects that hasCommonTextureTransformation() is true
; returns a matrix that's the same for all of layerFactorTextureMatrix(), roughnessTextureMatrix() and normalTextureMatrix() where a texture is present. If no texture is present, returns an identity matrix.
UnsignedInt Magnum:: Trade:: PbrClearCoatMaterialData:: commonTextureCoordinates() const
Common texture coordinate set for all textures.
Expects that hasCommonTextureCoordinates() is true
; returns a coordinate set that's the same for all of layerFactorTextureCoordinates(), roughnessTextureCoordinates() and normalTextureCoordinates() where a texture is present. If no texture is present, returns 0
.
UnsignedInt Magnum:: Trade:: PbrClearCoatMaterialData:: commonTextureLayer() const
Common array texture layer for all textures.
Expects that hasCommonTextureLayer() is true
; returns a layer that's the same for all of layerFactorTextureLayer(), roughnessTextureLayer() and normalTextureLayer() where a texture is present. If no texture is present, returns 0
.