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

#include <GLTF_CgltfWrapper.h>

Classes

struct  CgltfDataDeleter
 

Public Member Functions

 GLTF_CgltfWrapper ()
 
 ~GLTF_CgltfWrapper ()
 
void setCgltfData (UT_UniquePtr< cgltf_data, CgltfDataDeleter > &&data)
 
cgltf_datagetCgltfData ()
 
const cgltf_datagetCgltfData () const
 
cgltf_optionsgetCgltfOptions ()
 
const cgltf_optionsgetCgltfOptions () const
 
bool fixupPointers ()
 
void initCgltfData (bool writing_mode=false)
 
void initAsHoudiniAsset (cgltf_asset &asset)
 
void initAttribute (cgltf_attribute &attrib, cgltf_size accessor_index, const char *name, cgltf_accessor *data_accessor=nullptr)
 
template<typename T >
TappendProperty (T **propList, cgltf_size &propSize)
 
template<typename T >
T *& appendPropertyRef (T ***propList, cgltf_size &propSize)
 
void setMainBuffer (cgltf_buffer &buf, uint8_t *data, cgltf_size size)
 
 GLTF_DEFINE_APPEND_FUNC (appendAccessor, cgltf_accessor, myCgltfData->accessors, myCgltfData->accessors_count)
 
 GLTF_DEFINE_APPEND_FUNC (appendAnimation, cgltf_animation, myCgltfData->animations, myCgltfData->animations_count)
 
 GLTF_DEFINE_APPEND_FUNC (appendBuffer, cgltf_buffer, myCgltfData->buffers, myCgltfData->buffers_count)
 
 GLTF_DEFINE_APPEND_FUNC (appendBufferView, cgltf_buffer_view, myCgltfData->buffer_views, myCgltfData->buffer_views_count)
 
 GLTF_DEFINE_APPEND_FUNC (appendCamera, cgltf_camera, myCgltfData->cameras, myCgltfData->cameras_count)
 
 GLTF_DEFINE_APPEND_FUNC (appendImage, cgltf_image, myCgltfData->images, myCgltfData->images_count)
 
 GLTF_DEFINE_APPEND_FUNC (appendLight, cgltf_light, myCgltfData->lights, myCgltfData->lights_count)
 
 GLTF_DEFINE_APPEND_FUNC (appendMaterial, cgltf_material, myCgltfData->materials, myCgltfData->materials_count)
 
 GLTF_DEFINE_APPEND_FUNC (appendMesh, cgltf_mesh, myCgltfData->meshes, myCgltfData->meshes_count)
 
 GLTF_DEFINE_APPEND_FUNC (appendNode, cgltf_node, myCgltfData->nodes, myCgltfData->nodes_count)
 
 GLTF_DEFINE_APPEND_FUNC (appendTexture, cgltf_texture, myCgltfData->textures, myCgltfData->textures_count)
 
cgltf_sceneappendSceneAndSetToDefault ()
 
cgltf_attributeappendAttribute (cgltf_size mesh_id, cgltf_size prim_id, cgltf_size accessor_id, cgltf_attribute_type type, const char *name)
 
cgltf_attributeappendDracoAttribute (cgltf_size mesh_id, cgltf_size prim_id, cgltf_size draco_id, cgltf_attribute_type type, const char *name)
 
cgltf_primitiveappendPrimitive (cgltf_size mesh_id)
 
cgltf_animation_samplerappendAnimationSampler (cgltf_animation &anim)
 
cgltf_animation_channelappendAnimationChannel (cgltf_animation &anim)
 
cgltf_result loadBufferFile (cgltf_size buf_size, const char *buf_uri, const char *gltf_path, void **data)
 

Static Public Member Functions

static void writeCharProperty (char **prop, const char *src)
 
template<typename T >
static void initProperty (T *prop)
 
template<typename T >
static bool propHasExtras (const T *prop)
 
static UT_Options getExtrasAsOptions (const cgltf_extras &extras)
 

Detailed Description

Definition at line 47 of file GLTF_CgltfWrapper.h.

Constructor & Destructor Documentation

GLTF_CgltfWrapper::GLTF_CgltfWrapper ( )
inline

Definition at line 56 of file GLTF_CgltfWrapper.h.

GLTF_CgltfWrapper::~GLTF_CgltfWrapper ( )
inline

Definition at line 57 of file GLTF_CgltfWrapper.h.

Member Function Documentation

cgltf_animation_channel& GLTF_CgltfWrapper::appendAnimationChannel ( cgltf_animation anim)
inline

Definition at line 338 of file GLTF_CgltfWrapper.h.

cgltf_animation_sampler& GLTF_CgltfWrapper::appendAnimationSampler ( cgltf_animation anim)
inline

Definition at line 330 of file GLTF_CgltfWrapper.h.

cgltf_attribute& GLTF_CgltfWrapper::appendAttribute ( cgltf_size  mesh_id,
cgltf_size  prim_id,
cgltf_size  accessor_id,
cgltf_attribute_type  type,
const char *  name 
)
inline

Definition at line 274 of file GLTF_CgltfWrapper.h.

cgltf_attribute& GLTF_CgltfWrapper::appendDracoAttribute ( cgltf_size  mesh_id,
cgltf_size  prim_id,
cgltf_size  draco_id,
cgltf_attribute_type  type,
const char *  name 
)
inline

Definition at line 296 of file GLTF_CgltfWrapper.h.

cgltf_primitive& GLTF_CgltfWrapper::appendPrimitive ( cgltf_size  mesh_id)
inline

Definition at line 319 of file GLTF_CgltfWrapper.h.

