Assimp  v4.1. (December 2018)
glTF2Importer.cpp File Reference

Classes

struct  AnimationSamplers
 

Functions

static void BuildVertexWeightMapping (Mesh::Primitive &primitive, std::vector< std::vector< aiVertexWeight >> &map)
 
static aiTextureMapMode ConvertWrappingMode (SamplerWrap gltfWrapMode)
 
aiNodeAnimCreateNodeAnim (glTF2::Asset &r, Node &node, AnimationSamplers &samplers)
 
std::unordered_map< unsigned int, AnimationSamplersGatherSamplers (Animation &anim)
 
static std::string GetNodeName (const Node &node)
 
static void GetNodeTransform (aiMatrix4x4 &matrix, const glTF2::Node &node)
 
static aiMaterialImportMaterial (std::vector< int > &embeddedTexIdxs, Asset &r, Material &mat)
 
aiNodeImportNode (aiScene *pScene, glTF2::Asset &r, std::vector< unsigned int > &meshOffsets, glTF2::Ref< glTF2::Node > &ptr)
 
static void SetFace (aiFace &face, int a)
 
static void SetFace (aiFace &face, int a, int b)
 
static void SetFace (aiFace &face, int a, int b, int c)
 
void SetMaterialColorProperty (Asset &, vec3 &prop, aiMaterial *mat, const char *pKey, unsigned int type, unsigned int idx)
 
void SetMaterialColorProperty (Asset &, vec4 &prop, aiMaterial *mat, const char *pKey, unsigned int type, unsigned int idx)
 
void SetMaterialTextureProperty (std::vector< int > &embeddedTexIdxs, Asset &, glTF2::TextureInfo prop, aiMaterial *mat, aiTextureType texType, unsigned int texSlot=0)
 
void SetMaterialTextureProperty (std::vector< int > &embeddedTexIdxs, Asset &r, glTF2::NormalTextureInfo &prop, aiMaterial *mat, aiTextureType texType, unsigned int texSlot=0)
 
void SetMaterialTextureProperty (std::vector< int > &embeddedTexIdxs, Asset &r, glTF2::OcclusionTextureInfo &prop, aiMaterial *mat, aiTextureType texType, unsigned int texSlot=0)
 

Variables

static const aiImporterDesc desc
 

Function Documentation

◆ BuildVertexWeightMapping()

static void BuildVertexWeightMapping ( Mesh::Primitive &  primitive,
std::vector< std::vector< aiVertexWeight >> &  map 
)
static

◆ ConvertWrappingMode()

static aiTextureMapMode ConvertWrappingMode ( SamplerWrap  gltfWrapMode)
static

◆ CreateNodeAnim()

aiNodeAnim* CreateNodeAnim ( glTF2::Asset r,
Node node,
AnimationSamplers samplers 
)

◆ GatherSamplers()

std::unordered_map<unsigned int, AnimationSamplers> GatherSamplers ( Animation anim)

◆ GetNodeName()

static std::string GetNodeName ( const Node node)
static

◆ GetNodeTransform()

static void GetNodeTransform ( aiMatrix4x4 matrix,
const glTF2::Node node 
)
static

◆ ImportMaterial()

static aiMaterial* ImportMaterial ( std::vector< int > &  embeddedTexIdxs,
Asset r,
Material mat 
)
static

◆ ImportNode()

aiNode* ImportNode ( aiScene pScene,
glTF2::Asset r,
std::vector< unsigned int > &  meshOffsets,
glTF2::Ref< glTF2::Node > &  ptr 
)

◆ SetFace() [1/3]

static void SetFace ( aiFace face,
int  a 
)
inlinestatic

◆ SetFace() [2/3]

static void SetFace ( aiFace face,
int  a,
int  b 
)
inlinestatic

◆ SetFace() [3/3]

static void SetFace ( aiFace face,
int  a,
int  b,
int  c 
)
inlinestatic

◆ SetMaterialColorProperty() [1/2]

void SetMaterialColorProperty ( Asset ,
vec3 &  prop,
aiMaterial mat,
const char *  pKey,
unsigned int  type,
unsigned int  idx 
)
inline

◆ SetMaterialColorProperty() [2/2]

void SetMaterialColorProperty ( Asset ,
vec4 &  prop,
aiMaterial mat,
const char *  pKey,
unsigned int  type,
unsigned int  idx 
)
inline

◆ SetMaterialTextureProperty() [1/3]

void SetMaterialTextureProperty ( std::vector< int > &  embeddedTexIdxs,
Asset ,
glTF2::TextureInfo  prop,
aiMaterial mat,
aiTextureType  texType,
unsigned int  texSlot = 0 
)
inline

◆ SetMaterialTextureProperty() [2/3]

void SetMaterialTextureProperty ( std::vector< int > &  embeddedTexIdxs,
Asset r,
glTF2::NormalTextureInfo prop,
aiMaterial mat,
aiTextureType  texType,
unsigned int  texSlot = 0 
)
inline

◆ SetMaterialTextureProperty() [3/3]

void SetMaterialTextureProperty ( std::vector< int > &  embeddedTexIdxs,
Asset r,
glTF2::OcclusionTextureInfo prop,
aiMaterial mat,
aiTextureType  texType,
unsigned int  texSlot = 0 
)
inline

Variable Documentation

◆ desc

const aiImporterDesc desc
static
aiImporterFlags_LimitedSupport
Indicates that the importer reads only a very particular subset of the file format.
Definition: importerdesc.h:72
aiImporterFlags_Experimental
Indicates that the importer is highly experimental and should be used with care.
Definition: importerdesc.h:78
aiImporterFlags_SupportTextFlavour
Indicates that there is a textual encoding of the file format; and that it is supported.
Definition: importerdesc.h:58
aiImporterFlags_SupportBinaryFlavour
Indicates that there is a binary encoding of the file format; and that it is supported.
Definition: importerdesc.h:62