#include <OBJLoader.hpp>
|
| void | ProcessMeshFace (Component::Mesh &mesh, const std::vector< tinyobj::shape_t > &shapes, size_t shape, size_t face_vertices, size_t &index_offset) noexcept |
| | Processes a single face of the mesh and populates the Mesh object.
|
| void | SetMaterialProperties (Component::Material &material, const tinyobj::material_t &mat) noexcept |
| | Sets the properties of a material according to the tinyobj::material_t structure.
|
◆ OBJLoader()
| Object::OBJLoader::OBJLoader |
( |
const std::string & | filepath, |
|
|
const std::string & | mtlSearchPath = "" ) |
|
explicit |
Constructs an OBJLoader for the specified file.
- Parameters
-
| filepath | The path to the OBJ file. |
| mtlSearchPath | The path to the directory containing material files. |
- Exceptions
-
- See also
- OBJLoaderError
◆ ~OBJLoader()
| Object::OBJLoader::~OBJLoader |
( |
| ) |
|
|
default |
◆ GetMaterials()
Retrieves the loaded materials data.
- Returns
- std::vector<Component::Material> The materials data extracted from the OBJ file.
- See also
- Component::Material
◆ GetMesh()
◆ GetShapes()
Retrieves the loaded shapes data.
- Returns
- std::vector<Resource::Shape> The shapes data extracted from the OBJ file.
- See also
- Resource::Shape
◆ ProcessMeshFace()
| void Object::OBJLoader::ProcessMeshFace |
( |
Component::Mesh & | mesh, |
|
|
const std::vector< tinyobj::shape_t > & | shapes, |
|
|
size_t | shape, |
|
|
size_t | face_vertices, |
|
|
size_t & | index_offset ) |
|
privatenoexcept |
Processes a single face of the mesh and populates the Mesh object.
- Parameters
-
| mesh | The Mesh object to populate. |
| shapes | The vector of shapes loaded from the OBJ file. |
| shape | The index of the current shape being processed. |
| face_vertices | The number of vertices in the current face. |
| index_offset | The offset in the index array for the current face. |
- See also
- Component::Mesh
◆ SetMaterialProperties()
| void Object::OBJLoader::SetMaterialProperties |
( |
Component::Material & | material, |
|
|
const tinyobj::material_t & | mat ) |
|
privatenoexcept |
Sets the properties of a material according to the tinyobj::material_t structure.
- Parameters
-
| material | The Material object to populate. |
| mat | The tinyobj::material_t object containing the material properties. |
◆ _materials
◆ _mesh
◆ _reader
| tinyobj::ObjReader Object::OBJLoader::_reader |
|
private |
◆ _reader_config
| tinyobj::ObjReaderConfig Object::OBJLoader::_reader_config |
|
private |
◆ _shapes
The documentation for this class was generated from the following files: