Represents a single material imported from a 3D model file.
More...
#include <model_material.hpp>
Represents a single material imported from a 3D model file.
A ModelMaterial acts as a lightweight wrapper around Assimp's aiMaterial, extracting and storing references to texture file paths per texture type.
- Note
- Multiple meshes within a model may reference the same ModelMaterial.
- See also
- Model, TextureType
Definition at line 51 of file model_material.hpp.
◆ ModelMaterial() [1/3]
| rendering_engine::ModelMaterial::ModelMaterial |
( |
Model & | model | ) |
|
|
explicit |
Constructs an empty material associated with a model.
- Parameters
-
| model | Reference to the owning Model instance. |
Definition at line 21 of file model_material.cpp.
22 :
23 mModel(&model)
24{
25}
◆ ModelMaterial() [2/3]
| rendering_engine::ModelMaterial::ModelMaterial |
( |
const ModelMaterial & | | ) |
|
|
default |
◆ ModelMaterial() [3/3]
| rendering_engine::ModelMaterial::ModelMaterial |
( |
ModelMaterial && | | ) |
|
|
default |
◆ ~ModelMaterial()
| rendering_engine::ModelMaterial::~ModelMaterial |
( |
| ) |
|
|
default |
◆ GetModel()
| Model & rendering_engine::ModelMaterial::GetModel |
( |
| ) |
|
Returns a reference to the owning Model.
- Returns
- Reference to the parent Model instance.
Definition at line 27 of file model_material.cpp.
28{
29 return *mModel;
30}
◆ Name()
| const std::string & rendering_engine::ModelMaterial::Name |
( |
| ) |
const |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ Textures()
| const std::map< TextureType, std::vector< std::string > > rendering_engine::ModelMaterial::Textures |
( |
| ) |
const |
Retrieves the list of textures associated with each texture type.
Each entry in the map corresponds to one TextureType key (e.g., Diffuse, NormalMap) and a list of texture file paths associated with that type.
- Returns
- A map of texture types to vectors of texture file paths.
Definition at line 37 of file model_material.cpp.
38{
39 return mTextures;
40}
◆ Model
The documentation for this class was generated from the following files: