MCPcopy Create free account
hub / github.com/Apress/Ray-Tracing-Gems-II / ParseFromString

Method ParseFromString

Chapter_39/tiny_obj_loader.h:2946–2961  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2944 }
2945
2946 bool ObjReader::ParseFromString(const std::string &obj_text,
2947 const std::string &mtl_text,
2948 const ObjReaderConfig &config) {
2949 std::stringbuf obj_buf(obj_text);
2950 std::stringbuf mtl_buf(mtl_text);
2951
2952 std::istream obj_ifs(&obj_buf);
2953 std::istream mtl_ifs(&mtl_buf);
2954
2955 MaterialStreamReader mtl_ss(mtl_ifs);
2956
2957 valid_ = LoadObj(&attrib_, &shapes_, &materials_, &warning_, &error_,
2958 &obj_ifs, &mtl_ss, config.triangulate, config.vertex_color);
2959
2960 return valid_;
2961 }
2962
2963#ifdef __clang__
2964#pragma clang diagnostic pop

Callers

nothing calls this directly

Calls 1

LoadObjFunction · 0.70

Tested by

no test coverage detected