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

#include <GLTF_ExportRoot.h>

Classes

struct  ExportSettings
 

Public Member Functions

 GLTF_ExportRoot (ExportSettings s)
 
 ~GLTF_ExportRoot ()
 
bool HasCachedChannelImage (const UT_Array< GLTF_ChannelMapping > &mapping) const
 
GLTF_Handle GetCachedChannelImage (const UT_Array< GLTF_ChannelMapping > &mapping)
 
void InsertCachedChannelImage (const UT_Array< GLTF_ChannelMapping > &mapping, GLTF_Handle idx)
 
UT_Map< UT_StringHolder,
GLTF_Handle > & 
GetImageCache ()
 
UT_Map< const OP_Node
*, GLTF_Handle > & 
GetMaterialCache ()
 
UT_Map< UT_StringHolder,
UT_StringHolder > & 
GetMorphTargetToChannelMap ()
 
UT_Map< UT_StringHolder, exint > & GetMorphTargetChannels ()
 
UT_Map< UT_StringHolder,
GLTF_Int > & 
GetNameUsagesMap ()
 
voidBufferAlloc (GLTF_Handle bid, GLTF_Offset bytes, GLTF_Offset alignment, GLTF_Offset &offset)
 
GLTF_Loaderloader ()
 
bool ExportGLTF (const UT_String &path)
 
bool ExportAsGLB (const UT_String &path)
 
void SerializeJSON (UT_JSONWriter &writer)
 
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_NodeCreateNode (GLTF_Handle &idx)
 
GLTF_MeshCreateMesh (GLTF_Handle &idx)
 
GLTF_SceneCreateScene (GLTF_Handle &idx)
 
GLTF_SkinCreateSkin (GLTF_Handle &idx)
 
GLTF_ImageCreateImage (GLTF_Handle &idx)
 
GLTF_TextureCreateTexture (GLTF_Handle &idx)
 
GLTF_MaterialCreateMaterial (GLTF_Handle &idx)
 
GLTF_LightcreateLight (GLTF_Handle &idx)
 
GLTF_AccessorgetAccessor (GLTF_Handle idx)
 
GLTF_AnimationgetAnimation (GLTF_Handle idx)
 
GLTF_Asset getAsset ()
 
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_Handle getDefaultScene ()
 
GLTF_ScenegetScene (GLTF_Handle idx)
 
GLTF_SkingetSkin (GLTF_Handle idx)
 
GLTF_TexturegetTexture (GLTF_Handle idx)
 
void SetDefaultScene (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_Extension * > & getExtensions () 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
 
template<typename T >
GLTF_Handle addScalarArray (const UT_Array< T > &arr, GLTF_ComponentType type)
 
template<typename T >
GLTF_Handle addScalarArraysInterleaved (const UT_Array< UT_Array< T > * > &arr, GLTF_ComponentType type)
 
template<typename T >
GLTF_Handle createScalarBufferView (const UT_Array< T > &arr, T &min, T &max)
 
template<typename T >
GLTF_Handle createScalarBufferViewInterleaved (const UT_Array< UT_Array< T > * > &arr, T &min, T &max)
 

Detailed Description

Definition at line 52 of file GLTF_ExportRoot.h.

Constructor & Destructor Documentation

GLTF_NAMESPACE::GLTF_ExportRoot::GLTF_ExportRoot ( ExportSettings  s)
GLTF_NAMESPACE::GLTF_ExportRoot::~GLTF_ExportRoot ( )

Member Function Documentation

template<typename T >
GLTF_Handle GLTF_NAMESPACE::GLTF_ExportRoot::addScalarArray ( const UT_Array< T > &  arr,
GLTF_ComponentType  type 
)
inline

Definition at line 160 of file GLTF_ExportRoot.h.

template<typename T >
GLTF_Handle GLTF_NAMESPACE::GLTF_ExportRoot::addScalarArraysInterleaved ( const UT_Array< UT_Array< T > * > &  arr,
GLTF_ComponentType  type 
)
inline

Definition at line 180 of file GLTF_ExportRoot.h.

void* GLTF_NAMESPACE::GLTF_ExportRoot::BufferAlloc ( GLTF_Handle  bid,
GLTF_Offset  bytes,
GLTF_Offset  alignment,
GLTF_Offset offset 
)

Allocates additional space in the buffer in index bid. TODO: stop allocating from reallocing space.

GLTF_Accessor& GLTF_NAMESPACE::GLTF_ExportRoot::CreateAccessor ( GLTF_Handle idx)
GLTF_Animation& GLTF_NAMESPACE::GLTF_ExportRoot::CreateAnimation ( GLTF_Handle idx)
GLTF_Buffer& GLTF_NAMESPACE::GLTF_ExportRoot::CreateBuffer ( GLTF_Handle idx)
GLTF_BufferView& GLTF_NAMESPACE::GLTF_ExportRoot::CreateBufferview ( GLTF_Handle idx)
GLTF_Camera& GLTF_NAMESPACE::GLTF_ExportRoot::CreateCamera ( GLTF_Handle idx)
GLTF_Image& GLTF_NAMESPACE::GLTF_ExportRoot::CreateImage ( GLTF_Handle idx)
GLTF_Light& GLTF_NAMESPACE::GLTF_ExportRoot::createLight ( GLTF_Handle idx)
GLTF_Material& GLTF_NAMESPACE::GLTF_ExportRoot::CreateMaterial ( GLTF_Handle idx)
GLTF_Mesh& GLTF_NAMESPACE::GLTF_ExportRoot::CreateMesh ( GLTF_Handle idx)
GLTF_Node& GLTF_NAMESPACE::GLTF_ExportRoot::CreateNode ( GLTF_Handle idx)
template<typename T >
GLTF_Handle GLTF_NAMESPACE::GLTF_ExportRoot::createScalarBufferView ( const UT_Array< T > &  arr,
T &  min,
T &  max 
)
inline

Definition at line 200 of file GLTF_ExportRoot.h.

template<typename T >
GLTF_Handle GLTF_NAMESPACE::GLTF_ExportRoot::createScalarBufferViewInterleaved ( const UT_Array< UT_Array< T > * > &  arr,
T &  min,
T &  max 
)
inline

Definition at line 225 of file GLTF_ExportRoot.h.

GLTF_Scene& GLTF_NAMESPACE::GLTF_ExportRoot::CreateScene ( GLTF_Handle idx)
GLTF_Skin& GLTF_NAMESPACE::GLTF_ExportRoot::CreateSkin ( GLTF_Handle idx)
GLTF_Texture& GLTF_NAMESPACE::GLTF_ExportRoot::CreateTexture ( GLTF_Handle idx)
bool GLTF_NAMESPACE::GLTF_ExportRoot::ExportAsGLB ( const UT_String path)

Exports the file as GLB on os. If a uri is defined on buffer 0, it will be ignored. Otherwise, there are no modifications to the outputted JSON.

bool GLTF_NAMESPACE::GLTF_ExportRoot::ExportGLTF ( const UT_String path)

Exports this structure as a GLTF file.

GLTF_Accessor* GLTF_NAMESPACE::GLTF_ExportRoot::getAccessor ( GLTF_Handle  idx)
const UT_Array<GLTF_Accessor *>& GLTF_NAMESPACE::GLTF_ExportRoot::getAccessors ( ) const
GLTF_Animation* GLTF_NAMESPACE::GLTF_ExportRoot::getAnimation ( GLTF_Handle  idx)
const UT_Array<GLTF_Animation *>& GLTF_NAMESPACE::GLTF_ExportRoot::getAnimations ( ) const
GLTF_Asset GLTF_NAMESPACE::GLTF_ExportRoot::getAsset ( )
GLTF_Buffer* GLTF_NAMESPACE::GLTF_ExportRoot::getBuffer ( GLTF_Handle  idx)
const UT_Array<GLTF_Buffer *>& GLTF_NAMESPACE::GLTF_ExportRoot::getBuffers ( ) const
GLTF_BufferView* GLTF_NAMESPACE::GLTF_ExportRoot::getBufferView ( GLTF_Handle  idx)
const UT_Array<GLTF_BufferView *>& GLTF_NAMESPACE::GLTF_ExportRoot::getBufferViews ( ) const
GLTF_Handle GLTF_NAMESPACE::GLTF_ExportRoot::GetCachedChannelImage ( const UT_Array< GLTF_ChannelMapping > &  mapping)
GLTF_Camera* GLTF_NAMESPACE::GLTF_ExportRoot::getCamera ( GLTF_Handle  idx)
const UT_Array<GLTF_Camera *>& GLTF_NAMESPACE::GLTF_ExportRoot::getCameras ( ) const
GLTF_Handle GLTF_NAMESPACE::GLTF_ExportRoot::getDefaultScene ( )
const UT_Array<GLTF_Extension *>& GLTF_NAMESPACE::GLTF_ExportRoot::getExtensions ( ) const
GLTF_Image* GLTF_NAMESPACE::GLTF_ExportRoot::getImage ( GLTF_Handle  idx)
UT_Map<UT_StringHolder, GLTF_Handle>& GLTF_NAMESPACE::GLTF_ExportRoot::GetImageCache ( )
const UT_Array<GLTF_Image *>& GLTF_NAMESPACE::GLTF_ExportRoot::getImages ( ) const
GLTF_Material* GLTF_NAMESPACE::GLTF_ExportRoot::getMaterial ( GLTF_Handle  idx)
UT_Map<const OP_Node *, GLTF_Handle>& GLTF_NAMESPACE::GLTF_ExportRoot::GetMaterialCache ( )
const UT_Array<GLTF_Material *>& GLTF_NAMESPACE::GLTF_ExportRoot::getMaterials ( ) const
GLTF_Mesh* GLTF_NAMESPACE::GLTF_ExportRoot::getMesh ( GLTF_Handle  idx)
const UT_Array<GLTF_Mesh *>& GLTF_NAMESPACE::GLTF_ExportRoot::getMeshes ( ) const
UT_Map<UT_StringHolder, exint>& GLTF_NAMESPACE::GLTF_ExportRoot::GetMorphTargetChannels ( )
UT_Map<UT_StringHolder, UT_StringHolder>& GLTF_NAMESPACE::GLTF_ExportRoot::GetMorphTargetToChannelMap ( )
UT_Map<UT_StringHolder, GLTF_Int>& GLTF_NAMESPACE::GLTF_ExportRoot::GetNameUsagesMap ( )

This keeps track of the amount of times a specific filename outputted to to avoid name collisions

GLTF_Node* GLTF_NAMESPACE::GLTF_ExportRoot::getNode ( GLTF_Handle  idx)
const UT_Array<GLTF_Node *>& GLTF_NAMESPACE::GLTF_ExportRoot::getNodes ( ) const
GLTF_Sampler* GLTF_NAMESPACE::GLTF_ExportRoot::getSampler ( GLTF_Handle  idx)
const UT_Array<GLTF_Sampler *>& GLTF_NAMESPACE::GLTF_ExportRoot::getSamplers ( ) const
GLTF_Scene* GLTF_NAMESPACE::GLTF_ExportRoot::getScene ( GLTF_Handle  idx)
const UT_Array<GLTF_Scene *>& GLTF_NAMESPACE::GLTF_ExportRoot::getScenes ( ) const
GLTF_Skin* GLTF_NAMESPACE::GLTF_ExportRoot::getSkin ( GLTF_Handle  idx)
const UT_Array<GLTF_Skin *>& GLTF_NAMESPACE::GLTF_ExportRoot::getSkins ( ) const
GLTF_Texture* GLTF_NAMESPACE::GLTF_ExportRoot::getTexture ( GLTF_Handle  idx)
const UT_Array<GLTF_Texture *>& GLTF_NAMESPACE::GLTF_ExportRoot::getTextures ( ) const
bool GLTF_NAMESPACE::GLTF_ExportRoot::HasCachedChannelImage ( const UT_Array< GLTF_ChannelMapping > &  mapping) const
void GLTF_NAMESPACE::GLTF_ExportRoot::InsertCachedChannelImage ( const UT_Array< GLTF_ChannelMapping > &  mapping,
GLTF_Handle  idx 
)
GLTF_Loader& GLTF_NAMESPACE::GLTF_ExportRoot::loader ( )

Returns a reference to the internal root GLTF object

void GLTF_NAMESPACE::GLTF_ExportRoot::SerializeJSON ( UT_JSONWriter writer)
void GLTF_NAMESPACE::GLTF_ExportRoot::SetDefaultScene ( GLTF_Handle  idx)

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