MCPcopy Create free account
hub / github.com/admtrv/objcurses / parse_material

Method parse_material

entities/geometry/object.cpp:174–182  ·  view source on GitHub ↗

parse usemtl

Source from the content-addressed store, hash-verified

172
173// parse usemtl
174std::optional<int> Object::parse_material(const std::string &line) const
175{
176 std::stringstream ss(line);
177
178 std::string material_name;
179 ss >> material_name;
180
181 return find_material(material_name);
182}
183
184// parse newmtl
185bool Object::parse_current_material(const std::string &line, std::string &current_name, Vec3 &current_diffuse, bool &have_active_material)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected