29#include "vtk_jsoncpp_fwd.h"
48bool ValidateGLBFile(
const std::string& magic, uint32_t version, uint32_t fileLength,
49 std::vector<vtkGLTFUtils::ChunkInfoType> chunkInfo);
55 uint32_t& fileLength, std::vector<vtkGLTFUtils::ChunkInfoType>& chunkInfo);
85bool GetIntArray(
const Json::Value& root, std::vector<int>& value);
90bool GetUIntArray(
const Json::Value& root, std::vector<unsigned int>& value);
117 std::vector<char>& buffer,
size_t bufferSize);
Helper functions for glTF parsing and validation.
std::string GetDataUriMimeType(const std::string &uri)
Extract MIME-Type from data-uri.
const uint32_t GLBChunkHeaderSize
bool GetFloatArray(const Json::Value &root, std::vector< float > &value)
Get float array from Json variable, with existence and type checks.
const uint32_t GLBHeaderSize
bool GetIntArray(const Json::Value &root, std::vector< int > &value)
Get int array from Json variable, with existence and type checks.
bool GetUIntArray(const Json::Value &root, std::vector< unsigned int > &value)
Get int array from Json variable, with existence and type checks.
const uint32_t GLBVersion
const uint32_t GLBWordSize
bool GetBoolValue(const Json::Value &root, bool &value)
Get bool value from Json variable, with existence and type checks.
bool ValidateGLBFile(const std::string &magic, uint32_t version, uint32_t fileLength, std::vector< vtkGLTFUtils::ChunkInfoType > chunkInfo)
Checks various binary glTF elements for validity.
bool CheckVersion(const Json::Value &glTFAsset)
Check document version.
bool GetUIntValue(const Json::Value &root, unsigned int &value)
Get int value from Json variable, with existence and type checks.
std::string GetResourceFullPath(const std::string &resourcePath, const std::string &glTFFilePath)
Compute the path to a resource from its path as specified in the glTF file, and the glTF file's path.
bool ExtractGLBFileInformation(const std::string &fileName, std::string &magic, uint32_t &version, uint32_t &fileLength, std::vector< vtkGLTFUtils::ChunkInfoType > &chunkInfo)
Extract all header information from a binary glTF file.
bool GetBinaryBufferFromUri(const std::string &uri, const std::string &glTFFileName, std::vector< char > &buffer, size_t bufferSize)
Load binary buffer from uri information.
bool GetStringValue(const Json::Value &root, std::string &value)
Get string value from Json variable, with existence and type checks.
std::pair< std::string, uint32_t > ChunkInfoType
bool GetDoubleValue(const Json::Value &root, double &value)
Get double value from Json variable, with existence and type checks.
bool GetDoubleArray(const Json::Value &root, std::vector< double > &value)
Get double array from Json variable, with existence and type checks.
bool GetIntValue(const Json::Value &root, int &value)
Get int value from Json variable, with existence and type checks.