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

#include <GLTF_Writer.h>

Public Member Functions

 GLTF_Writer ()
 
 ~GLTF_Writer ()
 
bool writeToFile (const char *filepath)
 
void setResourceDirectory (const UT_StringHolder &dir)
 
void setCopyright (const UT_StringHolder &copyright)
 
bool initializeGltfData (const char *filename, const UT_WeakPtr< GLTF_AnimationData > &anim_data)
 
const GLTF_ErrorManagergetErrorManager () const
 
GLTF_Index addNode ()
 
GLTF_Index addMesh ()
 
GLTF_Index addPrimitive (const GLTF_Index mesh_id, GLTF_PrimitiveType type)
 
GLTF_Index addAttribute (const GLTF_Index mesh_id, const GLTF_Index prim_id, const GLTF_AttributeType type, const char *name)
 
GLTF_Index addCamera (GLTF_CameraProjection proj, const UT_CameraParms &parms)
 
GLTF_Index addLight (GLTFZ_LightType type)
 
void addRootNodeToScene (GLTF_Index node_id, GLTF_Index scene_id)
 
void setNodeMesh (GLTF_Index node_id, GLTF_Index mesh_id)
 
GLTF_Index defaultScene () const
 
template<typename T >
UT_Array< T > & createAttribute (const GLTF_AttributeInfo &info)
 
draco::EncoderBuffer * getDracoEncoderBuffer (const GLTF_Index mesh_id, const GLTF_Index prim_id)
 
void setDracoPrimIndexCount (const GLTF_Index mesh_id, const GLTF_Index prim_id, const GLTF_Index count)
 
UT_Array< uint32_t > & createVertexIndices (const GLTF_Index mesh_id, const GLTF_Index prim_id)
 
void setPositionMinMax (const GLTF_AttributeInfo &info, const UT_Vector3F &min, const UT_Vector3F &max)
 
bool containsMaterial (const char *node_path)
 
GLTF_Index createOrGetMaterial (const char *node_path)
 
bool containsImage (const char *name)
 
GLTF_Index createImage (const char *name)
 
UT_Array< int8_t > & getImageBuffer (const char *name)
 
GLTF_Index getImageIndex (const char *name)
 
bool embedImageFile (const UT_StringHolder &filepath, const IMG_Format *format, const char *img_name)
 
bool copyImageFileAndExport (const UT_StringHolder &filepath, const IMG_Format *format, const char *img_name)
 
bool exportTextureWithImage (const UT_StringHolder &image_path, const UT_StringHolder &image_name, const IMG_Format *format, GLTF_ResourceExportLocation export_loc, GLTF_Index &tex_id)
 
cgltf_datagetCgltfData ()
 
const cgltf_datagetCgltfData () const
 
GLTF_CgltfWrappergetCgltfWrapper ()
 

Detailed Description

Definition at line 31 of file GLTF_Writer.h.

Constructor & Destructor Documentation

GLTF_Writer::GLTF_Writer ( )
GLTF_Writer::~GLTF_Writer ( )

Member Function Documentation

GLTF_Index GLTF_Writer::addAttribute ( const GLTF_Index  mesh_id,
const GLTF_Index  prim_id,
const GLTF_AttributeType  type,
const char *  name 
)
GLTF_Index GLTF_Writer::addCamera ( GLTF_CameraProjection  proj,
const UT_CameraParms parms 
)
GLTF_Index GLTF_Writer::addLight ( GLTFZ_LightType  type)
GLTF_Index GLTF_Writer::addMesh ( )
GLTF_Index GLTF_Writer::addNode ( )
GLTF_Index GLTF_Writer::addPrimitive ( const GLTF_Index  mesh_id,
GLTF_PrimitiveType  type 
)
void GLTF_Writer::addRootNodeToScene ( GLTF_Index  node_id,
GLTF_Index  scene_id 
)
bool GLTF_Writer::containsImage ( const char *  name)
inline

Definition at line 144 of file GLTF_Writer.h.

bool GLTF_Writer::containsMaterial ( const char *  node_path)
bool GLTF_Writer::copyImageFileAndExport ( const UT_StringHolder filepath,
const IMG_Format format,
const char *  img_name 
)
template<typename T >
UT_Array<T>& GLTF_Writer::createAttribute ( const GLTF_AttributeInfo info)
inline

Definition at line 106 of file GLTF_Writer.h.

GLTF_Index GLTF_Writer::createImage ( const char *  name)
GLTF_Index GLTF_Writer::createOrGetMaterial ( const char *  node_path)
UT_Array<uint32_t>& GLTF_Writer::createVertexIndices ( const GLTF_Index  mesh_id,
const GLTF_Index  prim_id 
)
GLTF_Index GLTF_Writer::defaultScene ( ) const
bool GLTF_Writer::embedImageFile ( const UT_StringHolder filepath,
const IMG_Format format,
const char *  img_name 
)
bool GLTF_Writer::exportTextureWithImage ( const UT_StringHolder image_path,
const UT_StringHolder image_name,
const IMG_Format format,
GLTF_ResourceExportLocation  export_loc,
GLTF_Index tex_id 
)
cgltf_data* GLTF_Writer::getCgltfData ( )
inline

Definition at line 169 of file GLTF_Writer.h.

const cgltf_data* GLTF_Writer::getCgltfData ( ) const
inline

Definition at line 173 of file GLTF_Writer.h.

GLTF_CgltfWrapper* GLTF_Writer::getCgltfWrapper ( )
inline

Definition at line 178 of file GLTF_Writer.h.

draco::EncoderBuffer* GLTF_Writer::getDracoEncoderBuffer ( const GLTF_Index  mesh_id,
const GLTF_Index  prim_id 
)
inline

Definition at line 115 of file GLTF_Writer.h.

const GLTF_ErrorManager& GLTF_Writer::getErrorManager ( ) const
inline

Definition at line 72 of file GLTF_Writer.h.

UT_Array<int8_t>& GLTF_Writer::getImageBuffer ( const char *  name)
GLTF_Index GLTF_Writer::getImageIndex ( const char *  name)
bool GLTF_Writer::initializeGltfData ( const char *  filename,
const UT_WeakPtr< GLTF_AnimationData > &  anim_data 
)
void GLTF_Writer::setCopyright ( const UT_StringHolder copyright)
inline

Definition at line 64 of file GLTF_Writer.h.

void GLTF_Writer::setDracoPrimIndexCount ( const GLTF_Index  mesh_id,
const GLTF_Index  prim_id,
const GLTF_Index  count 
)
inline

Definition at line 123 of file GLTF_Writer.h.

void GLTF_Writer::setNodeMesh ( GLTF_Index  node_id,
GLTF_Index  mesh_id 
)
void GLTF_Writer::setPositionMinMax ( const GLTF_AttributeInfo info,
const UT_Vector3F min,
const UT_Vector3F max 
)
void GLTF_Writer::setResourceDirectory ( const UT_StringHolder dir)
inline

Definition at line 60 of file GLTF_Writer.h.

bool GLTF_Writer::writeToFile ( const char *  filepath)

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