|
| | MeshManager (VulkanContext &context, std::unique_ptr< VulkanResources > &resources, VirtualFileSystem *vfs) |
| | Constructor for MeshManager.
|
| void | init (Engine *engine) |
| | Initialize the MeshManager.
|
| MeshComponent | loadMesh (const std::string &path) |
| | Loads mesh from a file, creates vulkan mesh and returns a MeshComponent.
|
| ModelObject * | createModel (const std::string &name, MeshComponent meshComponent, TransformComponent transformComponent, vex::Entity parent) |
| | Creates a model object from a mesh component, transform component, and parent entity.
|
| void | destroyModel (std::string &name, MeshComponent meshComponent) |
| | Destroys a model object by name and mesh component.
|
| void | registerVulkanMesh (MeshComponent &meshComponent) |
| | Registers a Vulkan mesh component.
|
| std::unique_ptr< VulkanMesh > & | getVulkanMeshByMesh (MeshComponent &meshComponent) |
| | Retrieves a Vulkan mesh by mesh component.
|
| void | loadMeshesAsync (const std::vector< MeshComponent * > &pendingComponents) |
| | Loads meshes asynchronously from the given paths.
|
| bool | isMeshLoaded (const std::string &path) const |
| | Checks if a mesh is loaded by path.
|
| void | clearState () |
| | Clears the state of the mesh manager, resetting model IDs and clearing the mesh map.
|
Definition at line 22 of file MeshManager.hpp.
◆ MeshManager()
Constructor for MeshManager.
- Parameters
-
| VulkanContext& | context |
| std::unique_ptr<VulkanResources>& | resources |
| VirtualFileSystem* | vfs |
Definition at line 18 of file MeshManager.cpp.
◆ ~MeshManager()
| vex::MeshManager::~MeshManager |
( |
| ) |
|
◆ clearState()
| void vex::MeshManager::clearState |
( |
| ) |
|
Clears the state of the mesh manager, resetting model IDs and clearing the mesh map.
Definition at line 284 of file MeshManager.cpp.
◆ createModel()
Creates a model object from a mesh component, transform component, and parent entity.
- Parameters
-
- Returns
- ModelObject*
Definition at line 28 of file MeshManager.cpp.
◆ destroyModel()
| void vex::MeshManager::destroyModel |
( |
std::string & | name, |
|
|
MeshComponent | meshComponent ) |
Destroys a model object by name and mesh component.
- Parameters
-
Definition at line 367 of file MeshManager.cpp.
◆ getVulkanMeshByMesh()
Retrieves a Vulkan mesh by mesh component.
- Parameters
-
| MeshComponent& | meshComponent |
- Returns
- std::unique_ptr<VulkanMesh>&
Definition at line 116 of file MeshManager.cpp.
◆ init()
| void vex::MeshManager::init |
( |
Engine * | engine | ) |
|
|
inline |
◆ isMeshLoaded()
| bool vex::MeshManager::isMeshLoaded |
( |
const std::string & | path | ) |
const |
|
inline |
Checks if a mesh is loaded by path.
- Parameters
-
- Returns
- bool
Definition at line 79 of file MeshManager.hpp.
◆ loadMesh()
| MeshComponent vex::MeshManager::loadMesh |
( |
const std::string & | path | ) |
|
◆ loadMeshesAsync()
| void vex::MeshManager::loadMeshesAsync |
( |
const std::vector< MeshComponent * > & | pendingComponents | ) |
|
Loads meshes asynchronously from the given paths.
- Parameters
-
| const | std::vector<MeshComponent*>& pendingComponents |
Definition at line 221 of file MeshManager.cpp.
◆ onMeshComponentConstruct()
Internally handles the construction of a mesh component called by entt callbacks.
Definition at line 292 of file MeshManager.cpp.
◆ onMeshComponentDestroy()
Internally handles the destruction of a mesh component called by entt callbacks.
Definition at line 323 of file MeshManager.cpp.
◆ registerVulkanMesh()
| void vex::MeshManager::registerVulkanMesh |
( |
MeshComponent & | meshComponent | ) |
|
Registers a Vulkan mesh component.
- Parameters
-
| MeshComponent& | meshComponent |
Definition at line 155 of file MeshManager.cpp.
◆ releaseMeshReference()
| void vex::MeshManager::releaseMeshReference |
( |
const std::string & | path, |
|
|
MeshComponent & | ownerComp ) |
|
private |
Internally handles the release of a mesh reference called by entt callbacks.
Definition at line 346 of file MeshManager.cpp.
◆ m_freeModelIds
| std::vector<uint32_t> vex::MeshManager::m_freeModelIds |
|
private |
◆ m_installedPaths
| std::unordered_map<uint32_t, std::string> vex::MeshManager::m_installedPaths |
|
private |
◆ m_meshBoundsCache
| std::unordered_map<std::string, std::pair<glm::vec3, float> > vex::MeshManager::m_meshBoundsCache |
|
private |
◆ m_nextModelId
| uint32_t vex::MeshManager::m_nextModelId = 0 |
|
private |
◆ m_p_engine
| Engine* vex::MeshManager::m_p_engine = nullptr |
|
private |
◆ m_p_resources
◆ m_r_context
◆ m_vfs
◆ m_vulkanMeshes
| vex_map<std::string, std::unique_ptr<VulkanMesh> > vex::MeshManager::m_vulkanMeshes |
|
private |
The documentation for this class was generated from the following files: