GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::obj::mtl::Library Struct Reference

Material library that stores the material properties for objects defined in an Asset. More...

#include <GREM/core/formats/obj.hpp>

Public Member Functions

void load (StringView mtlString)
 Add materials parsed from an MTL string to the material library.

Static Public Member Functions

static Library parse (StringView mtlString)
 Parse a material library from an MTL string.

Public Attributes

ArrayList< Material > materials {}
 List of materials belonging to this library.

Detailed Description

Material library that stores the material properties for objects defined in an Asset.

Member Function Documentation

◆ parse()

Library grem::obj::mtl::Library::parse ( StringView mtlString)
inlinestaticnodiscard

Parse a material library from an MTL string.

Parameters
mtlStringread-only view over the MTL string to parse.
Returns
the parsed material library.
Exceptions
obj::Erroron failure to parse the material library.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ load()

void grem::obj::mtl::Library::load ( StringView mtlString)

Add materials parsed from an MTL string to the material library.

Parameters
mtlStringread-only view over the MTL string to parse.
Exceptions
obj::Erroron failure to parse the material library.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

Member Data Documentation

◆ materials

ArrayList<Material> grem::obj::mtl::Library::materials {}

List of materials belonging to this library.


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