|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
Identifies a named mesh-like asset inside an asset file. More...
#include <AssetPath.h>
Public Member Functions | |
| MeshPath ()=default | |
| Creates an empty asset path. | |
| MeshPath (const std::filesystem::path &path, const std::string &assetName) | |
| Creates an asset path for a named asset in a file. | |
| MeshPath (MeshPath &&other) noexcept | |
| Move-constructs an asset path. | |
| MeshPath (const MeshPath &other) noexcept | |
| Copy-constructs an asset path. | |
| MeshPath & | operator= (const MeshPath &)=default |
| Copy-assigns an asset path. | |
| MeshPath & | operator= (MeshPath &&) noexcept=default |
| Move-assigns an asset path. | |
| const std::filesystem::path & | getFilePath () const |
| Gets the source file path. | |
| const std::string & | getAssetName () const |
| Gets the asset name inside the source file. | |
| std::string | getAssetHandle () const |
| Gets a combined string key for file path and asset name. | |
| std::size_t | hash () const noexcept |
| Calculates a hash for use in unordered containers. | |
| bool | empty () const |
| Checks whether this path doesn't point to anything. So it is empty. | |
| bool | operator== (const MeshPath &other) const |
| Compares two asset paths by file path and asset name. | |
| void | reset () |
| Clears the file path and asset name. | |
Private Attributes | |
| std::filesystem::path | filePath_ = "" |
| std::string | assetName_ = std::string("") |
Identifies a named mesh-like asset inside an asset file.
MeshPath combines the source file path with an asset name from that file. Mesh and material managers use it as a key when several assets are imported from the same glTF file.
Definition at line 40 of file AssetPath.h.
|
default |
Creates an empty asset path.
Referenced by MeshPath(), MeshPath(), operator=(), operator=(), and operator==().
| Asset::MeshPath::MeshPath | ( | const std::filesystem::path & | path, |
| const std::string & | assetName ) |
Creates an asset path for a named asset in a file.
| path | Source file that contains the asset. |
| assetName | Name of the asset inside the source file. |
|
noexcept |
Move-constructs an asset path.
| other | Asset path to move from. |
References MeshPath().
|
noexcept |
Copy-constructs an asset path.
| other | Asset path to copy from. |
References MeshPath().
|
inlinenodiscard |
Checks whether this path doesn't point to anything. So it is empty.
Definition at line 103 of file AssetPath.h.
References assetName_, empty(), and filePath_.
Referenced by empty().
|
inlinenodiscard |
Gets a combined string key for file path and asset name.
Definition at line 91 of file AssetPath.h.
References assetName_, and filePath_.
|
inlinenodiscard |
Gets the asset name inside the source file.
Definition at line 85 of file AssetPath.h.
References assetName_.
|
inlinenodiscard |
Gets the source file path.
Definition at line 79 of file AssetPath.h.
References filePath_, and getFilePath().
Referenced by getFilePath().
|
nodiscardnoexcept |
Calculates a hash for use in unordered containers.
|
inline |
Compares two asset paths by file path and asset name.
| other | Asset path to compare with. |
Definition at line 110 of file AssetPath.h.
References assetName_, filePath_, and MeshPath().
| void Asset::MeshPath::reset | ( | ) |
Clears the file path and asset name.
|
private |
Definition at line 121 of file AssetPath.h.
Referenced by empty(), getAssetHandle(), getAssetName(), and operator==().
|
private |
Definition at line 120 of file AssetPath.h.
Referenced by empty(), getAssetHandle(), getFilePath(), and operator==().