namespace
TradeData format exchange.
Contents
- Reference
Contains plugin interfaces for importing data of various formats and classes for direct access to the data.
This library is built if WITH_TRADE
is enabled when building Magnum. To use this library with CMake, request the Trade
component of the Magnum
package and link to the Magnum::Trade
target:
find_package(Magnum REQUIRED Trade) # ... target_link_libraries(your-app PRIVATE Magnum::Trade)
Additional plugins and utilities are built separately. See particular Trade::*Importer
and *ImageConverter
class documentation, the magnum-imageconverter and magnum-sceneconverter utility documentation, Downloading and building, Downloading and building plugins, Usage with CMake, Plugin usage with CMake and Loading and using plugins for more information.
Namespaces
- namespace OpenGex
- OpenGEX structure and property names.
Classes
- class AbstractImageConverter
- Base for image converter plugins.
- class AbstractImporter
- Base for importer plugins.
- class AbstractSceneConverter new in 2020.06
- Base for scene converter plugins.
- class AnimationData
- Animation clip data.
- class AnimationTrackData
- Animation track data.
- class AnyImageConverter
- Any image converter plugin.
- class AnyImageImporter
- Any image importer plugin.
- class AnySceneConverter
- Any scene converter plugin.
- class AnySceneImporter
- Any scene importer plugin.
-
template<class T>struct ArrayAllocator new in 2020.06
- Growable array allocator to be used in importer plugins.
- class AssimpImporter
- Assimp importer.
- class BasisImageConverter new in 2019.10
- Basis Universal image converter plugin.
- class BasisImporter new in 2019.10
- Basis Universal importer plugin.
- class CameraData
- Camera data.
- class DdsImporter
- DDS image importer plugin.
- class DevIlImageImporter
- DevIL Image importer plugin.
- class FlatMaterialData new in Git master
- Flat material data.
- class IcoImporter new in 2020.06
- ICO importer plugin.
-
template<UnsignedInt dimensions>class ImageData
- Image data.
- class JpegImageConverter
- JPEG image converter plugin.
- class JpegImporter
- JPEG importer plugin.
- class LightData
- Light data.
- class MaterialAttributeData new in Git master
- Material attribute data.
- class MaterialData new in Git master
- Material data.
-
template<MaterialLayer layer>class MaterialLayerData new in Git master
- Material layer data.
- class MeshAttributeData new in 2020.06
- Mesh attribute data.
- class MeshData new in 2020.06
- Mesh data.
- class MeshData2D deprecated in 2020.06
- Two-dimensional mesh data.
- class MeshData3D deprecated in 2020.06
- Three-dimensional mesh data.
- class MeshIndexData new in 2020.06
- Mesh index data.
- class MeshObjectData2D
- Two-dimensional mesh object data.
- class MeshObjectData3D
- Three-dimensional mesh object data.
- class MeshOptimizerSceneConverter new in 2020.06
- MeshOptimizer converter plugin.
- class MiniExrImageConverter
- OpenEXR image converter plugin using miniexr.
- class ObjectData2D
- Two-dimensional object data.
- class ObjectData3D
- Three-dimensional object data.
- class ObjImporter
- OBJ importer plugin.
- class OpenExrImageConverter new in Git master
- OpenEXR image converter plugin.
- class OpenExrImporter new in Git master
- OpenEXR importer plugin.
- class OpenGexImporter
- OpenGEX importer.
- class PbrClearCoatMaterialData new in Git master
- Clear coat material layer data.
- class PbrMetallicRoughnessMaterialData new in Git master
- PBR metallic/roughness material data.
- class PbrSpecularGlossinessMaterialData new in Git master
- PBR specular/glossiness material data.
- class PhongMaterialData
- Phong material data.
- class PngImageConverter
- PNG image converter plugin.
- class PngImporter
- PNG importer plugin.
- class PrimitiveImporter new in 2020.06
- Primitive importer plugin.
- class SceneData
- Scene data.
-
template<UnsignedInt dimensions>class SkinData new in Git master
- Skin data.
- class StanfordImporter
- Stanford PLY importer plugin.
- class StanfordSceneConverter new in 2020.06
- Stanford PLY converter plugin.
- class StbImageConverter
- Image converter plugin using stb_image_write.
- class StbImageImporter
- Image importer plugin using stb_image.
- class StlImporter new in 2020.06
- STL importer plugin.
- class TextureData
- Texture data.
- class TgaImageConverter
- TGA image converter plugin.
- class TgaImporter
- TGA importer plugin.
- class TinyGltfImporter
- TinyGltf importer plugin.
Enums
- enum class ImageConverterFeature: UnsignedInt { Convert1D = 1 << 0 new in Git master, Convert2D = 1 << 1 new in Git master, ConvertImage = Convert2D deprecated in Git master, ConvertCompressedImage = Convert2D deprecated in Git master, Convert3D = 1 << 3 new in Git master, ConvertCompressed1D = 1 << 4 new in Git master, ConvertCompressed2D = 1 << 5 new in Git master, ConvertCompressed3D = 1 << 6 new in Git master, Convert1DToFile = 1 << 7 new in Git master, Convert2DToFile = 1 << 8 new in Git master, ConvertFile = Convert2DToFile deprecated in Git master, Convert3DToFile = 1 << 9 new in Git master, ConvertCompressed1DToFile = 1 << 10 new in Git master, ConvertCompressed2DToFile = 1 << 11 new in Git master, ConvertCompressedFile = ConvertCompressed2DToFile deprecated in Git master, ConvertCompressed3DToFile = 1 << 12 new in Git master, Convert1DToData = Convert1DToFile|(1 << 13) new in Git master, Convert2DToData = Convert2DToFile|(1 << 13) new in Git master, ConvertData = Convert2DToData deprecated in Git master, Convert3DToData = Convert3DToFile|(1 << 13) new in Git master, ConvertCompressed1DToData = ConvertCompressed1DToFile|(1 << 13) new in Git master, ConvertCompressed2DToData = ConvertCompressed2DToFile|(1 << 13) new in Git master, ConvertCompressedData = ConvertCompressed2DToData deprecated in Git master, ConvertCompressed3DToData = ConvertCompressed3DToFile|(1 << 13) new in Git master } new in 2020.06
- Features supported by an image converter.
- enum class ImageConverterFlag: UnsignedByte { Verbose = 1 << 0 } new in 2020.06
- Image converter flag.
- enum class ImporterFeature: UnsignedByte { OpenData = 1 << 0, OpenState = 1 << 1, FileCallback = 1 << 2 } new in 2020.06
- Features supported by an importer.
- enum class ImporterFlag: UnsignedByte { Verbose = 1 << 0 } new in 2020.06
- Importer flag.
- enum class SceneConverterFeature: UnsignedByte { ConvertMesh = 1 << 0, ConvertMeshInPlace = 1 << 1, ConvertMeshToFile = 1 << 2, ConvertMeshToData = ConvertMeshToFile|(1 << 3) } new in 2020.06
- Features supported by a scene converter.
- enum class SceneConverterFlag: UnsignedByte { Verbose = 1 << 0 } new in 2020.06
- Scene converter flag.
- enum class AnimationTrackType: UnsignedByte { Bool, Float, UnsignedInt, Int, BoolVector2, BoolVector3, BoolVector4, Vector2, Vector2ui, Vector2i, Vector3, Vector3ui, Vector3i, Vector4, Vector4ui, Vector4i, Complex, Quaternion, DualQuaternion, CubicHermite1D, CubicHermite2D, CubicHermite3D, CubicHermiteComplex, CubicHermiteQuaternion }
- Type of animation track data.
- enum class AnimationTrackTargetType: UnsignedByte { Translation2D, Translation3D, Rotation2D, Rotation3D, Scaling2D, Scaling3D, Custom = 128 }
- Target of an animation track.
- enum class CameraType: UnsignedByte { Orthographic2D, Orthographic3D, Perspective3D }
- Camera type.
- enum class DataFlag: UnsignedByte { Owned = 1 << 0, Mutable = 2 << 0 } new in 2020.06
- Data flag.
- enum class MaterialLayer: UnsignedInt { ClearCoat = 1 } new in Git master
- Material layer name.
- enum class MaterialAttribute: UnsignedInt { LayerName = 1, AlphaMask, AlphaBlend, DoubleSided, AmbientColor, AmbientTexture, AmbientTextureMatrix, AmbientTextureCoordinates, DiffuseColor, DiffuseTexture, DiffuseTextureMatrix, DiffuseTextureCoordinates, SpecularColor, SpecularTexture, SpecularTextureSwizzle, SpecularTextureMatrix, SpecularTextureCoordinates, Shininess, BaseColor, BaseColorTexture, BaseColorTextureMatrix, BaseColorTextureCoordinates, Metalness, MetalnessTexture, MetalnessTextureSwizzle, MetalnessTextureMatrix, MetalnessTextureCoordinates, Roughness, RoughnessTexture, RoughnessTextureSwizzle, RoughnessTextureMatrix, RoughnessTextureCoordinates, NoneRoughnessMetallicTexture, Glossiness, GlossinessTexture, GlossinessTextureSwizzle, GlossinessTextureMatrix, GlossinessTextureCoordinates, SpecularGlossinessTexture, NormalTexture, NormalTextureScale, NormalTextureSwizzle, NormalTextureMatrix, NormalTextureCoordinates, OcclusionTexture, OcclusionTextureStrength, OcclusionTextureSwizzle, OcclusionTextureMatrix, OcclusionTextureCoordinates, EmissiveColor, EmissiveTexture, EmissiveTextureMatrix, EmissiveTextureCoordinates, LayerFactor, LayerFactorTexture, LayerFactorTextureSwizzle, LayerFactorTextureMatrix, LayerFactorTextureCoordinates, TextureMatrix, TextureCoordinates } new in Git master
- Material attribute name.
- enum class MaterialTextureSwizzle: UnsignedInt { R = Utility::Endianness::fourCC('R', '\0', '\0', '\0'), G = Utility::Endianness::fourCC('G', '\0', '\0', '\0'), B = Utility::Endianness::fourCC('B', '\0', '\0', '\0'), A = Utility::Endianness::fourCC('A', '\0', '\0', '\0'), RG = Utility::Endianness::fourCC('R', 'G', '\0', '\0'), GB = Utility::Endianness::fourCC('G', 'B', '\0', '\0'), GA = Utility::Endianness::fourCC('G', 'A', '\0', '\0'), BA = Utility::Endianness::fourCC('B', 'A', '\0', '\0'), RGB = Utility::Endianness::fourCC('R', 'G', 'B', '\0'), GBA = Utility::Endianness::fourCC('G', 'B', 'A', '\0'), RGBA = Utility::Endianness::fourCC('R', 'G', 'B', 'A') } new in Git master
- Material texture swizzle.
- enum class MaterialAttributeType: UnsignedByte { Bool = 1, Float, Deg, Rad, UnsignedInt, Int, UnsignedLong, Long, Vector2, Vector2ui, Vector2i, Vector3, Vector3ui, Vector3i, Vector4, Vector4ui, Vector4i, Matrix2x2, Matrix2x3, Matrix2x4, Matrix3x2, Matrix3x3, Matrix3x4, Matrix4x2, Matrix4x3, Pointer, MutablePointer, String, TextureSwizzle } new in Git master
- Material attribute type.
- enum class MaterialType: UnsignedInt { Flat = 1 << 0, Phong = 1 << 1, PbrMetallicRoughness = 1 << 2, PbrSpecularGlossiness = 1 << 3, PbrClearCoat = 1 << 4 }
- Material type.
- enum class MaterialAlphaMode: UnsignedByte { Opaque, Mask, Blend }
- Material alpha mode.
- enum class MeshAttribute: UnsignedShort { Position = 1, Tangent, Bitangent, Normal, TextureCoordinates, Color, ObjectId, Custom = 32768 } new in 2020.06
- Mesh attribute name.
- enum class ObjectInstanceType2D: UnsignedByte { Camera, Mesh, Empty }
- Type of instance held by given 2D object.
- enum class ObjectFlag2D: UnsignedByte { HasTranslationRotationScaling = 1 << 0 }
- 2D object flag
- enum class ObjectInstanceType3D: UnsignedByte { Camera, Light, Mesh, Empty }
- Type of instance held by given 3D object.
- enum class ObjectFlag3D: UnsignedByte { HasTranslationRotationScaling = 1 << 0 }
- 3D object flag
Typedefs
-
using ImageConverterFeatures = Containers::
EnumSet<ImageConverterFeature> new in 2020.06 - Features supported by an image converter.
-
using ImageConverterFlags = Containers::
EnumSet<ImageConverterFlag> new in 2020.06 - Image converter flags.
-
using ImporterFeatures = Containers::
EnumSet<ImporterFeature> new in 2020.06 - Set of features supported by an importer.
- using ImporterFileCallbackPolicy = InputFileCallbackPolicy deprecated in 2019.10
- Input file callback policy.
-
using ImporterFlags = Containers::
EnumSet<ImporterFlag> new in 2020.06 - Importer flags.
- using AbstractMaterialData = MaterialData deprecated in Git master
- Material data.
-
using SceneConverterFeatures = Containers::
EnumSet<SceneConverterFeature> new in 2020.06 - Features supported by a scene converter.
-
using SceneConverterFlags = Containers::
EnumSet<SceneConverterFlag> new in 2020.06 - Scene converter flags.
-
using DataFlags = Containers::
EnumSet<DataFlag> new in 2020.06 - Data flags.
- using ImageData1D = ImageData<1>
- One-dimensional image data.
- using ImageData2D = ImageData<2>
- Two-dimensional image data.
- using ImageData3D = ImageData<3>
- Three-dimensional image data.
-
using MaterialTypes = Containers::
EnumSet<MaterialType> new in Git master - Material types.
-
using ObjectFlags2D = Containers::
EnumSet<ObjectFlag2D> - 2D object flags
-
using ObjectFlags3D = Containers::
EnumSet<ObjectFlag3D> - 3D object flags
- using SkinData2D = SkinData<2> new in Git master
- Two-dimensional skin data.
- using SkinData3D = SkinData<3> new in Git master
- Three-dimensional skin data.
Functions
- auto operator<<(Debug& debug, ImageConverterFeature value) -> Debug&
- Debug output operator.
- auto operator<<(Debug& debug, ImageConverterFeatures value) -> Debug&
- Debug output operator.
- auto operator<<(Debug& debug, ImageConverterFlag value) -> Debug& new in 2020.06
- Debug output operator.
- auto operator<<(Debug& debug, ImageConverterFlags value) -> Debug& new in 2020.06
- Debug output operator.
- auto operator<<(Debug& debug, ImporterFeature value) -> Debug&
- Debug output operator.
- auto operator<<(Debug& debug, ImporterFeatures value) -> Debug&
- Debug output operator.
- auto operator<<(Debug& debug, ImporterFlag value) -> Debug& new in 2020.06
- Debug output operator.
- auto operator<<(Debug& debug, ImporterFlags value) -> Debug& new in 2020.06
- Debug output operator.
- auto operator<<(Debug& debug, SceneConverterFeature value) -> Debug&
- Debug output operator.
- auto operator<<(Debug& debug, SceneConverterFeatures value) -> Debug&
- Debug output operator.
- auto operator<<(Debug& debug, SceneConverterFlag value) -> Debug& new in 2020.06
- Debug output operator.
- auto operator<<(Debug& debug, SceneConverterFlags value) -> Debug& new in 2020.06
- Debug output operator.
- auto operator<<(Debug& debug, AnimationTrackType value) -> Debug&
- Debug output operator.
- auto operator<<(Debug& debug, AnimationTrackTargetType value) -> Debug&
- Debug output operator.
-
template<class V, class R = Animation::ResultOf<V>>auto animationInterpolatorFor(Animation::
Interpolation interpolation) -> auto - Animation interpolator function for given interpolation behavior.
- auto operator<<(Debug& debug, CameraType value) -> Debug&
- Debug output operator.
- auto operator<<(Debug& debug, DataFlag value) -> Debug& new in 2020.06
- Debug output operator.
- auto operator<<(Debug& debug, DataFlags value) -> Debug& new in 2020.06
- Debug output operator.
-
auto operator<<(Debug& debug,
LightData::
Type value) -> Debug& - Debug output operator.
- auto operator<<(Debug& debug, MaterialLayer value) -> Debug& new in Git master
- Debug output operator.
- auto operator<<(Debug& debug, MaterialAttribute value) -> Debug& new in Git master
- Debug output operator.
- auto materialTextureSwizzleComponentCount(MaterialTextureSwizzle swizzle) -> UnsignedInt new in Git master
- Component count in a material texture swizzle.
- auto operator<<(Debug& debug, MaterialTextureSwizzle value) -> Debug& new in Git master
- Debug output operator.
-
auto materialAttributeTypeSize(MaterialAttributeType type) -> std::
size_t new in Git master - Byte size of a material attribute type.
- auto operator<<(Debug& debug, MaterialAttributeType value) -> Debug& new in Git master
- Debug output operator.
- auto operator<<(Debug& debug, MaterialType value) -> Debug&
- Debug output operator.
- auto operator<<(Debug& debug, MaterialTypes value) -> Debug&
- Debug output operator.
- auto operator<<(Debug& debug, MaterialAlphaMode value) -> Debug&
- Debug output operator.
-
auto operator<<(Debug& debug,
MaterialData::
Flag value) -> Debug& deprecated in Git master - Debug output operator.
-
auto operator<<(Debug& debug,
MaterialData::
Flags value) -> Debug& deprecated in Git master - Debug output operator.
- auto operator<<(Debug& debug, MeshAttribute value) -> Debug& new in 2020.06
- Debug output operator.
- auto isMeshAttributeCustom(MeshAttribute name) -> bool constexpr new in 2020.06
- Whether a mesh attribute is custom.
- auto meshAttributeCustom(UnsignedShort id) -> MeshAttribute constexpr new in 2020.06
- Create a custom mesh attribute.
- auto meshAttributeCustom(MeshAttribute name) -> UnsignedShort constexpr new in 2020.06
- Get index of a custom mesh attribute.
-
auto meshAttributeDataNonOwningArray(Containers::
ArrayView<const MeshAttributeData> view) -> Containers:: Array<MeshAttributeData> new in 2020.06 - Create a non-owning array of MeshAttributeData items.
- auto operator<<(Debug& debug, ObjectInstanceType2D value) -> Debug&
- Debug output operator.
- auto operator<<(Debug& debug, ObjectFlag2D value) -> Debug&
- Debug output operator.
- auto operator<<(Debug& debug, ObjectFlags2D value) -> Debug&
- Debug output operator.
- auto operator<<(Debug& debug, ObjectInstanceType3D value) -> Debug&
- Debug output operator.
- auto operator<<(Debug& debug, ObjectFlag3D value) -> Debug&
- Debug output operator.
- auto operator<<(Debug& debug, ObjectFlags3D value) -> Debug&
- Debug output operator.
-
auto operator<<(Debug& debug,
PhongMaterialData::
Flag value) -> Debug& deprecated in Git master - Debug output operator.
-
auto operator<<(Debug& debug,
TextureData::
Type value) -> Debug& - Debug output operator.
Enum documentation
enum class Magnum:: Trade:: ImageConverterFeature: UnsignedInt new in 2020.06
Features supported by an image converter.
enum class Magnum:: Trade:: ImageConverterFlag: UnsignedByte new in 2020.06
Image converter flag.
Enumerators | |
---|---|
Verbose |
Print verbose diagnostic during conversion. By default the converter only prints messages on error or when some operation might cause unexpected data modification or loss. Corresponds to the |
enum class Magnum:: Trade:: ImporterFeature: UnsignedByte new in 2020.06
#include <Magnum/Trade/AbstractImporter.h>
Features supported by an importer.
Enumerators | |
---|---|
OpenData |
Opening files from raw data using AbstractImporter:: |
OpenState |
Opening already loaded state using AbstractImporter:: |
FileCallback |
Specifying callbacks for loading additional files referenced from the main file using AbstractImporter:: See Loading data from memory, using file callbacks and particular importer documentation for more information. |
enum class Magnum:: Trade:: ImporterFlag: UnsignedByte new in 2020.06
#include <Magnum/Trade/AbstractImporter.h>
Importer flag.
Enumerators | |
---|---|
Verbose |
Print verbose diagnostic during import. By default the importer only prints messages on error or when some operation might cause unexpected data modification or loss. Corresponds to the |
enum class Magnum:: Trade:: SceneConverterFeature: UnsignedByte new in 2020.06
Features supported by a scene converter.
Enumerators | |
---|---|
ConvertMesh |
Convert a mesh with AbstractSceneConverter:: |
ConvertMeshInPlace |
Convert a mesh in-place with AbstractSceneConverter:: |
ConvertMeshToFile |
Converting a mesh to a file with AbstractSceneConverter:: |
ConvertMeshToData |
Converting a mesh to raw data with AbstractSceneConverter:: |
enum class Magnum:: Trade:: SceneConverterFlag: UnsignedByte new in 2020.06
Scene converter flag.
Enumerators | |
---|---|
Verbose |
Print verbose diagnostic during conversion. By default the converter only prints messages on error or when some operation might cause unexpected data modification or loss. Corresponds to the |
enum class Magnum:: Trade:: AnimationTrackType: UnsignedByte
#include <Magnum/Trade/AnimationData.h>
Type of animation track data.
enum class Magnum:: Trade:: AnimationTrackTargetType: UnsignedByte
#include <Magnum/Trade/AnimationData.h>
Target of an animation track.
Enumerators | |
---|---|
Translation2D |
Modifies 2D object translation. Type is usually Vector2 or CubicHermite2D for spline-interpolated data. |
Translation3D |
Modifies 3D object translation. Type is usually Vector3 or CubicHermite3D for spline-interpolated data. |
Rotation2D |
Modifies 2D object rotation. Type is usually Complex or CubicHermiteComplex for spline-interpolated data. |
Rotation3D |
Modifies 3D object rotation. Type is usually Quaternion or CubicHermiteQuaternion for spline-interpolated data. |
Scaling2D |
Modifies 2D object scaling. Type is usually Vector2 or CubicHermite2D for spline-interpolated data. |
Scaling3D |
Modifies 3D object scaling. Type is usually Vector3 or CubicHermite3D for spline-interpolated data. |
Custom |
This and all higher values are for importer-specific targets. Can be of any type, AnimationData:: |
enum class Magnum:: Trade:: CameraType: UnsignedByte
#include <Magnum/Trade/CameraData.h>
Camera type.
Enumerators | |
---|---|
Orthographic2D |
2D orthographic camera |
Orthographic3D |
3D orthographic camera |
Perspective3D |
3D perspective camera |
enum class Magnum:: Trade:: DataFlag: UnsignedByte new in 2020.06
#include <Magnum/Trade/Data.h>
Data flag.
Enumerators | |
---|---|
Owned |
Data is owned by the instance. If this flag is not set, the instance might be for example referencing a memory-mapped file or a constant memory. |
Mutable |
Data is mutable. If this flag is not set, the instance might be for example referencing a readonly memory-mapped file or a constant memory. |
enum class Magnum:: Trade:: MaterialLayer: UnsignedInt new in Git master
#include <Magnum/Trade/MaterialData.h>
Material layer name.
Convenience aliases to actual layer name strings. The alias is in the same form and capitalization — so for example MaterialLayer::"ClearCoat"
. Each layer is expected to contain (a subset of) the MaterialAttribute::
Enumerators | |
---|---|
ClearCoat |
Clear coat material layer. Expected to contain (a subset of) the MaterialAttribute:: |
enum class Magnum:: Trade:: MaterialAttribute: UnsignedInt new in Git master
#include <Magnum/Trade/MaterialData.h>
Material attribute name.
Convenience aliases to actual attribute name strings. In most cases the alias is in the same form and capitalization — so for example MaterialAttribute::"DoubleSided"
, the only exception is MaterialAttribute::"$LayerName"
.
When this enum si used in MaterialAttributeData constructors, the data are additionally checked for type compatibility. Other than that, there is no difference to the string variants.
Enumerators | |
---|---|
LayerName |
Layer name, MaterialAttributeType:: Unlike other attributes where string name matches the enum name, in this case the corresponding string is |
AlphaMask |
Alpha mask, MaterialAttributeType:: If set together with MaterialAttribute:: |
AlphaBlend |
Alpha blending, MaterialAttributeType:: If |
DoubleSided |
Double sided, MaterialAttributeType:: If not present, the default value is |
AmbientColor |
Ambient color for Phong materials, MaterialAttributeType:: If MaterialAttribute:: |
AmbientTexture |
Ambient texture index for Phong materials, MaterialAttributeType:: If MaterialAttribute:: |
AmbientTextureMatrix |
Ambient texture transformation matrix for Phong materials, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
AmbientTextureCoordinates |
Ambient texture coordinate set index for Phong materials, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
DiffuseColor |
Diffuse color for Phong or PBR specular/glossiness materials, MaterialAttributeType:: If MaterialAttribute:: |
DiffuseTexture |
Diffuse texture index for Phong or PBR specular/glossiness materials, MaterialAttributeType:: If MaterialAttribute:: |
DiffuseTextureMatrix |
Diffuse texture transformation matrix for Phong or PBR specular/glossiness materials, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
DiffuseTextureCoordinates |
Diffuse texture coordinate set index for Phong or PBR specular/glossiness materials, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
SpecularColor |
Specular color for Phong or PBR specular/glossiness materials, MaterialAttributeType:: If MaterialAttribute:: |
SpecularTexture |
Specular texture index for Phong or PBR specular/glossiness materials, MaterialAttributeType:: If MaterialAttribute:: |
SpecularTextureSwizzle |
Specular texture swizzle for Phong or PBR specular/glossiness materials, MaterialAttributeType:: Can be used to describe whether the alpha channel of a MaterialAttribute:: |
SpecularTextureMatrix |
Specular texture transformation matrix for Phong or PBR specular/glossiness materials, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
SpecularTextureCoordinates |
Specular texture coordinate set index for Phong or PBR specular/glossiness materials, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
Shininess |
Shininess value for Phong materials, MaterialAttributeType:: |
BaseColor |
Base color for PBR metallic/roughness materials, MaterialAttributeType:: If MaterialAttribute:: |
BaseColorTexture |
Base color texture index for PBR metallic/roughness materials, MaterialAttributeType:: If MaterialAttribute:: |
BaseColorTextureMatrix |
Base color texture transformation matrix for PBR metallic/roughness materials, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
BaseColorTextureCoordinates |
Base color texture coordinate set index for PBR metallic/roughness materials, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
Metalness |
Metalness for PBR metallic/roughness materials, MaterialAttributeType:: If MaterialAttribute:: |
MetalnessTexture |
Metalness texture index for PBR metallic/roughness materials, MaterialAttributeType:: If MaterialAttribute:: |
MetalnessTextureSwizzle |
Metalness texture swizzle for PBR metallic/roughness materials, MaterialAttributeType:: Can be used to express arbitrary packing of MaterialAttribute:: |
MetalnessTextureMatrix |
Metalness texture transformation matrix for PBR metallic/roughness materials, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
MetalnessTextureCoordinates |
Metalness texture coordinate set index for PBR metallic/roughness materials, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
Roughness |
Roughness for PBR metallic/roughness materials, MaterialAttributeType:: If MaterialAttribute:: |
RoughnessTexture |
Roughness texture index for PBR metallic/roughness materials, MaterialAttributeType:: If MaterialAttribute:: |
RoughnessTextureSwizzle |
Roughness texture swizzle for PBR metallic/roughness materials, MaterialAttributeType:: Can be used to express arbitrary packing of MaterialAttribute:: |
RoughnessTextureMatrix |
Roughness texture transformation matrix for PBR metallic/roughness materials, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
RoughnessTextureCoordinates |
Roughness texture coordinate set index for PBR metallic/roughness materials, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
NoneRoughnessMetallicTexture |
Combined roughness/metallic texture index for PBR metallic/roughness materials with metalness in the blue channel and roughness in the green channel, MaterialAttributeType:: If MaterialAttribute:: This is a convenience alias to simplify representation of glTF and UE4 materials, which is where this packing is used (rationale). This packing (and other variants) can be alternatively specified as a pair of MaterialAttribute:: |
Glossiness |
Glossiness for PBR specular/glossiness materials, MaterialAttributeType:: If MaterialAttribute:: |
GlossinessTexture |
Glossiness texture index for PBR specular/glossiness materials, MaterialAttributeType:: If MaterialAttribute:: |
GlossinessTextureSwizzle |
Glossiness texture swizzle for PBR specular/glossiness materials, MaterialAttributeType:: Can be used to express arbitrary packing of MaterialAttribute:: |
GlossinessTextureMatrix |
Glossiness texture transformation matrix for PBR specular/glossiness materials, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
GlossinessTextureCoordinates |
Glossiness texture coordinate set index for PBR specular/glossiness materials, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
SpecularGlossinessTexture |
Combined specular/glossiness texture index for PBR specular/glossiness materials with specular color in the RGB channels and glossiness in alpha, MaterialAttributeType:: If MaterialAttribute:: |
NormalTexture |
Tangent-space normal map texture index, MaterialAttributeType:: If MaterialAttribute:: |
NormalTextureScale |
Normal texture scale, MaterialAttributeType:: Scales the texture defined by MaterialAttribute:: |
NormalTextureSwizzle |
Normal texture swizzle, MaterialAttributeType:: Can be used to express arbitrary packing together with other maps in a single texture. A two- or three-channel swizzle value is expected. If not present, MaterialTextureSwizzle:: If the texture is just two-component, the remaining component is implicit and calculated as . In order to account for numeric issues and avoid negative values under the square root, it's commonly done as . Additionally, to mitigate artifacts when storing normal texture in a compressed format, MaterialTextureSwizzle:: Shader code that is able to reconstruct a XYZ normal from both RG and GA variants assuming constant values in other channels (source): /* Assumes (1, y, 1, x) or (x, y, <anything>, 1) */ vec3 unpackTwoChannelNormal(vec4 packed) { packed.x *= packed.w; /* reconstruct Z */ vec3 normal; normal.xy = packed.xy*2.0 - 1.0; normal.z = sqrt(max(0.0, 1.0 - dot(normal.xy, normal.xy))); return normal; } |
NormalTextureMatrix |
Normal texture transformation matrix, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
NormalTextureCoordinates |
Normal texture coordinate set index, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
OcclusionTexture |
Occlusion texture index, MaterialAttributeType:: Single-channel texture that multiplies the resulting material color : If MaterialAttribute:: |
OcclusionTextureStrength |
Occlusion texture strength, MaterialAttributeType:: Affects the texture defined by MaterialAttribute:: |
OcclusionTextureSwizzle |
Occlusion texture swizzle, MaterialAttributeType:: Can be used to express arbitrary packing together with other maps in a single texture. A single-channel swizzle value is expected. If not present, MaterialTextureSwizzle:: |
OcclusionTextureMatrix |
Occlusion texture transformation matrix, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
OcclusionTextureCoordinates |
Occlusion texture coordinate set index, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
EmissiveColor |
Emissive color, MaterialAttributeType:: If MaterialAttribute:: |
EmissiveTexture |
Emissive texture index, MaterialAttributeType:: If MaterialAttribute:: |
EmissiveTextureMatrix |
Emissive texture transformation matrix, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
EmissiveTextureCoordinates |
Emissive texture coordinate set index, MaterialAttributeType:: Has a precedence over MaterialAttribute:: |
LayerFactor |
Layer intensity. MaterialAttributeType:: Expected to be contained in additional layers, not the base material. The exact semantic of this attribute is layer-specific. If MaterialAttribute:: |
LayerFactorTexture |
Layer intensity texture, MaterialAttributeType:: Expected to be contained in additional layers, not the base material. The exact semantic of this attribute is layer-specific. If MaterialAttribute:: |
LayerFactorTextureSwizzle |
Layer intensity texture swizzle, MaterialAttributeType:: Can be used to express arbitrary packing together with other maps in a single texture. A single-channel swizzle value is expected. If not present, MaterialTextureSwizzle:: |
LayerFactorTextureMatrix |
Layer intensity texture transformation matrix, MaterialAttributeType:: Expected to be contained in additional layers, not the base material. Has a precedence over MaterialAttribute:: |
LayerFactorTextureCoordinates |
Layer intensity texture coordinate set index, MaterialAttributeType:: Expected to be contained in additional layers, not the base material. Has a precedence over MaterialAttribute:: |
TextureMatrix |
Common texture transformation matrix for all textures, MaterialAttributeType:: MaterialAttribute:: |
TextureCoordinates |
Common texture coordinate set index for all textures, MaterialAttributeType:: MaterialAttribute:: |
enum class Magnum:: Trade:: MaterialTextureSwizzle: UnsignedInt new in Git master
#include <Magnum/Trade/MaterialData.h>
Material texture swizzle.
See MaterialData for more information.
Enumerators | |
---|---|
R |
Red component |
G |
Green component |
B |
Blue component |
A |
Alpha component |
RG |
Red and green component |
GB |
Green and blue component |
GA |
Green and alpha component. May get used to mitigate artifacts when storing two independent channels (such as two-channel normal maps) in compressed texture formats — these commonly have separately compressed RGB and alpha, with green channel having the most precision of the RGB triplet. |
BA |
Blue and alpha component |
RGB |
RGB components |
GBA |
GBA components |
RGBA |
RGBA components |
enum class Magnum:: Trade:: MaterialAttributeType: UnsignedByte new in Git master
#include <Magnum/Trade/MaterialData.h>
Material attribute type.
See MaterialData for more information.
Enumerators | |
---|---|
Bool |
|
Float | |
Deg | |
Rad | |
UnsignedInt | |
Int | |
UnsignedLong | |
Long | |
Vector2 | |
Vector2ui | |
Vector2i | |
Vector3 | |
Vector3ui | |
Vector3i | |
Vector4 | |
Vector4ui | |
Vector4i | |
Matrix2x2 | |
Matrix2x3 | |
Matrix2x4 | |
Matrix3x2 | |
Matrix3x3 | |
Matrix3x4 | |
Matrix4x2 | |
Matrix4x3 | |
Pointer |
|
MutablePointer |
|
String |
Null-terminated string. Can be stored using any type convertible to Corrade:: |
TextureSwizzle |
One of the values from MaterialTextureSwizzle |
enum class Magnum:: Trade:: MaterialType: UnsignedInt
#include <Magnum/Trade/MaterialData.h>
Material type.
Enumerators | |
---|---|
Flat |
Flat. Use FlatMaterialData for convenience attribute access. Materials of this type are generally not combined with any other types. |
Phong |
Phong. Use PhongMaterialData for convenience attribute access. |
PbrMetallicRoughness |
PBR metallic/roughness. Use PbrMetallicRoughnessMaterialData for convenience attribute access. |
PbrSpecularGlossiness |
PBR specular/glossiness. Use PbrSpecularGlossinessMaterialData for convenience attribute access. |
PbrClearCoat |
PBR clear coat layer. Use PbrClearCoatMaterialData for convenience attribute access. |
enum class Magnum:: Trade:: MaterialAlphaMode: UnsignedByte
#include <Magnum/Trade/MaterialData.h>
Material alpha mode.
Convenience access to MaterialAttribute::
Enumerators | |
---|---|
Opaque |
Alpha value is ignored and the rendered output is fully opaque. |
Mask |
The rendered output is either fully transparent or fully opaque, depending on the alpha value and specified MaterialData:: |
Blend |
The alpha value is used to combine source and destination colors using additive blending. |
enum class Magnum:: Trade:: MeshAttribute: UnsignedShort new in 2020.06
#include <Magnum/Trade/MeshData.h>
Mesh attribute name.
enum class Magnum:: Trade:: ObjectInstanceType2D: UnsignedByte
#include <Magnum/Trade/ObjectData2D.h>
Type of instance held by given 2D object.
Enumerators | |
---|---|
Camera |
Camera instance (see CameraData) |
Mesh |
Mesh instance. The data can be cast to MeshObjectData2D to provide more information. |
Empty |
Empty |
enum class Magnum:: Trade:: ObjectFlag2D: UnsignedByte
#include <Magnum/Trade/ObjectData2D.h>
2D object flag
Enumerators | |
---|---|
HasTranslationRotationScaling |
The object provides separate translation / rotation / scaling properties. The ObjectData2D:: |
enum class Magnum:: Trade:: ObjectInstanceType3D: UnsignedByte
#include <Magnum/Trade/ObjectData3D.h>
Type of instance held by given 3D object.
Enumerators | |
---|---|
Camera |
Camera instance (see CameraData) |
Light |
Light instance (see LightData) |
Mesh |
Mesh instance. The data can be cast to MeshObjectData3D to provide more information. |
Empty |
Empty |
enum class Magnum:: Trade:: ObjectFlag3D: UnsignedByte
#include <Magnum/Trade/ObjectData3D.h>
3D object flag
Enumerators | |
---|---|
HasTranslationRotationScaling |
The object provides separate translation / rotation / scaling properties. The ObjectData3D:: |
Typedef documentation
typedef Containers:: EnumSet<ImageConverterFeature> Magnum:: Trade:: ImageConverterFeatures new in 2020.06
Features supported by an image converter.
typedef Containers:: EnumSet<ImageConverterFlag> Magnum:: Trade:: ImageConverterFlags new in 2020.06
Image converter flags.
typedef Containers:: EnumSet<ImporterFeature> Magnum:: Trade:: ImporterFeatures new in 2020.06
#include <Magnum/Trade/AbstractImporter.h>
Set of features supported by an importer.
typedef InputFileCallbackPolicy Magnum:: Trade:: ImporterFileCallbackPolicy
#include <Magnum/Trade/AbstractImporter.h>
Input file callback policy.
typedef Containers:: EnumSet<ImporterFlag> Magnum:: Trade:: ImporterFlags new in 2020.06
#include <Magnum/Trade/AbstractImporter.h>
Importer flags.
typedef MaterialData Magnum:: Trade:: AbstractMaterialData
Material data.
typedef Containers:: EnumSet<SceneConverterFeature> Magnum:: Trade:: SceneConverterFeatures new in 2020.06
Features supported by a scene converter.
typedef Containers:: EnumSet<SceneConverterFlag> Magnum:: Trade:: SceneConverterFlags new in 2020.06
Scene converter flags.
typedef Containers:: EnumSet<DataFlag> Magnum:: Trade:: DataFlags new in 2020.06
#include <Magnum/Trade/Data.h>
Data flags.
typedef ImageData<1> Magnum:: Trade:: ImageData1D
#include <Magnum/Trade/ImageData.h>
One-dimensional image data.
typedef ImageData<2> Magnum:: Trade:: ImageData2D
#include <Magnum/Trade/ImageData.h>
Two-dimensional image data.
typedef ImageData<3> Magnum:: Trade:: ImageData3D
#include <Magnum/Trade/ImageData.h>
Three-dimensional image data.
typedef Containers:: EnumSet<MaterialType> Magnum:: Trade:: MaterialTypes new in Git master
#include <Magnum/Trade/MaterialData.h>
Material types.
typedef Containers:: EnumSet<ObjectFlag2D> Magnum:: Trade:: ObjectFlags2D
#include <Magnum/Trade/ObjectData2D.h>
2D object flags
typedef Containers:: EnumSet<ObjectFlag3D> Magnum:: Trade:: ObjectFlags3D
#include <Magnum/Trade/ObjectData3D.h>
3D object flags
typedef SkinData<2> Magnum:: Trade:: SkinData2D new in Git master
#include <Magnum/Trade/SkinData.h>
Two-dimensional skin data.
typedef SkinData<3> Magnum:: Trade:: SkinData3D new in Git master
#include <Magnum/Trade/SkinData.h>
Three-dimensional skin data.
Function documentation
Debug& Magnum:: Trade:: operator<<(Debug& debug,
ImageConverterFeature value)
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
ImageConverterFeatures value)
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
ImageConverterFlag value) new in 2020.06
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
ImageConverterFlags value) new in 2020.06
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
ImporterFeature value)
#include <Magnum/Trade/AbstractImporter.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
ImporterFeatures value)
#include <Magnum/Trade/AbstractImporter.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
ImporterFlag value) new in 2020.06
#include <Magnum/Trade/AbstractImporter.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
ImporterFlags value) new in 2020.06
#include <Magnum/Trade/AbstractImporter.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
SceneConverterFeature value)
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
SceneConverterFeatures value)
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
SceneConverterFlag value) new in 2020.06
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
SceneConverterFlags value) new in 2020.06
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
AnimationTrackType value)
#include <Magnum/Trade/AnimationData.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
AnimationTrackTargetType value)
#include <Magnum/Trade/AnimationData.h>
Debug output operator.
#include <Magnum/Trade/AnimationData.h>
template<class V, class R = Animation::ResultOf<V>>
auto Magnum:: Trade:: animationInterpolatorFor(Animation:: Interpolation interpolation)
Animation interpolator function for given interpolation behavior.
To be used from importer plugins — wrapper around Animation::
Debug& Magnum:: Trade:: operator<<(Debug& debug,
CameraType value)
#include <Magnum/Trade/CameraData.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
DataFlag value) new in 2020.06
#include <Magnum/Trade/Data.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
DataFlags value) new in 2020.06
#include <Magnum/Trade/Data.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
LightData:: Type value)
#include <Magnum/Trade/LightData.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
MaterialLayer value) new in Git master
#include <Magnum/Trade/MaterialData.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
MaterialAttribute value) new in Git master
#include <Magnum/Trade/MaterialData.h>
Debug output operator.
UnsignedInt Magnum:: Trade:: materialTextureSwizzleComponentCount(MaterialTextureSwizzle swizzle) new in Git master
#include <Magnum/Trade/MaterialData.h>
Component count in a material texture swizzle.
Returns for example 2
for MaterialTextureSwizzle::
Debug& Magnum:: Trade:: operator<<(Debug& debug,
MaterialTextureSwizzle value) new in Git master
#include <Magnum/Trade/MaterialData.h>
Debug output operator.
std:: size_t Magnum:: Trade:: materialAttributeTypeSize(MaterialAttributeType type) new in Git master
#include <Magnum/Trade/MaterialData.h>
Byte size of a material attribute type.
Can't be used with MaterialAttributeType::
Debug& Magnum:: Trade:: operator<<(Debug& debug,
MaterialAttributeType value) new in Git master
#include <Magnum/Trade/MaterialData.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
MaterialType value)
#include <Magnum/Trade/MaterialData.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
MaterialTypes value)
#include <Magnum/Trade/MaterialData.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
MaterialAlphaMode value)
#include <Magnum/Trade/MaterialData.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
MaterialData:: Flag value)
#include <Magnum/Trade/MaterialData.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
MaterialData:: Flags value)
#include <Magnum/Trade/MaterialData.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
MeshAttribute value) new in 2020.06
#include <Magnum/Trade/MeshData.h>
Debug output operator.
bool Magnum:: Trade:: isMeshAttributeCustom(MeshAttribute name) constexpr new in 2020.06
#include <Magnum/Trade/MeshData.h>
Whether a mesh attribute is custom.
Returns true
if name
has a value larger or equal to MeshAttribute::false
otherwise.
MeshAttribute Magnum:: Trade:: meshAttributeCustom(UnsignedShort id) constexpr new in 2020.06
#include <Magnum/Trade/MeshData.h>
Create a custom mesh attribute.
Returns a custom mesh attribute with index id
. The index is expected to be less than the value of MeshAttribute::
UnsignedShort Magnum:: Trade:: meshAttributeCustom(MeshAttribute name) constexpr new in 2020.06
#include <Magnum/Trade/MeshData.h>
Get index of a custom mesh attribute.
Inverse to meshAttributeCustom(UnsignedShort). Expects that the attribute is custom.
Containers:: Array<MeshAttributeData> Magnum:: Trade:: meshAttributeDataNonOwningArray(Containers:: ArrayView<const MeshAttributeData> view) new in 2020.06
#include <Magnum/Trade/MeshData.h>
Create a non-owning array of MeshAttributeData items.
Useful when you have the attribute definitions statically defined (for example when the vertex data themselves are already defined at compile time) and don't want to allocate just to pass those to MeshData.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
ObjectInstanceType2D value)
#include <Magnum/Trade/ObjectData2D.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
ObjectFlag2D value)
#include <Magnum/Trade/ObjectData2D.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
ObjectFlags2D value)
#include <Magnum/Trade/ObjectData2D.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
ObjectInstanceType3D value)
#include <Magnum/Trade/ObjectData3D.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
ObjectFlag3D value)
#include <Magnum/Trade/ObjectData3D.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
ObjectFlags3D value)
#include <Magnum/Trade/ObjectData3D.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
PhongMaterialData:: Flag value)
#include <Magnum/Trade/PhongMaterialData.h>
Debug output operator.
Debug& Magnum:: Trade:: operator<<(Debug& debug,
TextureData:: Type value)
#include <Magnum/Trade/TextureData.h>
Debug output operator.