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

Collection of Node elements defined by an OBJ file. More...

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

Static Public Member Functions

static Asset parse (StringView objString)
 Parse an asset from an OBJ string.

Public Attributes

ArrayList< String > materialLibraryFilenames {}
 List of relative filepaths of the material libraries associated with this asset.
Buffer< vec3 > vertices {}
 List of vertex positions referenced by the face vertices defined in this asset.
Buffer< vec2 > textureCoordinates {}
 List of texture coordinates referenced by the face vertices defined in this asset.
Buffer< vec3 > normals {}
 List of normal vectors referenced by the face vertices defined in this asset.
ArrayList< Node > nodes {}
 List of object nodes belonging to this asset.

Detailed Description

Collection of Node elements defined by an OBJ file.

Member Function Documentation

◆ parse()

Asset grem::obj::Asset::parse ( StringView objString)
staticnodiscard

Parse an asset from an OBJ string.

Parameters
objStringinput OBJ string to parse.
Returns
the parsed asset.
Exceptions
obj::Erroron failure to parse the asset.
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

◆ materialLibraryFilenames

ArrayList<String> grem::obj::Asset::materialLibraryFilenames {}

List of relative filepaths of the material libraries associated with this asset.

◆ vertices

Buffer<vec3> grem::obj::Asset::vertices {}

List of vertex positions referenced by the face vertices defined in this asset.

◆ textureCoordinates

Buffer<vec2> grem::obj::Asset::textureCoordinates {}

List of texture coordinates referenced by the face vertices defined in this asset.

◆ normals

Buffer<vec3> grem::obj::Asset::normals {}

List of normal vectors referenced by the face vertices defined in this asset.

◆ nodes

ArrayList<Node> grem::obj::Asset::nodes {}

List of object nodes belonging to this asset.


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