17#include "vtkABINamespace.h" 
   19#include <vtk_nlohmannjson.h> 
   20#include VTK_NLOHMANN_JSON(json.hpp) 
   25VTK_ABI_NAMESPACE_BEGIN
 
   32VTK_ABI_NAMESPACE_BEGIN
 
   45bool ValidateGLBFile(
const std::string& magic, uint32_t version, uint32_t fileLength,
 
   46  std::vector<vtkGLTFUtils::ChunkInfoType> chunkInfo);
 
   52  std::vector<vtkGLTFUtils::ChunkInfoType>& chunkInfo);
 
   57bool GetIntValue(
const nlohmann::json& root, 
const std::string& key, 
int& value);
 
   62bool GetUIntValue(
const nlohmann::json& root, 
const std::string& key, 
unsigned int& value);
 
   67bool GetDoubleValue(
const nlohmann::json& root, 
const std::string& key, 
double& value);
 
   72bool GetStringValue(
const nlohmann::json& root, 
const std::string& key, std::string& value);
 
   77bool GetBoolValue(
const nlohmann::json& root, 
const std::string& key, 
bool& value);
 
   82bool GetIntArray(
const nlohmann::json& root, 
const std::string& key, std::vector<int>& value);
 
   88  const nlohmann::json& root, 
const std::string& key, std::vector<unsigned int>& value);
 
   93bool GetFloatArray(
const nlohmann::json& root, 
const std::string& key, std::vector<float>& value);
 
   98bool GetDoubleArray(
const nlohmann::json& root, 
const std::string& key, std::vector<double>& value);
 
  109  const std::string& uri, 
vtkURILoader* loader, std::vector<char>& buffer, 
size_t bufferSize);
 
Abstract class used for custom streams.
 
Helper class for readers and importer that need to load more than one resource.
 
bool ExtractGLBFileInformation(vtkResourceStream *stream, uint32_t &version, uint32_t &fileLength, std::vector< vtkGLTFUtils::ChunkInfoType > &chunkInfo)
Extract all header information from a binary glTF file.
 
bool GetDoubleValue(const nlohmann::json &root, const std::string &key, double &value)
Get double value from Json variable, with existence and type checks.
 
bool GetUIntValue(const nlohmann::json &root, const std::string &key, unsigned int &value)
Get int value from Json variable, with existence and type checks.
 
static constexpr uint32_t GLBWordSize
 
bool GetIntArray(const nlohmann::json &root, const std::string &key, std::vector< int > &value)
Get int array from Json variable, with existence and type checks.
 
bool CheckVersion(const nlohmann::json &glTFAsset)
Check document version.
 
static constexpr uint32_t GLBChunkHeaderSize
 
static constexpr uint32_t GLBVersion
 
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 GetUIntArray(const nlohmann::json &root, const std::string &key, std::vector< unsigned int > &value)
Get int array from Json variable, with existence and type checks.
 
bool GetBinaryBufferFromUri(const std::string &uri, vtkURILoader *loader, std::vector< char > &buffer, size_t bufferSize)
Load binary buffer from uri information.
 
bool GetFloatArray(const nlohmann::json &root, const std::string &key, std::vector< float > &value)
Get float array from Json variable, with existence and type checks.
 
bool GetDoubleArray(const nlohmann::json &root, const std::string &key, std::vector< double > &value)
Get double array from Json variable, with existence and type checks.
 
static constexpr uint32_t GLBHeaderSize
 
bool GetIntValue(const nlohmann::json &root, const std::string &key, int &value)
Get int value from Json variable, with existence and type checks.
 
std::pair< std::string, uint32_t > ChunkInfoType
 
bool GetStringValue(const nlohmann::json &root, const std::string &key, std::string &value)
Get string value from Json variable, with existence and type checks.
 
bool GetBoolValue(const nlohmann::json &root, const std::string &key, bool &value)
Get bool value from Json variable, with existence and type checks.