HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GLTF_NAMESPACE::GLTF_Loader Class Reference

#include <GLTF_Loader.h>

Public Member Functions

 GLTF_Loader ()
 
 GLTF_Loader (UT_String filename)
 
virtual ~GLTF_Loader ()
 
 GLTF_Loader (GLTF_Loader &loader)=delete
 
 GLTF_Loader (const GLTF_Loader &loader)=delete
 
bool Load ()
 
bool LoadAccessorData (const GLTF_Accessor &accessor, unsigned char *&data) const
 
GLTF_AccessorcreateAccessor (GLTF_Handle &idx)
 
GLTF_AnimationcreateAnimation (GLTF_Handle &idx)
 
GLTF_BuffercreateBuffer (GLTF_Handle &idx)
 
GLTF_BufferViewcreateBufferView (GLTF_Handle &idx)
 
GLTF_CameracreateCamera (GLTF_Handle &idx)
 
GLTF_ImagecreateImage (GLTF_Handle &idx)
 
GLTF_MaterialcreateMaterial (GLTF_Handle &idx)
 
GLTF_MeshcreateMesh (GLTF_Handle &idx)
 
GLTF_NodecreateNode (GLTF_Handle &idx)
 
GLTF_SamplercreateSampler (GLTF_Handle &idx)
 
GLTF_ScenecreateScene (GLTF_Handle &idx)
 
GLTF_SkincreateSkin (GLTF_Handle &idx)
 
GLTF_TexturecreateTexture (GLTF_Handle &idx)
 
GLTF_Accessor constgetAccessor (GLTF_Handle idx) const
 
GLTF_Animation constgetAnimation (GLTF_Handle idx) const
 
GLTF_Asset getAsset () const
 
GLTF_Buffer constgetBuffer (GLTF_Handle idx) const
 
GLTF_BufferView constgetBufferView (GLTF_Handle idx) const
 
GLTF_Camera constgetCamera (GLTF_Handle idx) const
 
GLTF_Image constgetImage (GLTF_Handle idx) const
 
GLTF_Material constgetMaterial (GLTF_Handle idx) const
 
GLTF_Mesh constgetMesh (GLTF_Handle idx) const
 
GLTF_Node constgetNode (GLTF_Handle idx) const
 
GLTF_Sampler constgetSampler (GLTF_Handle idx) const
 
GLTF_Handle getDefaultScene () const
 
GLTF_Scene constgetScene (GLTF_Handle idx) const
 
GLTF_Skin constgetSkin (GLTF_Handle idx) const
 
GLTF_Texture constgetTexture (GLTF_Handle idx) const
 
GLTF_AccessorgetAccessor (GLTF_Handle idx)
 
GLTF_AnimationgetAnimation (GLTF_Handle idx)
 
GLTF_BuffergetBuffer (GLTF_Handle idx)
 
GLTF_BufferViewgetBufferView (GLTF_Handle idx)
 
GLTF_CameragetCamera (GLTF_Handle idx)
 
GLTF_ImagegetImage (GLTF_Handle idx)
 
GLTF_MaterialgetMaterial (GLTF_Handle idx)
 
GLTF_MeshgetMesh (GLTF_Handle idx)
 
GLTF_NodegetNode (GLTF_Handle idx)
 
GLTF_SamplergetSampler (GLTF_Handle idx)
 
GLTF_ScenegetScene (GLTF_Handle idx)
 
GLTF_SkingetSkin (GLTF_Handle idx)
 
GLTF_TexturegetTexture (GLTF_Handle idx)
 
const UT_Array< GLTF_Accessor * > & getAccessors () const
 
const UT_Array< GLTF_Animation * > & getAnimations () const
 
const UT_Array< GLTF_Buffer * > & getBuffers () const
 
const UT_Array
< GLTF_BufferView * > & 
getBufferViews () const
 
const UT_Array< GLTF_Camera * > & getCameras () const
 
const UT_Array< GLTF_Image * > & getImages () const
 
const UT_Array< GLTF_Material * > & getMaterials () const
 
const UT_Array< GLTF_Mesh * > & getMeshes () const
 
const UT_Array< GLTF_Node * > & getNodes () const
 
const UT_Array< GLTF_Sampler * > & getSamplers () const
 
const UT_Array< GLTF_Scene * > & getScenes () const
 
const UT_Array< GLTF_Skin * > & getSkins () const
 
const UT_Array< GLTF_Texture * > & getTextures () const
 
void removeBuffer (GLTF_Handle idx)
 
void removeNode (GLTF_Handle idx)
 
void setDefaultScene (const GLTF_Handle &idx)
 
void setAsset (const GLTF_Asset &asset)
 
exint getNumAccessors () const
 
exint getNumAnimations () const
 
exint getNumBuffers () const
 
exint getNumBufferViews () const
 
exint getNumCameras () const
 
exint getNumImages () const
 
exint getNumMaterials () const
 
exint getNumMeshes () const
 
