VTK  9.1.0
Namespaces | Typedefs | Functions | Variables
vtkGLTFUtils.h File Reference
#include "vtk_jsoncpp_fwd.h"
#include <string>
#include <vector>
Include dependency graph for vtkGLTFUtils.h:

Go to the source code of this file.

Namespaces

namespace  vtkGLTFUtils
 Helper functions for glTF parsing and validation.
 

Typedefs

using vtkGLTFUtils::ChunkInfoType = std::pair< std::string, uint32_t >
 

Functions

bool vtkGLTFUtils::ValidateGLBFile (const std::string &magic, uint32_t version, uint32_t fileLength, std::vector< vtkGLTFUtils::ChunkInfoType > chunkInfo)
 Checks various binary glTF elements for validity. More...
 
bool vtkGLTFUtils::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. More...
 
bool vtkGLTFUtils::GetIntValue (const Json::Value &root, int &value)
 Get int value from Json variable, with existence and type checks. More...
 
bool vtkGLTFUtils::GetUIntValue (const Json::Value &root, unsigned int &value)
 Get int value from Json variable, with existence and type checks. More...
 
bool vtkGLTFUtils::GetDoubleValue (const Json::Value &root, double &value)
 Get double value from Json variable, with existence and type checks. More...
 
bool vtkGLTFUtils::GetStringValue (const Json::Value &root, std::string &value)
 Get string value from Json variable, with existence and type checks. More...
 
bool vtkGLTFUtils::GetBoolValue (const Json::Value &root, bool &value)
 Get bool value from Json variable, with existence and type checks. More...
 
bool vtkGLTFUtils::GetIntArray (const Json::Value &root, std::vector< int > &value)
 Get int array from Json variable, with existence and type checks. More...
 
bool vtkGLTFUtils::GetUIntArray (const Json::Value &root, std::vector< unsigned int > &value)
 Get int array from Json variable, with existence and type checks. More...
 
bool vtkGLTFUtils::GetFloatArray (const Json::Value &root, std::vector< float > &value)
 Get float array from Json variable, with existence and type checks. More...
 
bool vtkGLTFUtils::GetDoubleArray (const Json::Value &root, std::vector< double > &value)
 Get double array from Json variable, with existence and type checks. More...
 
bool vtkGLTFUtils::CheckVersion (const Json::Value &glTFAsset)
 Check document version. More...
 
std::string vtkGLTFUtils::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. More...
 
bool vtkGLTFUtils::GetBinaryBufferFromUri (const std::string &uri, const std::string &glTFFileName, std::vector< char > &buffer, size_t bufferSize)
 Load binary buffer from uri information. More...
 
std::string vtkGLTFUtils::GetDataUriMimeType (const std::string &uri)
 Extract MIME-Type from data-uri. More...
 

Variables

const uint32_t vtkGLTFUtils::GLBWordSize = 4
 
const uint32_t vtkGLTFUtils::GLBHeaderSize = 12
 
const uint32_t vtkGLTFUtils::GLBChunkHeaderSize = 8
 
const uint32_t vtkGLTFUtils::GLBVersion = 2