Merge pull request #92 from SHADE-DP/SP3-13-Assets-Manager
SP3-13 Assets Management Pushed functions to retrieve mesh and texture asset data
This commit is contained in:
commit
86f4125100
|
@ -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