Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Assets::Mesh Class Reference

The mesh asset stores geometry data and. More...

#include <MeshAsset.h>

Inheritance diagram for Engine::Assets::Mesh:
Collaboration diagram for Engine::Assets::Mesh:

Public Member Functions

 Mesh (bool initEcsData=false)
 Creates a mesh asset and optionally initializes ECS-backed asset data.
void unload () override
 Unloads all data and clears the ecs objects.
Ecs::MeshPrimitiveData * getMeshPrimitiveData ()
 Gets the mesh data for this asset.
Public Member Functions inherited from Asset::AssetBase
 AssetBase (bool initializeDefaultEntity=false)
 Creates a base asset and optionally allocates its default ECS entity.
virtual ~AssetBase ()
 Releases base asset resources.
CpuLoadingState getLoadingState ()
 Gets the loading state of this asset.
void requestLoad ()
 If this asset is in the UNLOADED state it will get added to the assets to load.
entt::entity getEntity () const
 Getter for data.

Protected Member Functions

void updateLoadingState () override
 Updates the loading state of the asset based on the existence of the ECS components.

Additional Inherited Members

Protected Attributes inherited from Asset::AssetBase
CpuLoadingState loadingState = UNLOADED
 Current CPU loading state.
entt::registry & mainRegistry
 Registry that owns this asset's ECS data.
entt::entity data
 Entity containing the asset's component data.

Detailed Description

The mesh asset stores geometry data and.

Definition at line 19 of file MeshAsset.h.

Constructor & Destructor Documentation

◆ Mesh()

Engine::Assets::Mesh::Mesh ( bool initEcsData = false)

Creates a mesh asset and optionally initializes ECS-backed asset data.

Parameters
initEcsDataWhen true, initializes the base asset's ECS data entity.

Member Function Documentation

◆ getMeshPrimitiveData()

Ecs::MeshPrimitiveData * Engine::Assets::Mesh::getMeshPrimitiveData ( )

Gets the mesh data for this asset.

Returns
returns std::nullopt if the mesh data is in state Asset::LoadingState::UNLOADED

◆ unload()

void Engine::Assets::Mesh::unload ( )
overridevirtual

Unloads all data and clears the ecs objects.

Reimplemented from Asset::AssetBase.

◆ updateLoadingState()

void Engine::Assets::Mesh::updateLoadingState ( )
overrideprotectedvirtual

Updates the loading state of the asset based on the existence of the ECS components.

Reimplemented from Asset::AssetBase.


The documentation for this class was generated from the following file:
  • /workspace/magerbeton/gl3-vulkan/code/Engine/include/Engine/Mesh/MeshAsset.h