template<typename T >
T& GLTF_CgltfWrapper::appendProperty ( T **  propList,
cgltf_size propSize 
)
inline

Definition at line 131 of file GLTF_CgltfWrapper.h.

template<typename T >
T*& GLTF_CgltfWrapper::appendPropertyRef ( T ***  propList,
cgltf_size propSize 
)
inline

Definition at line 156 of file GLTF_CgltfWrapper.h.

cgltf_scene& GLTF_CgltfWrapper::appendSceneAndSetToDefault ( )
inline

Definition at line 264 of file GLTF_CgltfWrapper.h.

bool GLTF_CgltfWrapper::fixupPointers ( )
cgltf_data* GLTF_CgltfWrapper::getCgltfData ( )
inline

Definition at line 64 of file GLTF_CgltfWrapper.h.

const cgltf_data* GLTF_CgltfWrapper::getCgltfData ( ) const
inline

Definition at line 65 of file GLTF_CgltfWrapper.h.

cgltf_options& GLTF_CgltfWrapper::getCgltfOptions ( )
inline

Definition at line 67 of file GLTF_CgltfWrapper.h.

const cgltf_options& GLTF_CgltfWrapper::getCgltfOptions ( ) const
inline

Definition at line 68 of file GLTF_CgltfWrapper.h.

static UT_Options GLTF_CgltfWrapper::getExtrasAsOptions ( const cgltf_extras extras)
inlinestatic

Definition at line 193 of file GLTF_CgltfWrapper.h.

GLTF_CgltfWrapper::GLTF_DEFINE_APPEND_FUNC ( appendAccessor  ,
cgltf_accessor  ,
myCgltfData->  accessors,
myCgltfData->  accessors_count 
)
GLTF_CgltfWrapper::GLTF_DEFINE_APPEND_FUNC ( appendAnimation  ,
cgltf_animation  ,
myCgltfData->  animations,
myCgltfData->  animations_count 
)
GLTF_CgltfWrapper::GLTF_DEFINE_APPEND_FUNC ( appendBuffer  ,
cgltf_buffer  ,
myCgltfData->  buffers,
myCgltfData->  buffers_count 
)
GLTF_CgltfWrapper::GLTF_DEFINE_APPEND_FUNC ( appendBufferView  ,
cgltf_buffer_view  ,
myCgltfData->  buffer_views,
myCgltfData->  buffer_views_count 
)
GLTF_CgltfWrapper::GLTF_DEFINE_APPEND_FUNC ( appendCamera  ,
cgltf_camera  ,
myCgltfData->  cameras,
myCgltfData->  cameras_count 
)
GLTF_CgltfWrapper::GLTF_DEFINE_APPEND_FUNC ( appendImage  ,
cgltf_image  ,
myCgltfData->  images,
myCgltfData->  images_count 
)
GLTF_CgltfWrapper::GLTF_DEFINE_APPEND_FUNC ( appendLight  ,
cgltf_light  ,
myCgltfData->  lights,
myCgltfData->  lights_count 
)
GLTF_CgltfWrapper::GLTF_DEFINE_APPEND_FUNC ( appendMaterial  ,
cgltf_material  ,
myCgltfData->  materials,
myCgltfData->  materials_count 
)
GLTF_CgltfWrapper::GLTF_DEFINE_APPEND_FUNC ( appendMesh  ,
cgltf_mesh  ,
myCgltfData->  meshes,
myCgltfData->  meshes_count 
)
GLTF_CgltfWrapper::GLTF_DEFINE_APPEND_FUNC ( appendNode  ,
cgltf_node  ,
myCgltfData->  nodes,
myCgltfData->  nodes_count 
)
GLTF_CgltfWrapper::GLTF_DEFINE_APPEND_FUNC ( appendTexture  ,
cgltf_texture  ,
myCgltfData->  textures,
myCgltfData->  textures_count 
)
void GLTF_CgltfWrapper::initAsHoudiniAsset ( cgltf_asset asset)
inline

Definition at line 103 of file GLTF_CgltfWrapper.h.

void GLTF_CgltfWrapper::initAttribute ( cgltf_attribute attrib,
cgltf_size  accessor_index,
const char *  name,
cgltf_accessor data_accessor = nullptr 
)
inline

Definition at line 117 of file GLTF_CgltfWrapper.h.

void GLTF_CgltfWrapper::initCgltfData ( bool  writing_mode = false)
inline

Definition at line 88 of file GLTF_CgltfWrapper.h.

template<typename T >
static void GLTF_CgltfWrapper::initProperty ( T prop)
inlinestatic

Definition at line 83 of file GLTF_CgltfWrapper.h.

cgltf_result GLTF_CgltfWrapper::loadBufferFile ( cgltf_size  buf_size,
const char *  buf_uri,
const char *  gltf_path,
void **  data 
)
template<typename T >
static bool GLTF_CgltfWrapper::propHasExtras ( const T prop)
inlinestatic

Definition at line 188 of file GLTF_CgltfWrapper.h.

void GLTF_CgltfWrapper::setCgltfData ( UT_UniquePtr< cgltf_data, CgltfDataDeleter > &&  data)
inline

Definition at line 59 of file GLTF_CgltfWrapper.h.

void GLTF_CgltfWrapper::setMainBuffer ( cgltf_buffer buf,
uint8_t *  data,
cgltf_size  size 
)
inline

Definition at line 180 of file GLTF_CgltfWrapper.h.

static void GLTF_CgltfWrapper::writeCharProperty ( char **  prop,
const char *  src 
)
inlinestatic

Definition at line 76 of file GLTF_CgltfWrapper.h.


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