MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/RadeonProRender-Baikal / LoadObj

Function LoadObj

RprTest/tiny_obj_loader.cpp:493–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491}
492
493std::string
494LoadObj(
495 std::vector<shape_t>& shapes,
496 std::vector<material_t>& materials, // [output]
497 const char* filename,
498 const char* mtl_basepath)
499{
500
501 shapes.clear();
502
503 std::stringstream err;
504
505 std::ifstream ifs(filename);
506 if (!ifs) {
507 err << "Cannot open file [" << filename << "]" << std::endl;
508 return err.str();
509 }
510
511 std::string basePath;
512 if (mtl_basepath) {
513 basePath = mtl_basepath;
514 }
515 MaterialFileReader matFileReader( basePath );
516
517 return LoadObj(shapes, materials, ifs, matFileReader);
518}
519
520std::string LoadObj(
521 std::vector<shape_t>& shapes,

Callers

nothing calls this directly

Calls 15

isSpaceFunction · 0.70
parseFloat3Function · 0.70
parseFloat2Function · 0.70
isNewLineFunction · 0.70
parseTripleFunction · 0.70
exportFaceGroupToShapeFunction · 0.70
parseStringFunction · 0.70
clearMethod · 0.45
sizeMethod · 0.45
eraseMethod · 0.45
emptyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected