|
matf-rg-engine
1.0.0
Base for project for the Computer Graphics course at Faculty of Mathematics, University of Belgrade
|
Represents a model object within the OpenGL context as an array of Mesh objects. More...
#include <Model.hpp>
Public Member Functions | |
| void | draw (const Shader *shader) |
| Draws the model using a given shader by drawing all the meshes in the model. More... | |
| void | destroy () |
| Destroys the model in the OpenGL context. More... | |
| const std::vector< Mesh > & | meshes () const |
| Returns the meshes in the model. More... | |
| const std::filesystem::path & | path () const |
| Returns the path to the model file from which the model was loaded. More... | |
| const std::string & | name () const |
| Returns the name of the model by which it can be referenced using the engine::resources::ResourcesController::model function. More... | |
Private Member Functions | |
| Model ()=default | |
| Model (std::vector< Mesh > meshes, std::filesystem::path path, std::string name) | |
| Constructs a Model object. Used internally by the engine::resources::ResourcesController class. You are not supposed to call this constructor directly from user code. More... | |
Private Attributes | |
| std::vector< Mesh > | m_meshes |
| The meshes in the model. More... | |
| std::filesystem::path | m_path |
| The path to the model file from which the model was loaded. More... | |
| std::string | m_name |
| The name of the model by which it can be referenced using the engine::resources::ResourcesController::model function. More... | |
Friends | |
| class | ResourcesController |
Represents a model object within the OpenGL context as an array of Mesh objects.
|
privatedefault |
|
inlineprivate |
Constructs a Model object. Used internally by the engine::resources::ResourcesController class. You are not supposed to call this constructor directly from user code.
| meshes | The meshes in the model. |
| path | The path to the model file from which the model was loaded. |
| name | The name of the model by which it can be referenced using the engine::resources::ResourcesController::model function. |
| void engine::resources::Model::draw | ( | const Shader * | shader | ) |
Draws the model using a given shader by drawing all the meshes in the model.
| shader | The shader to use for drawing. |
| void engine::resources::Model::destroy | ( | ) |
Destroys the model in the OpenGL context.
|
inline |
Returns the meshes in the model.
|
inline |
Returns the path to the model file from which the model was loaded.
|
inline |
Returns the name of the model by which it can be referenced using the engine::resources::ResourcesController::model function.
|
friend |
|
private |
The meshes in the model.
|
private |
The path to the model file from which the model was loaded.
|
private |
The name of the model by which it can be referenced using the engine::resources::ResourcesController::model function.