SP3-13 Assets Management #92
|
@ -255,6 +255,26 @@ namespace SHADE
|
|||
return result;
|
||||
}
|
||||
|
||||
SHMeshAsset const* SHAssetManager::GetMesh(AssetID id) noexcept
|
||||
{
|
||||
if (meshCollection.find(id) == meshCollection.end())
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return &meshCollection[id];
|
||||
}
|
||||
|
||||
SHTextureAsset const* SHAssetManager::GetTexture(AssetID id) noexcept
|
||||
{
|
||||
if (textureCollection.find(id) == textureCollection.end())
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return &textureCollection[id];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* \param Path for meta data file
|
||||
* \param Path for asset file
|
||||
|
|
|
@ -75,6 +75,8 @@ namespace SHADE
|
|||
static std::vector<SHMeshAsset> GetAllMeshes() noexcept;
|
||||
static std::vector<SHTextureAsset> GetAllTextures() noexcept;
|
||||
|
||||
static SHMeshAsset const* GetMesh(AssetID id) noexcept;
|
||||
static SHTextureAsset const* GetTexture(AssetID id) noexcept;
|
||||
private:
|
||||
/****************************************************************************
|
||||
* \brief Load resource data into memory
|
||||
|
|
Loading…
Reference in New Issue