Assimp  v4.1. (December 2018)
glTF2Asset.h File Reference

Classes

struct  glTF2::Accessor
 A typed view into a BufferView. More...
 
class  glTF2::Accessor::Indexer
 Helper class to iterate the data. More...
 
struct  glTF2::Animation
 
struct  glTF2::Animation::AnimChannel
 
struct  glTF2::Animation::AnimChannel::AnimTarget
 
struct  glTF2::Animation::AnimParameters
 
struct  glTF2::Animation::AnimSampler
 
class  glTF2::Asset
 Root object for a glTF asset. More...
 
struct  glTF2::Asset::Extensions
 Keeps info about the enabled extensions. More...
 
struct  glTF2::AssetMetadata
 
class  glTF2::AttribType
 Values for the Accessor::type field (helper class) More...
 
struct  glTF2::Buffer
 A buffer points to binary geometry, animation, or skins. More...
 
struct  glTF2::Buffer::SEncodedRegion
 Descriptor of encoded region in "bufferView". More...
 
struct  glTF2::BufferView
 A view into a buffer generally representing a subset of the buffer. More...
 
struct  glTF2::Camera
 
struct  glTF2::GLB_Chunk
 
struct  glTF2::GLB_Header
 For binary .glb files 12-byte header (+ the JSON + a "body" data section) More...
 
struct  glTF2::Image
 Image data used to create a texture. More...
 
class  glTF2::IOStream
 
class  glTF2::LazyDict< T >
 Manages lazy loading of the glTF top-level objects, and keeps a reference to them by ID It is the owner the loaded objects, so when it is destroyed it also deletes them. More...
 
class  glTF2::LazyDictBase
 Base class for LazyDict that acts as an interface. More...
 
struct  glTF2::Material
 The material appearance of a primitive. More...
 
struct  glTF2::Mesh
 A set of primitives to be rendered. A node can contain one or more meshes. A node's transform places the mesh in the scene. More...
 
struct  glTF2::Mesh::Primitive
 
struct  glTF2::Mesh::Primitive::Attributes
 
struct  glTF2::Node
 
struct  glTF2::NormalTextureInfo
 
struct  glTF2::Nullable< T >
 Helper struct to represent values that might not be present. More...
 
struct  glTF2::Object
 Base classe for all glTF top-level objects. More...
 
struct  glTF2::OcclusionTextureInfo
 
struct  glTF2::PbrMetallicRoughness
 
struct  glTF2::PbrSpecularGlossiness
 
struct  glTF2::Program
 
class  glTF2::Ref< T >
 A reference to one top-level object, which is valid until the Asset instance is destroyed. More...
 
struct  glTF2::Sampler
 
struct  glTF2::Scene
 
struct  glTF2::Shader
 
struct  glTF2::Skin
 
struct  glTF2::Texture
 A texture and its sampler. More...
 
struct  glTF2::TextureInfo
 
struct  glTF2::Util::DataURI
 

Namespaces

 glTF2
 
 glTF2::Util
 

Macros

#define _AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE   "$tex.mappingfiltermag"
 
#define _AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE   "$tex.mappingfiltermin"
 
#define _AI_MATKEY_GLTF_MAPPINGID_BASE   "$tex.mappingid"
 
#define _AI_MATKEY_GLTF_MAPPINGNAME_BASE   "$tex.mappingname"
 
#define _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE   "$tex.file.texCoord"
 
#define ai_assert
 
#define AI_GLB_MAGIC_NUMBER   "glTF"
 Magic number for GLB files. More...
 
#define AI_MATKEY_GLTF_ALPHACUTOFF   "$mat.gltf.alphaCutoff", 0, 0
 
#define AI_MATKEY_GLTF_ALPHAMODE   "$mat.gltf.alphaMode", 0, 0
 
#define AI_MATKEY_GLTF_MAPPINGFILTER_MAG(type, N)   _AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE, type, N
 
#define AI_MATKEY_GLTF_MAPPINGFILTER_MIN(type, N)   _AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE, type, N
 
#define AI_MATKEY_GLTF_MAPPINGID(type, N)   _AI_MATKEY_GLTF_MAPPINGID_BASE, type, N
 
#define AI_MATKEY_GLTF_MAPPINGNAME(type, N)   _AI_MATKEY_GLTF_MAPPINGNAME_BASE, type, N
 
#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR   "$mat.gltf.pbrMetallicRoughness.baseColorFactor", 0, 0
 
#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE   aiTextureType_DIFFUSE, 1
 
#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR   "$mat.gltf.pbrMetallicRoughness.metallicFactor", 0, 0
 
#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLICROUGHNESS_TEXTURE   aiTextureType_UNKNOWN, 0
 
#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR   "$mat.gltf.pbrMetallicRoughness.roughnessFactor", 0, 0
 
#define AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS   "$mat.gltf.pbrSpecularGlossiness", 0, 0
 
#define AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR   "$mat.gltf.pbrMetallicRoughness.glossinessFactor", 0, 0
 
#define AI_MATKEY_GLTF_TEXTURE_TEXCOORD   _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE, type, N
 
#define AI_SWAP4(p)
 
#define gltf_unordered_map   map
 
#define RAPIDJSON_HAS_STDSTRING   1
 

Typedefs

typedef std::runtime_error glTF2::DeadlyExportError
 
typedef std::runtime_error glTF2::DeadlyImportError
 

Enumerations

enum  glTF2::aiOrigin { glTF2::aiOrigin_SET = 0, glTF2::aiOrigin_CUR = 1, glTF2::aiOrigin_END = 2 }
 
enum  glTF2::BufferViewTarget { glTF2::BufferViewTarget_ARRAY_BUFFER = 34962, glTF2::BufferViewTarget_ELEMENT_ARRAY_BUFFER = 34963 }
 Values for the BufferView::target field. More...
 
enum  glTF2::ChunkType { glTF2::ChunkType_JSON = 0x4E4F534A, glTF2::ChunkType_BIN = 0x004E4942 }
 Values for the GLB_Chunk::chunkType field. More...
 
enum  glTF2::ComponentType {
  glTF2::ComponentType_BYTE = 5120, glTF2::ComponentType_UNSIGNED_BYTE = 5121, glTF2::ComponentType_SHORT = 5122, glTF2::ComponentType_UNSIGNED_SHORT = 5123,
  glTF2::ComponentType_UNSIGNED_INT = 5125, glTF2::ComponentType_FLOAT = 5126
}
 Values for the Accessor::componentType field. More...
 
enum  glTF2::PrimitiveMode {
  glTF2::PrimitiveMode_POINTS = 0, glTF2::PrimitiveMode_LINES = 1, glTF2::PrimitiveMode_LINE_LOOP = 2, glTF2::PrimitiveMode_LINE_STRIP = 3,
  glTF2::PrimitiveMode_TRIANGLES = 4, glTF2::PrimitiveMode_TRIANGLE_STRIP = 5, glTF2::PrimitiveMode_TRIANGLE_FAN = 6
}
 Values for the mesh primitive modes. More...
 
enum  glTF2::SamplerMagFilter : unsigned int { glTF2::SamplerMagFilter::UNSET = 0, glTF2::SamplerMagFilter::SamplerMagFilter_Nearest = 9728, glTF2::SamplerMagFilter::SamplerMagFilter_Linear = 9729 }
 Values for the Sampler::magFilter field. More...
 
enum  glTF2::SamplerMinFilter : unsigned int {
  glTF2::SamplerMinFilter::UNSET = 0, glTF2::SamplerMinFilter::SamplerMinFilter_Nearest = 9728, glTF2::SamplerMinFilter::SamplerMinFilter_Linear = 9729, glTF2::SamplerMinFilter::SamplerMinFilter_Nearest_Mipmap_Nearest = 9984,
  glTF2::SamplerMinFilter::SamplerMinFilter_Linear_Mipmap_Nearest = 9985, glTF2::SamplerMinFilter::SamplerMinFilter_Nearest_Mipmap_Linear = 9986, glTF2::SamplerMinFilter::SamplerMinFilter_Linear_Mipmap_Linear = 9987
}
 Values for the Sampler::minFilter field. More...
 
enum  glTF2::SamplerWrap : unsigned int { glTF2::SamplerWrap::UNSET = 0, glTF2::SamplerWrap::Clamp_To_Edge = 33071, glTF2::SamplerWrap::Mirrored_Repeat = 33648, glTF2::SamplerWrap::Repeat = 10497 }
 Values for the Sampler::wrapS and Sampler::wrapT field. More...
 
enum  glTF2::TextureFormat {
  glTF2::TextureFormat_ALPHA = 6406, glTF2::TextureFormat_RGB = 6407, glTF2::TextureFormat_RGBA = 6408, glTF2::TextureFormat_LUMINANCE = 6409,
  glTF2::TextureFormat_LUMINANCE_ALPHA = 6410
}
 Values for the Texture::format and Texture::internalFormat fields. More...
 
enum  glTF2::TextureTarget { glTF2::TextureTarget_TEXTURE_2D = 3553 }
 Values for the Texture::target field. More...
 
enum  glTF2::TextureType { glTF2::TextureType_UNSIGNED_BYTE = 5121, glTF2::TextureType_UNSIGNED_SHORT_5_6_5 = 33635, glTF2::TextureType_UNSIGNED_SHORT_4_4_4_4 = 32819, glTF2::TextureType_UNSIGNED_SHORT_5_5_5_1 = 32820 }
 Values for the Texture::type field. More...
 

Functions

unsigned int glTF2::ComponentTypeSize (ComponentType t)
 
size_t glTF2::Util::DecodeBase64 (const char *in, size_t inLength, uint8_t *&out)
 
size_t glTF2::Util::DecodeBase64 (const char *in, uint8_t *&out)
 
void glTF2::Util::EncodeBase64 (const uint8_t *in, size_t inLength, std::string &out)
 
typedef glTF2::float (mat4)[16]
 
typedef glTF2::float (vec3)[3]
 
typedef glTF2::float (vec4)[4]
 
bool glTF2::Util::ParseDataURI (const char *uri, size_t uriLen, DataURI &out)
 Check if a uri is a data URI. More...
 
template<class T >
void glTF2::WriteLazyDict (LazyDict< T > &d, AssetWriter &w)
 (Implemented in glTFAssetWriter.h) More...
 

Variables

const vec4 glTF2::defaultBaseColor = {1, 1, 1, 1}
 
const vec4 glTF2::defaultDiffuseFactor = {1, 1, 1, 1}
 
const vec3 glTF2::defaultEmissiveFactor = {0, 0, 0}
 
const vec3 glTF2::defaultSpecularFactor = {1, 1, 1}
 
struct glTF2::GLB_Header glTF2::PACK_STRUCT
 

Macro Definition Documentation

◆ _AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE

#define _AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE   "$tex.mappingfiltermag"

◆ _AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE

#define _AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE   "$tex.mappingfiltermin"

◆ _AI_MATKEY_GLTF_MAPPINGID_BASE

#define _AI_MATKEY_GLTF_MAPPINGID_BASE   "$tex.mappingid"

◆ _AI_MATKEY_GLTF_MAPPINGNAME_BASE

#define _AI_MATKEY_GLTF_MAPPINGNAME_BASE   "$tex.mappingname"

◆ _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE

#define _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE   "$tex.file.texCoord"

◆ ai_assert

#define ai_assert

◆ AI_GLB_MAGIC_NUMBER

#define AI_GLB_MAGIC_NUMBER   "glTF"

Magic number for GLB files.

◆ AI_MATKEY_GLTF_ALPHACUTOFF

#define AI_MATKEY_GLTF_ALPHACUTOFF   "$mat.gltf.alphaCutoff", 0, 0

◆ AI_MATKEY_GLTF_ALPHAMODE

#define AI_MATKEY_GLTF_ALPHAMODE   "$mat.gltf.alphaMode", 0, 0

◆ AI_MATKEY_GLTF_MAPPINGFILTER_MAG

#define AI_MATKEY_GLTF_MAPPINGFILTER_MAG (   type,
  N 
)    _AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE, type, N

◆ AI_MATKEY_GLTF_MAPPINGFILTER_MIN

#define AI_MATKEY_GLTF_MAPPINGFILTER_MIN (   type,
  N 
)    _AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE, type, N

◆ AI_MATKEY_GLTF_MAPPINGID

#define AI_MATKEY_GLTF_MAPPINGID (   type,
  N 
)    _AI_MATKEY_GLTF_MAPPINGID_BASE, type, N

◆ AI_MATKEY_GLTF_MAPPINGNAME

#define AI_MATKEY_GLTF_MAPPINGNAME (   type,
  N 
)    _AI_MATKEY_GLTF_MAPPINGNAME_BASE, type, N

◆ AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR

#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR   "$mat.gltf.pbrMetallicRoughness.baseColorFactor", 0, 0

◆ AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE

#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE   aiTextureType_DIFFUSE, 1

◆ AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR

#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR   "$mat.gltf.pbrMetallicRoughness.metallicFactor", 0, 0

◆ AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLICROUGHNESS_TEXTURE

#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLICROUGHNESS_TEXTURE   aiTextureType_UNKNOWN, 0

◆ AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR

#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR   "$mat.gltf.pbrMetallicRoughness.roughnessFactor", 0, 0

◆ AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS

#define AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS   "$mat.gltf.pbrSpecularGlossiness", 0, 0

◆ AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR

#define AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR   "$mat.gltf.pbrMetallicRoughness.glossinessFactor", 0, 0

◆ AI_MATKEY_GLTF_TEXTURE_TEXCOORD

#define AI_MATKEY_GLTF_TEXTURE_TEXCOORD   _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE, type, N

◆ AI_SWAP4

#define AI_SWAP4 (   p)

◆ gltf_unordered_map

#define gltf_unordered_map   map

◆ RAPIDJSON_HAS_STDSTRING

#define RAPIDJSON_HAS_STDSTRING   1