Tachyon (current)  Current Main Branch
Public Member Functions
tinyobj::ObjReader Class Reference

Wavefront .obj reader class(v2 API) More...

#include <tiny_obj_loader.h>

Public Member Functions

 ObjReader ()
 
bool ParseFromFile (const std::string &filename, const ObjReaderConfig &config=ObjReaderConfig())
 Load .obj and .mtl from a file. More...
 
bool ParseFromString (const std::string &obj_text, const std::string &mtl_text, const ObjReaderConfig &config=ObjReaderConfig())
 Parse .obj from a text string. More...
 
bool Valid () const
 .obj was loaded or parsed correctly. More...
 
const attrib_tGetAttrib () const
 
const std::vector< shape_t > & GetShapes () const
 
const std::vector< material_t > & GetMaterials () const
 
const std::string & Warning () const
 Warning message(may be filled after Load or Parse) More...
 
const std::string & Error () const
 Error message(filled when Load or Parse failed) More...
 

Detailed Description

Wavefront .obj reader class(v2 API)

Definition at line 531 of file tiny_obj_loader.h.

Constructor & Destructor Documentation

◆ ObjReader()

tinyobj::ObjReader::ObjReader ( )
inline

Definition at line 533 of file tiny_obj_loader.h.

Member Function Documentation

◆ Error()

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

Error message(filled when Load or Parse failed)

Definition at line 575 of file tiny_obj_loader.h.

Referenced by main().

◆ GetAttrib()

const attrib_t& tinyobj::ObjReader::GetAttrib ( ) const
inline

Definition at line 561 of file tiny_obj_loader.h.

Referenced by main().

◆ GetMaterials()

const std::vector<material_t>& tinyobj::ObjReader::GetMaterials ( ) const
inline

Definition at line 565 of file tiny_obj_loader.h.

Referenced by main().

◆ GetShapes()

const std::vector<shape_t>& tinyobj::ObjReader::GetShapes ( ) const
inline

Definition at line 563 of file tiny_obj_loader.h.

Referenced by main().

◆ 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

Referenced by main().

◆ 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.

Definition at line 559 of file tiny_obj_loader.h.

◆ Warning()

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

Warning message(may be filled after Load or Parse)

Definition at line 570 of file tiny_obj_loader.h.

Referenced by main().


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