GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
tinygltf Namespace Reference

Classes

class  Value
struct  Parameter
struct  AnimationChannel
struct  AnimationSampler
struct  Animation
struct  Skin
struct  Sampler
struct  Image
struct  Texture
struct  TextureInfo
struct  NormalTextureInfo
struct  OcclusionTextureInfo
struct  PbrMetallicRoughness
struct  Material
struct  BufferView
struct  Accessor
struct  PerspectiveCamera
struct  OrthographicCamera
struct  Camera
struct  Primitive
struct  Mesh
class  Node
struct  Buffer
struct  Asset
struct  Scene
struct  SpotLight
struct  Light
class  Model
struct  FsCallbacks
class  TinyGLTF

Typedefs

using ColorValue = std::array<double, 4>
 Agregate object for representing a color.
typedef std::map< std::string, Parameter > ParameterMap
typedef std::map< std::string, Value > ExtensionMap
typedef bool(* LoadImageDataFunction) (Image *, const int, std::string *, std::string *, int, int, const unsigned char *, int, void *user_pointer)
typedef bool(* WriteImageDataFunction) (const std::string *, const std::string *, Image *, bool, void *)
typedef bool(* FileExistsFunction) (const std::string &abs_filename, void *)
typedef std::string(* ExpandFilePathFunction) (const std::string &, void *)
typedef bool(* ReadWholeFileFunction) (std::vector< unsigned char, ::GameApiAllocator< unsigned char > > *, std::string *, const std::string &, void *)
typedef bool(* WriteWholeFileFunction) (std::string *, const std::string &, const std::vector< unsigned char, ::GameApiAllocator< unsigned char > > &, void *)

Enumerations

enum  Type {
  NULL_TYPE , REAL_TYPE , INT_TYPE , BOOL_TYPE ,
  STRING_TYPE , ARRAY_TYPE , BINARY_TYPE , OBJECT_TYPE
}
enum  SectionCheck {
  NO_REQUIRE = 0x00 , REQUIRE_VERSION = 0x01 , REQUIRE_SCENE = 0x02 , REQUIRE_SCENES = 0x04 ,
  REQUIRE_NODES = 0x08 , REQUIRE_ACCESSORS = 0x10 , REQUIRE_BUFFERS = 0x20 , REQUIRE_BUFFER_VIEWS = 0x40 ,
  REQUIRE_ALL = 0x7f
}

Functions

bool IsDataURI (const std::string &in)
bool DecodeDataURI (std::vector< unsigned char > *out, std::string &mime_type, const std::string &in, size_t reqBytes, bool checkSize)
bool LoadImageData (Image *image, const int image_idx, std::string *err, std::string *warn, int req_width, int req_height, const unsigned char *bytes, int size, void *)
bool WriteImageData (const std::string *basepath, const std::string *filename, Image *image, bool embedImages, void *)
bool FileExists (const std::string &abs_filename, void *)
std::string ExpandFilePath (const std::string &filepath, void *userdata)
bool ReadWholeFile (std::vector< unsigned char, ::GameApiAllocator< unsigned char > > *out, std::string *err, const std::string &filepath, void *)
bool WriteWholeFile (std::string *err, const std::string &filepath, const std::vector< unsigned char, ::GameApiAllocator< unsigned char > > &contents, void *)

Typedef Documentation

◆ ColorValue

using tinygltf::ColorValue = std::array<double, 4>

Agregate object for representing a color.

◆ ExpandFilePathFunction

typedef std::string(* tinygltf::ExpandFilePathFunction) (const std::string &, void *)

ExpandFilePathFunction type. Signature for custom filesystem callbacks.

◆ ExtensionMap

typedef std::map<std::string, Value> tinygltf::ExtensionMap

◆ FileExistsFunction

typedef bool(* tinygltf::FileExistsFunction) (const std::string &abs_filename, void *)

FilExistsFunction type. Signature for custom filesystem callbacks.

◆ LoadImageDataFunction

typedef bool(* tinygltf::LoadImageDataFunction) (Image *, const int, std::string *, std::string *, int, int, const unsigned char *, int, void *user_pointer)

LoadImageDataFunction type. Signature for custom image loading callbacks.

◆ ParameterMap

typedef std::map<std::string, Parameter> tinygltf::ParameterMap

◆ ReadWholeFileFunction

typedef bool(* tinygltf::ReadWholeFileFunction) (std::vector< unsigned char, ::GameApiAllocator< unsigned char > > *, std::string *, const std::string &, void *)

ReadWholeFileFunction type. Signature for custom filesystem callbacks.

◆ WriteImageDataFunction

typedef bool(* tinygltf::WriteImageDataFunction) (const std::string *, const std::string *, Image *, bool, void *)

WriteImageDataFunction type. Signature for custom image writing callbacks.

◆ WriteWholeFileFunction

typedef bool(* tinygltf::WriteWholeFileFunction) (std::string *, const std::string &, const std::vector< unsigned char, ::GameApiAllocator< unsigned char > > &, void *)

WriteWholeFileFunction type. Signature for custom filesystem callbacks.

Enumeration Type Documentation

◆ SectionCheck

Enumerator
NO_REQUIRE 
REQUIRE_VERSION 
REQUIRE_SCENE 
REQUIRE_SCENES 
REQUIRE_NODES 
REQUIRE_ACCESSORS 
REQUIRE_BUFFERS 
REQUIRE_BUFFER_VIEWS 
REQUIRE_ALL 

◆ Type

Enumerator
NULL_TYPE 
REAL_TYPE 
INT_TYPE 
BOOL_TYPE 
STRING_TYPE 
ARRAY_TYPE 
BINARY_TYPE 
OBJECT_TYPE 

Function Documentation

◆ DecodeDataURI()

bool tinygltf::DecodeDataURI ( std::vector< unsigned char > * out,
std::string & mime_type,
const std::string & in,
size_t reqBytes,
bool checkSize )

◆ ExpandFilePath()

std::string tinygltf::ExpandFilePath ( const std::string & filepath,
void * userdata )

Expand file path(e.g. ~ to home directory on posix, APPDATA% to C:\\Users\\tinygltf\\AppData)

Parameters
[in]filepathFile path string. Assume UTF-8
[in]userdataUser data. Set to nullptr if you don't need it.

◆ FileExists()

bool tinygltf::FileExists ( const std::string & abs_filename,
void *  )

◆ IsDataURI()

bool tinygltf::IsDataURI ( const std::string & in)

◆ LoadImageData()

bool tinygltf::LoadImageData ( Image * image,
const int image_idx,
std::string * err,
std::string * warn,
int req_width,
int req_height,
const unsigned char * bytes,
int size,
void *  )

◆ ReadWholeFile()

bool tinygltf::ReadWholeFile ( std::vector< unsigned char, ::GameApiAllocator< unsigned char > > * out,
std::string * err,
const std::string & filepath,
void *  )

◆ WriteImageData()

bool tinygltf::WriteImageData ( const std::string * basepath,
const std::string * filename,
Image * image,
bool embedImages,
void *  )

◆ WriteWholeFile()

bool tinygltf::WriteWholeFile ( std::string * err,
const std::string & filepath,
const std::vector< unsigned char, ::GameApiAllocator< unsigned char > > & contents,
void *  )