Represents a model object within the OpenGL context as an array of Mesh objects.
More...
#include <Model.hpp>
|
void | draw (const Shader *shader) |
| Draws the model using a given shader by drawing all the meshes in the model.
|
|
void | destroy () |
| Destroys the model in the OpenGL context.
|
|
const std::vector< Mesh > & | meshes () const |
| Returns the meshes in the model.
|
|
const std::filesystem::path & | path () const |
| Returns the path to the model file from which the model was loaded.
|
|
const std::string & | name () const |
| Returns the name of the model by which it can be referenced using the engine::resources::ResourcesController::model function.
|
|
Represents a model object within the OpenGL context as an array of Mesh objects.
◆ Model() [1/2]
engine::resources::Model::Model |
( |
| ) |
|
|
privatedefault |
◆ Model() [2/2]
engine::resources::Model::Model |
( |
std::vector< Mesh > |
meshes, |
|
|
std::filesystem::path |
path, |
|
|
std::string |
name |
|
) |
| |
|
inlineprivate |
◆ draw()
void engine::resources::Model::draw |
( |
const Shader * |
shader | ) |
|
Draws the model using a given shader by drawing all the meshes in the model.
- Parameters
-
shader | The shader to use for drawing. |
◆ destroy()
void engine::resources::Model::destroy |
( |
| ) |
|
Destroys the model in the OpenGL context.
◆ meshes()
const std::vector< Mesh > & engine::resources::Model::meshes |
( |
| ) |
const |
|
inline |
Returns the meshes in the model.
- Returns
- The meshes in the model.
◆ path()
const std::filesystem::path & engine::resources::Model::path |
( |
| ) |
const |
|
inline |
Returns the path to the model file from which the model was loaded.
- Returns
- The path to the model.
◆ name()
const std::string & engine::resources::Model::name |
( |
| ) |
const |
|
inline |
◆ ResourcesController
◆ m_meshes
std::vector<Mesh> engine::resources::Model::m_meshes |
|
private |
◆ m_path
std::filesystem::path engine::resources::Model::m_path |
|
private |
The path to the model file from which the model was loaded.
◆ m_name
std::string engine::resources::Model::m_name |
|
private |
The documentation for this class was generated from the following files: