RavEngine
Loading...
Searching...
No Matches
tinygltf::TinyGLTF Class Reference

Public Member Functions

bool LoadASCIIFromFile (Model *model, std::string *err, std::string *warn, const std::string &filename, unsigned int check_sections=REQUIRE_ALL)
 
bool LoadASCIIFromString (Model *model, std::string *err, std::string *warn, const char *str, const unsigned int length, const std::string &base_dir, unsigned int check_sections=REQUIRE_ALL)
 
bool LoadBinaryFromFile (Model *model, std::string *err, std::string *warn, const std::string &filename, unsigned int check_sections=REQUIRE_ALL)
 
bool LoadBinaryFromMemory (Model *model, std::string *err, std::string *warn, const unsigned char *bytes, const unsigned int length, const std::string &base_dir="", unsigned int check_sections=REQUIRE_ALL)
 
bool WriteGltfSceneToFile (Model *model, const std::string &filename, bool embedImages, bool embedBuffers, bool prettyPrint, bool writeBinary)
 
void SetImageLoader (LoadImageDataFunction LoadImageData, void *user_data)
 
void SetImageWriter (WriteImageDataFunction WriteImageData, void *user_data)
 
void SetFsCallbacks (FsCallbacks callbacks)
 

Member Function Documentation

◆ LoadASCIIFromFile()

bool tinygltf::TinyGLTF::LoadASCIIFromFile ( Model *  model,
std::string *  err,
std::string *  warn,
const std::string &  filename,
unsigned int  check_sections = REQUIRE_ALL 
)

Loads glTF ASCII asset from a file. Set warning message to warn for example it fails to load asserts. Returns false and set error string to err if there's an error.

◆ LoadASCIIFromString()

bool tinygltf::TinyGLTF::LoadASCIIFromString ( Model *  model,
std::string *  err,
std::string *  warn,
const char *  str,
const unsigned int  length,
const std::string &  base_dir,
unsigned int  check_sections = REQUIRE_ALL 
)

Loads glTF ASCII asset from string(memory). length = strlen(str); Set warning message to warn for example it fails to load asserts. Returns false and set error string to err if there's an error.

◆ LoadBinaryFromFile()

bool tinygltf::TinyGLTF::LoadBinaryFromFile ( Model *  model,
std::string *  err,
std::string *  warn,
const std::string &  filename,
unsigned int  check_sections = REQUIRE_ALL 
)

Loads glTF binary asset from a file. Set warning message to warn for example it fails to load asserts. Returns false and set error string to err if there's an error.

◆ LoadBinaryFromMemory()

bool tinygltf::TinyGLTF::LoadBinaryFromMemory ( Model *  model,
std::string *  err,
std::string *  warn,
const unsigned char *  bytes,
const unsigned int  length,
const std::string &  base_dir = "",
unsigned int  check_sections = REQUIRE_ALL 
)

Loads glTF binary asset from memory. length = strlen(str); Set warning message to warn for example it fails to load asserts. Returns false and set error string to err if there's an error.

◆ SetFsCallbacks()

void tinygltf::TinyGLTF::SetFsCallbacks ( FsCallbacks  callbacks)

Set callbacks to use for filesystem (fs) access and their user data

◆ SetImageLoader()

void tinygltf::TinyGLTF::SetImageLoader ( LoadImageDataFunction  LoadImageData,
void *  user_data 
)

Set callback to use for loading image data

◆ SetImageWriter()

void tinygltf::TinyGLTF::SetImageWriter ( WriteImageDataFunction  WriteImageData,
void *  user_data 
)

Set callback to use for writing image data

◆ WriteGltfSceneToFile()

bool tinygltf::TinyGLTF::WriteGltfSceneToFile ( Model *  model,
const std::string &  filename,
bool  embedImages,
bool  embedBuffers,
bool  prettyPrint,
bool  writeBinary 
)

Write glTF to file.


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