class new in Git master
#include <Magnum/Trade/FlatMaterialData.h>
FlatMaterialData Flat 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 hasTexture() const -> bool
- Whether the material has a texture.
- auto hasTextureTransformation() const -> bool
- Whether the material has texture transformation.
- auto hasTextureCoordinates() const -> bool
- Whether the material uses extra texture coordinate sets.
- auto hasTextureLayer() const -> bool
- Whether the material uses array texture layers.
- auto color() const -> Color4
- Color.
- auto texture() const -> UnsignedInt
- Texture ID.
- auto textureMatrix() const -> Matrix3
- Texture coordinate transformation matrix.
- auto textureCoordinates() const -> UnsignedInt
- Texture coordinate set.
- auto textureLayer() const -> UnsignedInt
- Array texture layer.
Function documentation
bool Magnum:: Trade:: FlatMaterialData:: hasTexture() const
Whether the material has a texture.
Returns true
if any of the MaterialAttribute::false
otherwise.
bool Magnum:: Trade:: FlatMaterialData:: hasTextureTransformation() const
Whether the material has texture transformation.
Returns true
if the material is textured and a MaterialAttribute::false
otherwise. In particular, if there's for example a MaterialAttribute::false
.
bool Magnum:: Trade:: FlatMaterialData:: hasTextureCoordinates() const
Whether the material uses extra texture coordinate sets.
Returns true
if the material is textured and a MaterialAttribute::false
otherwise. In particular, if there's for example a MaterialAttribute::false
.
bool Magnum:: Trade:: FlatMaterialData:: hasTextureLayer() const
Whether the material uses array texture layers.
Returns true
if the material is textured and a MaterialAttribute::false
otherwise. In particular, if there's for example a MaterialAttribute::false
.
Color4 Magnum:: Trade:: FlatMaterialData:: color() const
Color.
Convenience access to the MaterialAttribute::0xffffffff_srgbaf
.
If the material has a texture, the color attribute matching the texture is picked (instead of combining e.g. a MaterialAttribute::
UnsignedInt Magnum:: Trade:: FlatMaterialData:: texture() const
Texture ID.
Available only if either MaterialAttribute::
Matrix3 Magnum:: Trade:: FlatMaterialData:: textureMatrix() const
Texture coordinate transformation matrix.
Convenience access to the MaterialAttribute::
UnsignedInt Magnum:: Trade:: FlatMaterialData:: textureCoordinates() const
Texture coordinate set.
Convenience access to the MaterialAttribute::0
. Available only if the material has a texture.
UnsignedInt Magnum:: Trade:: FlatMaterialData:: textureLayer() const
Array texture layer.
Convenience access to the MaterialAttribute::0
. Available only if the material has a texture.