exint getNumNodes () const
 
exint getNumSamplers () const
 
exint getNumScenes () const
 
exint getNumSkins () const
 
exint getNumTextures () const
 

Detailed Description

A class for loading a GLTF file into a more usuable structure.

Definition at line 50 of file GLTF_Loader.h.

Constructor & Destructor Documentation

GLTF_NAMESPACE::GLTF_Loader::GLTF_Loader ( )
GLTF_NAMESPACE::GLTF_Loader::GLTF_Loader ( UT_String  filename)
virtual GLTF_NAMESPACE::GLTF_Loader::~GLTF_Loader ( )
virtual
GLTF_NAMESPACE::GLTF_Loader::GLTF_Loader ( GLTF_Loader loader)
delete
GLTF_NAMESPACE::GLTF_Loader::GLTF_Loader ( const GLTF_Loader loader)
delete

Member Function Documentation

GLTF_Accessor* GLTF_NAMESPACE::GLTF_Loader::createAccessor ( GLTF_Handle idx)
GLTF_Animation* GLTF_NAMESPACE::GLTF_Loader::createAnimation ( GLTF_Handle idx)
GLTF_Buffer* GLTF_NAMESPACE::GLTF_Loader::createBuffer ( GLTF_Handle idx)
GLTF_BufferView* GLTF_NAMESPACE::GLTF_Loader::createBufferView ( GLTF_Handle idx)
GLTF_Camera* GLTF_NAMESPACE::GLTF_Loader::createCamera ( GLTF_Handle idx)
GLTF_Image* GLTF_NAMESPACE::GLTF_Loader::createImage ( GLTF_Handle idx)
GLTF_Material* GLTF_NAMESPACE::GLTF_Loader::createMaterial ( GLTF_Handle idx)
GLTF_Mesh* GLTF_NAMESPACE::GLTF_Loader::createMesh ( GLTF_Handle idx)
GLTF_Node* GLTF_NAMESPACE::GLTF_Loader::createNode ( GLTF_Handle idx)
GLTF_Sampler* GLTF_NAMESPACE::GLTF_Loader::createSampler ( GLTF_Handle idx)
GLTF_Scene* GLTF_NAMESPACE::GLTF_Loader::createScene ( GLTF_Handle idx)
GLTF_Skin* GLTF_NAMESPACE::GLTF_Loader::createSkin ( GLTF_Handle idx)
GLTF_Texture* GLTF_NAMESPACE::GLTF_Loader::createTexture ( GLTF_Handle idx)
GLTF_Accessor const* GLTF_NAMESPACE::GLTF_Loader::getAccessor ( GLTF_Handle  idx) const
GLTF_Accessor* GLTF_NAMESPACE::GLTF_Loader::getAccessor ( GLTF_Handle  idx)
const UT_Array<GLTF_Accessor *>& GLTF_NAMESPACE::GLTF_Loader::getAccessors ( ) const
GLTF_Animation const* GLTF_NAMESPACE::GLTF_Loader::getAnimation ( GLTF_Handle  idx) const
GLTF_Animation* GLTF_NAMESPACE::GLTF_Loader::getAnimation ( GLTF_Handle  idx)
const UT_Array<GLTF_Animation *>& GLTF_NAMESPACE::GLTF_Loader::getAnimations ( ) const
GLTF_Asset GLTF_NAMESPACE::GLTF_Loader::getAsset ( ) const
GLTF_Buffer const* GLTF_NAMESPACE::GLTF_Loader::getBuffer ( GLTF_Handle  idx) const
GLTF_Buffer* GLTF_NAMESPACE::GLTF_Loader::getBuffer ( GLTF_Handle  idx)
const UT_Array<GLTF_Buffer *>& GLTF_NAMESPACE::GLTF_Loader::getBuffers ( ) const
GLTF_BufferView const* GLTF_NAMESPACE::GLTF_Loader::getBufferView ( GLTF_Handle  idx) const
GLTF_BufferView* GLTF_NAMESPACE::GLTF_Loader::getBufferView ( GLTF_Handle  idx)
const UT_Array<GLTF_BufferView *>& GLTF_NAMESPACE::GLTF_Loader::getBufferViews ( ) const
GLTF_Camera const* GLTF_NAMESPACE::GLTF_Loader::getCamera ( GLTF_Handle  idx) const
GLTF_Camera* GLTF_NAMESPACE::GLTF_Loader::getCamera ( GLTF_Handle  idx)
const UT_Array<GLTF_Camera *>& GLTF_NAMESPACE::GLTF_Loader::getCameras ( ) const
GLTF_Handle GLTF_NAMESPACE::GLTF_Loader::getDefaultScene ( ) const
GLTF_Image const* GLTF_NAMESPACE::GLTF_Loader::getImage ( GLTF_Handle  idx) const
GLTF_Image* GLTF_NAMESPACE::GLTF_Loader::getImage ( GLTF_Handle  idx)
const UT_Array<GLTF_Image *>& GLTF_NAMESPACE::GLTF_Loader::getImages ( ) const
GLTF_Material const* GLTF_NAMESPACE::GLTF_Loader::getMaterial ( GLTF_Handle  idx) const
GLTF_Material* GLTF_NAMESPACE::GLTF_Loader::getMaterial ( GLTF_Handle  idx)
const UT_Array<GLTF_Material *>& GLTF_NAMESPACE::GLTF_Loader::getMaterials ( ) const
GLTF_Mesh const* GLTF_NAMESPACE::GLTF_Loader::getMesh ( GLTF_Handle  idx) const
GLTF_Mesh* GLTF_NAMESPACE::GLTF_Loader::getMesh ( GLTF_Handle  idx)
const UT_Array<GLTF_Mesh *>& GLTF_NAMESPACE::GLTF_Loader::getMeshes ( ) const
GLTF_Node const* GLTF_NAMESPACE::GLTF_Loader::getNode ( GLTF_Handle  idx) const
GLTF_Node* GLTF_NAMESPACE::GLTF_Loader::getNode ( GLTF_Handle  idx)
const UT_Array<GLTF_Node *>& GLTF_NAMESPACE::GLTF_Loader::getNodes ( ) const
exint GLTF_NAMESPACE::GLTF_Loader::getNumAccessors ( ) const
exint GLTF_NAMESPACE::GLTF_Loader::getNumAnimations ( ) const
exint GLTF_NAMESPACE::GLTF_Loader::getNumBuffers ( ) const
exint GLTF_NAMESPACE::GLTF_Loader::getNumBufferViews ( ) const
exint GLTF_NAMESPACE::GLTF_Loader::getNumCameras ( ) const
exint GLTF_NAMESPACE::GLTF_Loader::getNumImages ( ) const
exint GLTF_NAMESPACE::GLTF_Loader::getNumMaterials ( ) const
exint GLTF_NAMESPACE::GLTF_Loader::getNumMeshes ( ) const
exint GLTF_NAMESPACE::GLTF_Loader::getNumNodes ( ) const
exint GLTF_NAMESPACE::GLTF_Loader::getNumSamplers ( ) const
exint GLTF_NAMESPACE::GLTF_Loader::getNumScenes ( ) const
exint GLTF_NAMESPACE::GLTF_Loader::getNumSkins ( ) const
exint GLTF_NAMESPACE::GLTF_Loader::getNumTextures ( ) const
GLTF_Sampler const* GLTF_NAMESPACE::GLTF_Loader::getSampler ( GLTF_Handle  idx) const
GLTF_Sampler* GLTF_NAMESPACE::GLTF_Loader::getSampler ( GLTF_Handle  idx)
const UT_Array<GLTF_Sampler *>& GLTF_NAMESPACE::GLTF_Loader::getSamplers ( ) const
GLTF_Scene const* GLTF_NAMESPACE::GLTF_Loader::getScene ( GLTF_Handle  idx) const
GLTF_Scene* GLTF_NAMESPACE::GLTF_Loader::getScene ( GLTF_Handle  idx)
const UT_Array<GLTF_Scene *>& GLTF_NAMESPACE::GLTF_Loader::getScenes ( ) const
GLTF_Skin const* GLTF_NAMESPACE::GLTF_Loader::getSkin ( GLTF_Handle  idx) const
GLTF_Skin* GLTF_NAMESPACE::GLTF_Loader::getSkin ( GLTF_Handle  idx)
const UT_Array<GLTF_Skin *>& GLTF_NAMESPACE::GLTF_Loader::getSkins ( ) const
GLTF_Texture const* GLTF_NAMESPACE::GLTF_Loader::getTexture ( GLTF_Handle  idx) const
GLTF_Texture* GLTF_NAMESPACE::GLTF_Loader::getTexture ( GLTF_Handle  idx)
const UT_Array<GLTF_Texture *>& GLTF_NAMESPACE::GLTF_Loader::getTextures ( ) const
bool GLTF_NAMESPACE::GLTF_Loader::Load ( )

Loads and parses the JSON data within this GLTF file. Does not load any associated buffer data.

Returns
Whether or not the load suceeded
bool GLTF_NAMESPACE::GLTF_Loader::LoadAccessorData ( const GLTF_Accessor accessor,
unsigned char *&  data 
) const

Loads all data that can be accessed with the given accessor and returns a pointer to the beginning of the data. The caller is not responsible for deleting the returned data.

Returns
Whether or not the accessor data load suceeded
void GLTF_NAMESPACE::GLTF_Loader::removeBuffer ( GLTF_Handle  idx)
void GLTF_NAMESPACE::GLTF_Loader::removeNode ( GLTF_Handle  idx)
void GLTF_NAMESPACE::GLTF_Loader::setAsset ( const GLTF_Asset asset)
void GLTF_NAMESPACE::GLTF_Loader::setDefaultScene ( const GLTF_Handle idx)

The documentation for this class was generated from the following file: