Mesh_analyzer
Loading...
Searching...
No Matches
tinyobj::ObjReader Class Reference

#include <tiny_obj_loader.h>

Public Member Functions

bool ParseFromFile (const std::string &filename, const ObjReaderConfig &config=ObjReaderConfig())
bool ParseFromString (const std::string &obj_text, const std::string &mtl_text, const ObjReaderConfig &config=ObjReaderConfig())
bool Valid () const
const attrib_tGetAttrib () const
const std::vector< shape_t > & GetShapes () const
const std::vector< material_t > & GetMaterials () const
const std::string & Warning () const
const std::string & Error () const

Detailed Description

Wavefront .obj reader class(v2 API)

Member Function Documentation

◆ Error()

const std::string & tinyobj::ObjReader::Error ( ) const
inline

Error message(filled when Load or Parse failed)

◆ ParseFromFile()

bool tinyobj::ObjReader::ParseFromFile ( const std::string & filename,
const ObjReaderConfig & config = ObjReaderConfig() )

Load .obj and .mtl from a file.

Parameters
[in]filenamewavefront .obj filename
[in]configReader configuration

◆ ParseFromString()

bool tinyobj::ObjReader::ParseFromString ( const std::string & obj_text,
const std::string & mtl_text,
const ObjReaderConfig & config = ObjReaderConfig() )

Parse .obj from a text string. Need to supply .mtl text string by mtl_text. This function ignores mtllib line in .obj text.

Parameters
[in]obj_textwavefront .obj filename
[in]mtl_textwavefront .mtl filename
[in]configReader configuration

◆ Valid()

bool tinyobj::ObjReader::Valid ( ) const
inline

.obj was loaded or parsed correctly.

◆ Warning()

const std::string & tinyobj::ObjReader::Warning ( ) const
inline

Warning message(may be filled after Load or Parse)


The documentation for this class was generated from the following file: