Claire's Game Engine
Full C++ Engine using OpenGL
|
Classes | |
struct | attrib_t |
struct | callback_t |
struct | index_t |
struct | joint_and_weight_t |
struct | lines_t |
struct | material_t |
class | MaterialFileReader |
class | MaterialReader |
class | MaterialStreamReader |
struct | mesh_t |
class | ObjReader |
struct | ObjReaderConfig |
struct | points_t |
struct | shape_t |
struct | skin_weight_t |
struct | tag_t |
struct | texture_option_t |
Typedefs | |
typedef float | real_t |
Functions | |
bool | LoadObj (attrib_t *attrib, std::vector< shape_t > *shapes, std::vector< material_t > *materials, std::string *warn, std::string *err, std::istream *inStream, MaterialReader *readMatFn=NULL, bool triangulate=true, bool default_vcols_fallback=true) |
==>>========= Legacy v1 API ============================================= | |
void | LoadMtl (std::map< std::string, int > *material_map, std::vector< material_t > *materials, std::istream *inStream, std::string *warning, std::string *err) |
Loads materials into std::map. | |
bool | ParseTextureNameAndOption (std::string *texname, texture_option_t *texopt, const char *linebuf) |
typedef float tinyobj::real_t |
void tinyobj::LoadMtl | ( | std::map< std::string, int > * | material_map, |
std::vector< material_t > * | materials, | ||
std::istream * | inStream, | ||
std::string * | warning, | ||
std::string * | err ) |
Loads materials into std::map.
bool tinyobj::LoadObj | ( | attrib_t * | attrib, |
std::vector< shape_t > * | shapes, | ||
std::vector< material_t > * | materials, | ||
std::string * | warn, | ||
std::string * | err, | ||
std::istream * | inStream, | ||
MaterialReader * | readMatFn = NULL, | ||
bool | triangulate = true, | ||
bool | default_vcols_fallback = true ) |
==>>========= Legacy v1 API =============================================
Loads .obj from a file. 'attrib', 'shapes' and 'materials' will be filled with parsed shape data 'shapes' will be filled with parsed shape data Returns true when loading .obj become success. Returns warning message into warn
, and error message into err
'mtl_basedir' is optional, and used for base directory for .mtl file. In default(‘NULL’), .mtl file is searched from an application's working / directory. / 'triangulate' is optional, and used whether triangulate polygon face in .obj / or not. / Option 'default_vcols_fallback' specifies whether vertex colors should / always be defined, even if no colors are given (fallback to white). bool LoadObj(attrib_t *attrib, std::vector<shape_t> *shapes, std::vector<material_t> *materials, std::string *warn, std::string *err, const char *filename, const char *mtl_basedir = NULL, bool triangulate = true, bool default_vcols_fallback = true);
/ Loads .obj from a file with custom user callback. / .mtl is loaded as usual and parsed material_t data will be passed to / callback.mtllib_cb
. / Returns true when loading .obj/.mtl become success. / Returns warning message into warn
, and error message into err
/ See examples/callback_api/
for how to use this function. bool LoadObjWithCallback(std::istream &inStream, const callback_t &callback, void *user_data = NULL, MaterialReader *readMatFn = NULL, std::string *warn = NULL, std::string *err = NULL);
/ Loads object from a std::istream, uses readMatFn
to retrieve / std::istream for materials. / Returns true when loading .obj become success. / Returns warning and error message into err
bool tinyobj::ParseTextureNameAndOption | ( | std::string * | texname, |
texture_option_t * | texopt, | ||
const char * | linebuf ) |
Parse texture name and texture option for custom texture parameter through material::unknown_parameter
[out] | texname | Parsed texture name |
[out] | texopt | Parsed texopt |
[in] | linebuf | Input string |