class new in Git master
PbrSpecularGlossinessMaterialDataPBR specular/glossiness material data.
See Material types and convenience accessors for more information about how to use this class.
Base classes
- class MaterialData new in Git master
- Material data.
Public functions
- auto hasSpecularTexture() const -> bool
- Whether the material has a specular texture.
- auto hasGlossinessTexture() const -> bool
- Whether the material has a glossiness texture.
- auto hasSpecularGlossinessTexture() const -> bool
- Whether the material has a combined specular/glossiness 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 diffuseColor() const -> Color4
- Diffuse color.
- auto diffuseTexture() const -> UnsignedInt
- Diffuse texture ID.
- auto diffuseTextureMatrix() const -> Matrix3
- Diffuse texture coordinate transformation matrix.
- auto diffuseTextureCoordinates() const -> UnsignedInt
- Diffuse texture coordinate set.
- auto diffuseTextureLayer() const -> UnsignedInt
- Diffuse array texture layer.
- auto specularColor() const -> Color4
- Specular color.
- auto specularTexture() const -> UnsignedInt
- Specular texture ID.
- auto specularTextureSwizzle() const -> MaterialTextureSwizzle
- Specular texture swizzle.
- auto specularTextureMatrix() const -> Matrix3
- Specular texture coordinate transformation matrix.
- auto specularTextureCoordinates() const -> UnsignedInt
- Specular texture coordinate set.
- auto specularTextureLayer() const -> UnsignedInt
- Specular array texture layer.
- auto glossiness() const -> Float
- Glossiness factor.
- auto glossinessTexture() const -> UnsignedInt
- Glossiness texture ID.
- auto glossinessTextureSwizzle() const -> MaterialTextureSwizzle
- Glossiness texture swizzle.
- auto glossinessTextureMatrix() const -> Matrix3
- Glossiness texture coordinate transformation matrix.
- auto glossinessTextureCoordinates() const -> UnsignedInt
- Glossiness texture coordinate set.
- auto glossinessTextureLayer() const -> UnsignedInt
- Glossiness 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 occlusionTexture() const -> UnsignedInt
- Occlusion texture ID.
- auto occlusionTextureStrength() const -> Float
- Occlusion texture strength.
- auto occlusionTextureSwizzle() const -> MaterialTextureSwizzle
- Occlusion texture swizzle.
- auto occlusionTextureMatrix() const -> Matrix3
- Occlusion texture coordinate transformation matrix.
- auto occlusionTextureCoordinates() const -> UnsignedInt
- Occlusion texture coordinate set.
- auto occlusionTextureLayer() const -> UnsignedInt
- Occlusion array texture layer.
- auto emissiveColor() const -> Color3
- Emissive color.
- auto emissiveTexture() const -> UnsignedInt
- Emissive texture ID.
- auto emissiveTextureMatrix() const -> Matrix3
- Emissive texture coordinate transformation matrix.
- auto emissiveTextureCoordinates() const -> UnsignedInt
- Emissive texture coordinate set.
- auto emissiveTextureLayer() const -> UnsignedInt
- Emissive 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:: PbrSpecularGlossinessMaterialData:: hasSpecularTexture() const
Whether the material has a specular texture.
Returns true
if any of the MaterialAttribute::false
otherwise.
bool Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: hasGlossinessTexture() const
Whether the material has a glossiness texture.
Returns true
if any of the MaterialAttribute::false
otherwise.
bool Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: hasSpecularGlossinessTexture() const
Whether the material has a combined specular/glossiness texture.
Returns true
if either the MaterialAttribute::false
otherwise.
In other words, if this function returns true
, specularTexture(), specularTextureMatrix(), specularTextureCoordinates() and specularTextureLayer() return values common for both specular and glossiness texture, and the two are packed together with specular occupying the RGB channels and glossiness the alpha.
bool Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: hasTextureTransformation() const
Whether the material has texture transformation.
Returns true
if any of the MaterialAttribute::false
otherwise.
bool Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: hasCommonTextureTransformation() const
Whether the material has a common transformation for all textures.
Returns true
if, for each texture that is present, diffuseTextureMatrix(), specularTextureMatrix(), glossinessTextureMatrix(), normalTextureMatrix(), occlusionTextureMatrix() and emissiveTextureMatrix() 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:: PbrSpecularGlossinessMaterialData:: hasTextureCoordinates() const
Whether the material uses extra texture coordinate sets.
Returns true
if any of the MaterialAttribute::false
otherwise.
bool Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: hasCommonTextureCoordinates() const
Whether the material has a common coordinate set for all textures.
Returns true
if, for each texture that is present, diffuseTextureCoordinates(), specularTextureCoordinates(), glossinessTextureCoordinates(), normalTextureCoordinates(), occlusionTextureCoordinates() and emissiveTextureCoordinates() 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:: PbrSpecularGlossinessMaterialData:: hasTextureLayer() const
Whether the material uses array texture layers.
Returns true
if any of the MaterialAttribute::false
otherwise.
bool Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: hasCommonTextureLayer() const
Whether the material has a common array texture layer for all textures.
Returns true
if, for each texture that is present, diffuseTextureLayer(), specularTextureLayer(), glossinessTextureLayer(), normalTextureLayer(), occlusionTextureLayer() and emissiveTextureLayer() 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.
Color4 Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: diffuseColor() const
Diffuse color.
Convenience access to the MaterialAttribute::0xffffffff_srgbaf
.
If the material has MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: diffuseTexture() const
Diffuse texture ID.
Available only if MaterialAttribute::
Matrix3 Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: diffuseTextureMatrix() const
Diffuse texture coordinate transformation matrix.
Convenience access to the MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: diffuseTextureCoordinates() const
Diffuse texture coordinate set.
Convenience access to the MaterialAttribute::0
. Available only if the material has MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: diffuseTextureLayer() const
Diffuse array texture layer.
Convenience access to the MaterialAttribute::0
. Available only if the material has MaterialAttribute::
Color4 Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: specularColor() const
Specular color.
Convenience access to the MaterialAttribute::0xffffff00_srgbaf
.
If the material has a specular texture, the color and texture is meant to be multiplied together.
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: specularTexture() const
Specular texture ID.
Available only if either MaterialAttribute::
MaterialTextureSwizzle Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: specularTextureSwizzle() const
Specular texture swizzle.
If MaterialAttribute::
Matrix3 Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: specularTextureMatrix() const
Specular texture coordinate transformation matrix.
Convenience access to the MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: specularTextureCoordinates() const
Specular texture coordinate set.
Convenience access to the MaterialAttribute::0
. Available only if the material has a specular texture.
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: specularTextureLayer() const
Specular array texture layer.
Convenience access to the MaterialAttribute::0
. Available only if the material has a specular texture.
Float Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: glossiness() const
Glossiness factor.
Convenience access to the MaterialAttribute::1.0f
.
If the material has a glossiness texture, the factor and texture is meant to be multiplied together.
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: glossinessTexture() const
Glossiness texture ID.
Available only if either MaterialAttribute::
MaterialTextureSwizzle Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: glossinessTextureSwizzle() const
Glossiness texture swizzle.
If MaterialAttribute::
Matrix3 Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: glossinessTextureMatrix() const
Glossiness texture coordinate transformation matrix.
Convenience access to the MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: glossinessTextureCoordinates() const
Glossiness texture coordinate set.
Convenience access to the MaterialAttribute::0
. Available only if the material has a glossiness texture.
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: glossinessTextureLayer() const
Glossiness array texture layer.
Convenience access to the MaterialAttribute::0
. Available only if the material has a glossiness texture.
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: normalTexture() const
Normal texture ID.
Available only if MaterialAttribute::
Float Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: normalTextureScale() const
Normal texture scale.
Convenience access to the MaterialAttribute::1.0f
. Available only if MaterialAttribute::
MaterialTextureSwizzle Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: normalTextureSwizzle() const
Normal texture swizzle.
Convenience access to the MaterialAttribute::
Matrix3 Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: normalTextureMatrix() const
Normal texture coordinate transformation matrix.
Convenience access to the MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: normalTextureCoordinates() const
Normal texture coordinate set.
Convenience access to the MaterialAttribute::0
. Available only if the material has MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: normalTextureLayer() const
Normal array texture layer.
Convenience access to the MaterialAttribute::0
. Available only if the material has MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: occlusionTexture() const
Occlusion texture ID.
Available only if MaterialAttribute::
Float Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: occlusionTextureStrength() const
Occlusion texture strength.
Convenience access to the MaterialAttribute::1.0f
. Available only if MaterialAttribute::
MaterialTextureSwizzle Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: occlusionTextureSwizzle() const
Occlusion texture swizzle.
Convenience access to the MaterialAttribute::
Matrix3 Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: occlusionTextureMatrix() const
Occlusion texture coordinate transformation matrix.
Convenience access to the MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: occlusionTextureCoordinates() const
Occlusion texture coordinate set.
Convenience access to the MaterialAttribute::0
. Available only if the material has MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: occlusionTextureLayer() const
Occlusion array texture layer.
Convenience access to the MaterialAttribute::0
. Available only if the material has MaterialAttribute::
Color3 Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: emissiveColor() const
Emissive color.
Convenience access to the MaterialAttribute::0x000000_srgbf
(i.e, no emission).
If the material has MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: emissiveTexture() const
Emissive texture ID.
Available only if MaterialAttribute::
Matrix3 Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: emissiveTextureMatrix() const
Emissive texture coordinate transformation matrix.
Convenience access to the MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: emissiveTextureCoordinates() const
Emissive texture coordinate set.
Convenience access to the MaterialAttribute::0
. Available only if the material has MaterialAttribute::
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: emissiveTextureLayer() const
Emissive array texture layer.
Convenience access to the MaterialAttribute::0
. Available only if the material has MaterialAttribute::
Matrix3 Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: 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 diffuseTextureMatrix(), specularTextureMatrix(), glossinessTextureMatrix(), normalTextureMatrix(), occlusionTextureMatrix() and emissiveTextureMatrix() where a texture is present. If no texture is present, returns an identity matrix.
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: 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 diffuseTextureCoordinates(), specularTextureCoordinates(), glossinessTextureCoordinates(), normalTextureCoordinates(), occlusionTextureCoordinates() and emissiveTextureCoordinates() where a texture is present. If no texture is present, returns 0
.
UnsignedInt Magnum:: Trade:: PbrSpecularGlossinessMaterialData:: commonTextureLayer() const
Common array texture layer for all textures.
Expects that hasCommonTextureLayer() is true
; returns a layer that's the same for all of diffuseTextureLayer(), specularTextureLayer(), glossinessTextureLayer(), normalTextureLayer(), occlusionTextureLayer() and emissiveTextureLayer() where a texture is present. If no texture is present, returns 0
.