libdonut  2.3.2
Application framework for cross-platform game development in C++20
Static Public Member Functions | Public Attributes | List of all members
donut::obj::Scene Struct Reference

Scene of Object elements defined by an OBJ file. More...

#include <donut/obj.hpp>

Static Public Member Functions

static Scene parse (std::string_view objString)
 Parse a scene from an OBJ string. More...
 

Public Attributes

std::vector< std::string > materialLibraryFilenames {}
 List of relative filepaths of the material libraries associated with this scene. More...
 
std::vector< vec3 > vertices {}
 List of vertex positions referenced by the face vertices defined in this scene. More...
 
std::vector< vec2 > textureCoordinates {}
 List of texture coordinates referenced by the face vertices defined in this scene. More...
 
std::vector< vec3 > normals {}
 List of normal vectors referenced by the face vertices defined in this scene. More...
 
std::vector< Objectobjects {}
 List of objects belonging to this scene. More...
 

Detailed Description

Scene of Object elements defined by an OBJ file.

Member Function Documentation

◆ parse()

static Scene donut::obj::Scene::parse ( std::string_view  objString)
static

Parse a scene from an OBJ string.

Parameters
objStringread-only view over the OBJ string to parse.
Returns
the parsed scene.
Exceptions
Erroron failure to parse any element of the scene.
std::bad_allocon allocation failure.

Member Data Documentation

◆ materialLibraryFilenames

std::vector<std::string> donut::obj::Scene::materialLibraryFilenames {}

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

◆ vertices

std::vector<vec3> donut::obj::Scene::vertices {}

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

◆ textureCoordinates

std::vector<vec2> donut::obj::Scene::textureCoordinates {}

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

◆ normals

std::vector<vec3> donut::obj::Scene::normals {}

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

◆ objects

std::vector<Object> donut::obj::Scene::objects {}

List of objects belonging to this scene.


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