Assimp  v4.1. (December 2018)
glTF2 Namespace Reference

Namespaces

 Util
 

Classes

struct  Accessor
 A typed view into a BufferView. More...
 
struct  Animation
 
class  Asset
 Root object for a glTF asset. More...
 
struct  AssetMetadata
 
class  AssetWriter
 
class  AttribType
 Values for the Accessor::type field (helper class) More...
 
struct  Buffer
 A buffer points to binary geometry, animation, or skins. More...
 
struct  BufferView
 A view into a buffer generally representing a subset of the buffer. More...
 
struct  Camera
 
struct  GLB_Chunk
 
struct  GLB_Header
 For binary .glb files 12-byte header (+ the JSON + a "body" data section) More...
 
struct  Image
 Image data used to create a texture. More...
 
class  IOStream
 
class  LazyDict
 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  LazyDictBase
 Base class for LazyDict that acts as an interface. More...
 
struct  Material
 The material appearance of a primitive. More...
 
struct  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  Node
 
struct  NormalTextureInfo
 
struct  Nullable
 Helper struct to represent values that might not be present. More...
 
struct  Object
 Base classe for all glTF top-level objects. More...
 
struct  OcclusionTextureInfo
 
struct  PbrMetallicRoughness
 
struct  PbrSpecularGlossiness
 
struct  Program
 
class  Ref
 A reference to one top-level object, which is valid until the Asset instance is destroyed. More...
 
struct  Sampler
 
struct  Scene
 
struct  Shader
 
struct  Skin
 
struct  Texture
 A texture and its sampler. More...
 
struct  TextureInfo
 

Typedefs

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

Enumerations

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

Functions

unsigned int ComponentTypeSize (ComponentType t)
 
typedef float (mat4)[16]
 
typedef float (vec3)[3]
 
typedef float (vec4)[4]
 
void Write (Value &, Camera &, AssetWriter &)
 
void Write (Value &, Program &, AssetWriter &)
 
void Write (Value &, Shader &, AssetWriter &)
 
void Write (Value &obj, Accessor &a, AssetWriter &w)
 
void Write (Value &obj, Animation &a, AssetWriter &w)
 
void Write (Value &obj, Buffer &b, AssetWriter &w)
 
void Write (Value &obj, BufferView &bv, AssetWriter &w)
 
void Write (Value &obj, Image &img, AssetWriter &w)
 
void Write (Value &obj, Material &m, AssetWriter &w)
 
void Write (Value &obj, Mesh &m, AssetWriter &w)
 
void Write (Value &obj, Node &n, AssetWriter &w)
 
void Write (Value &obj, Sampler &b, AssetWriter &w)
 
void Write (Value &obj, Skin &b, AssetWriter &w)
 
void Write (Value &obj, Texture &tex, AssetWriter &w)
 
void Write (Value &scene, Scene &s, AssetWriter &w)
 
template<class T >
void WriteLazyDict (LazyDict< T > &d, AssetWriter &w)
 (Implemented in glTFAssetWriter.h) More...
 

Variables

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

Typedef Documentation

◆ DeadlyExportError

typedef std::runtime_error glTF2::DeadlyExportError

◆ DeadlyImportError

typedef std::runtime_error glTF2::DeadlyImportError

Enumeration Type Documentation

◆ aiOrigin

Enumerator
aiOrigin_SET 
aiOrigin_CUR 
aiOrigin_END 

◆ BufferViewTarget

Values for the BufferView::target field.

Enumerator
BufferViewTarget_ARRAY_BUFFER 
BufferViewTarget_ELEMENT_ARRAY_BUFFER 

◆ ChunkType

Values for the GLB_Chunk::chunkType field.

Enumerator
ChunkType_JSON 
ChunkType_BIN 

◆ ComponentType

Values for the Accessor::componentType field.

Enumerator
ComponentType_BYTE 
ComponentType_UNSIGNED_BYTE 
ComponentType_SHORT 
ComponentType_UNSIGNED_SHORT 
ComponentType_UNSIGNED_INT 
ComponentType_FLOAT 

◆ PrimitiveMode

Values for the mesh primitive modes.

Enumerator
PrimitiveMode_POINTS 
PrimitiveMode_LINES 
PrimitiveMode_LINE_LOOP 
PrimitiveMode_LINE_STRIP 
PrimitiveMode_TRIANGLES 
PrimitiveMode_TRIANGLE_STRIP 
PrimitiveMode_TRIANGLE_FAN 

◆ SamplerMagFilter

enum glTF2::SamplerMagFilter : unsigned int
strong

Values for the Sampler::magFilter field.

Enumerator
UNSET 
SamplerMagFilter_Nearest 
SamplerMagFilter_Linear 

◆ SamplerMinFilter

enum glTF2::SamplerMinFilter : unsigned int
strong

Values for the Sampler::minFilter field.

Enumerator
UNSET 
SamplerMinFilter_Nearest 
SamplerMinFilter_Linear 
SamplerMinFilter_Nearest_Mipmap_Nearest 
SamplerMinFilter_Linear_Mipmap_Nearest 
SamplerMinFilter_Nearest_Mipmap_Linear 
SamplerMinFilter_Linear_Mipmap_Linear 

◆ SamplerWrap

enum glTF2::SamplerWrap : unsigned int
strong

Values for the Sampler::wrapS and Sampler::wrapT field.

Enumerator
UNSET 
Clamp_To_Edge 
Mirrored_Repeat 
Repeat 

◆ TextureFormat

Values for the Texture::format and Texture::internalFormat fields.

Enumerator
TextureFormat_ALPHA 
TextureFormat_RGB 
TextureFormat_RGBA 
TextureFormat_LUMINANCE 
TextureFormat_LUMINANCE_ALPHA 

◆ TextureTarget

Values for the Texture::target field.

Enumerator
TextureTarget_TEXTURE_2D 

◆ TextureType

Values for the Texture::type field.

Enumerator
TextureType_UNSIGNED_BYTE 
TextureType_UNSIGNED_SHORT_5_6_5 
TextureType_UNSIGNED_SHORT_4_4_4_4 
TextureType_UNSIGNED_SHORT_5_5_5_1 

Function Documentation

◆ ComponentTypeSize()

unsigned int glTF2::ComponentTypeSize ( ComponentType  t)
inline

◆ float() [1/3]

typedef glTF2::float ( mat4  )

◆ float() [2/3]

typedef glTF2::float ( vec3  )

◆ float() [3/3]

typedef glTF2::float ( vec4  )

◆ Write() [1/15]

void glTF2::Write ( Value ,
Camera ,
AssetWriter  
)
inline

◆ Write() [2/15]

void glTF2::Write ( Value ,
Program ,
AssetWriter  
)
inline

◆ Write() [3/15]

void glTF2::Write ( Value ,
Shader ,
AssetWriter  
)
inline

◆ Write() [4/15]

void glTF2::Write ( Value obj,
Accessor a,
AssetWriter w 
)
inline

◆ Write() [5/15]

void glTF2::Write ( Value obj,
Animation a,
AssetWriter w 
)
inline

◆ Write() [6/15]

void glTF2::Write ( Value obj,
Buffer b,
AssetWriter w 
)
inline

◆ Write() [7/15]

void glTF2::Write ( Value obj,
BufferView bv,
AssetWriter w 
)
inline

◆ Write() [8/15]

void glTF2::Write ( Value obj,
Image img,
AssetWriter w 
)
inline

◆ Write() [9/15]

void glTF2::Write ( Value obj,
Material m,
AssetWriter w 
)
inline

◆ Write() [10/15]

void glTF2::Write ( Value obj,
Mesh m,
AssetWriter w 
)
inline

◆ Write() [11/15]

void glTF2::Write ( Value obj,
Node n,
AssetWriter w 
)
inline

◆ Write() [12/15]

void glTF2::Write ( Value obj,
Sampler b,
AssetWriter w 
)
inline

◆ Write() [13/15]

void glTF2::Write ( Value obj,
Skin b,
AssetWriter w 
)
inline

◆ Write() [14/15]

void glTF2::Write ( Value obj,
Texture tex,
AssetWriter w 
)
inline

◆ Write() [15/15]

void glTF2::Write ( Value scene,
Scene s,
AssetWriter w 
)
inline

◆ WriteLazyDict()

template<class T >
void glTF2::WriteLazyDict ( LazyDict< T > &  d,
AssetWriter w 
)

(Implemented in glTFAssetWriter.h)

Variable Documentation

◆ defaultBaseColor

const vec4 glTF2::defaultBaseColor = {1, 1, 1, 1}

◆ defaultDiffuseFactor

const vec4 glTF2::defaultDiffuseFactor = {1, 1, 1, 1}

◆ defaultEmissiveFactor

const vec3 glTF2::defaultEmissiveFactor = {0, 0, 0}

◆ defaultSpecularFactor

const vec3 glTF2::defaultSpecularFactor = {1, 1, 1}

◆ PACK_STRUCT

struct glTF2::GLB_Chunk glTF2::PACK_STRUCT