Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::Mesh Class Reference

#include <Mesh.h>

Collaboration diagram for EngineCore::Mesh:

Public Types

enum  TextureNames { COLOR = 0 }

Public Member Functions

 Mesh ()
 Mesh (GltfLoader::GltfMeshData meshData, ApplicationContext *context, Renderer *renderer)
 ~Mesh ()=default
void createResources ()
void cleanup ()
void reset ()
uint32_t getIndexCount () const
uint32_t getMeshletTriangleCount () const
uint32_t getMeshletCount () const
std::vector< MeshPrimitivegetPrimitives () const
const std::vector< MeshPrimitive > & getPrimitivesByReference () const
std::vector< MeshPrimitive > & getPrimitivesByReference ()
std::string getName () const
Transform getSceneTransform () const
float getBoundingSphereRadius () const
PipelineNames getShaderName () const
 Gets the name of the shader assigned to this object.

Static Public Member Functions

static uint32_t getTextureCount ()
static std::string createMeshName (const std::filesystem::path &path, const std::string &meshName)

Public Attributes

std::atomic< bool > isReady = false

Static Public Attributes

static const uint32_t textureCount = 1

Private Attributes

friend AssetManager
std::optional< PipelineNamesmaterialName
std::string name
float boundingSphereRadius = 0.0f
GltfLoader::GltfMeshData meshData
Rendererrenderer = nullptr
ApplicationContextcontext = nullptr
MaterialShader material
Engineengine = nullptr
Transform sceneTransform
std::vector< MeshPrimitivemeshPrimitives {}
uint32_t descriptorIndex = 0u

Detailed Description

Definition at line 25 of file Mesh.h.

Member Enumeration Documentation

◆ TextureNames

Enumerator
COLOR 

Definition at line 30 of file Mesh.h.

Constructor & Destructor Documentation

◆ Mesh() [1/2]

EngineCore::Mesh::Mesh ( )

Definition at line 14 of file Mesh.cpp.

References Mesh(), and meshData.

Referenced by Mesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mesh() [2/2]

EngineCore::Mesh::Mesh ( GltfLoader::GltfMeshData meshData,
ApplicationContext * context,
Renderer * renderer )

Definition at line 21 of file Mesh.cpp.

References context, getName(), meshData, name, and renderer.

Here is the call graph for this function:

◆ ~Mesh()

EngineCore::Mesh::~Mesh ( )
default

Member Function Documentation

◆ cleanup()

void EngineCore::Mesh::cleanup ( )

Definition at line 85 of file Mesh.cpp.

◆ createMeshName()

std::string EngineCore::Mesh::createMeshName ( const std::filesystem::path & path,
const std::string & meshName )
static

Definition at line 144 of file Mesh.cpp.

References name.

Referenced by EngineCore::AssetManager::registerMesh().

Here is the caller graph for this function:

◆ createResources()

void EngineCore::Mesh::createResources ( )

◆ getBoundingSphereRadius()

float EngineCore::Mesh::getBoundingSphereRadius ( ) const
nodiscard

Definition at line 156 of file Mesh.cpp.

References boundingSphereRadius.

◆ getIndexCount()

uint32_t EngineCore::Mesh::getIndexCount ( ) const
nodiscard

Definition at line 92 of file Mesh.cpp.

References meshPrimitives.

◆ getMeshletCount()

uint32_t EngineCore::Mesh::getMeshletCount ( ) const

Definition at line 113 of file Mesh.cpp.

References meshPrimitives, and TRACY_ZONE_SCOPED_NAMED.

◆ getMeshletTriangleCount()

uint32_t EngineCore::Mesh::getMeshletTriangleCount ( ) const

Definition at line 102 of file Mesh.cpp.

References meshPrimitives, and TRACY_ZONE_SCOPED_FUNCTION.

◆ getName()

std::string EngineCore::Mesh::getName ( ) const
nodiscard

Definition at line 139 of file Mesh.cpp.

References name.

Referenced by Mesh().

Here is the caller graph for this function:

◆ getPrimitives()

std::vector< MeshPrimitive > EngineCore::Mesh::getPrimitives ( ) const
nodiscard

Definition at line 124 of file Mesh.cpp.

References meshPrimitives.

◆ getPrimitivesByReference() [1/2]

std::vector< MeshPrimitive > & EngineCore::Mesh::getPrimitivesByReference ( )
nodiscard

Definition at line 134 of file Mesh.cpp.

References meshPrimitives.

◆ getPrimitivesByReference() [2/2]

const std::vector< MeshPrimitive > & EngineCore::Mesh::getPrimitivesByReference ( ) const
nodiscard

Definition at line 129 of file Mesh.cpp.

References meshPrimitives.

◆ getSceneTransform()

Transform EngineCore::Mesh::getSceneTransform ( ) const
nodiscard

Definition at line 151 of file Mesh.cpp.

References sceneTransform.

◆ getShaderName()

PipelineNames EngineCore::Mesh::getShaderName ( ) const

Gets the name of the shader assigned to this object.

Returns
The name of the material which is assigned to this object
Date
2025-09-21
Author
Konstantin Passig

Definition at line 161 of file Mesh.cpp.

References materialName, and EngineCore::NORMALS_SHADER.

◆ getTextureCount()

uint32_t EngineCore::Mesh::getTextureCount ( )
static

Definition at line 170 of file Mesh.cpp.

References textureCount.

Referenced by EngineCore::MeshLoaderGltf::useDefaultTexture().

Here is the caller graph for this function:

◆ reset()

void EngineCore::Mesh::reset ( )

Definition at line 87 of file Mesh.cpp.

References meshPrimitives.

Member Data Documentation

◆ AssetManager

friend EngineCore::Mesh::AssetManager
private

Definition at line 27 of file Mesh.h.

◆ boundingSphereRadius

float EngineCore::Mesh::boundingSphereRadius = 0.0f
private

Definition at line 74 of file Mesh.h.

Referenced by createResources(), and getBoundingSphereRadius().

◆ context

ApplicationContext* EngineCore::Mesh::context = nullptr
private

Definition at line 79 of file Mesh.h.

Referenced by createResources(), and Mesh().

◆ descriptorIndex

uint32_t EngineCore::Mesh::descriptorIndex = 0u
private

Definition at line 87 of file Mesh.h.

◆ engine

Engine* EngineCore::Mesh::engine = nullptr
private

Definition at line 82 of file Mesh.h.

◆ isReady

std::atomic<bool> EngineCore::Mesh::isReady = false

Definition at line 42 of file Mesh.h.

Referenced by createResources().

◆ material

MaterialShader EngineCore::Mesh::material
private

Definition at line 81 of file Mesh.h.

◆ materialName

std::optional<PipelineNames> EngineCore::Mesh::materialName
private

Definition at line 71 of file Mesh.h.

Referenced by getShaderName().

◆ meshData

GltfLoader::GltfMeshData EngineCore::Mesh::meshData
private

Definition at line 76 of file Mesh.h.

Referenced by createResources(), Mesh(), and Mesh().

◆ meshPrimitives

std::vector<MeshPrimitive> EngineCore::Mesh::meshPrimitives {}
private

◆ name

std::string EngineCore::Mesh::name
private

Definition at line 73 of file Mesh.h.

Referenced by createMeshName(), createResources(), getName(), and Mesh().

◆ renderer

Renderer* EngineCore::Mesh::renderer = nullptr
private

Definition at line 78 of file Mesh.h.

Referenced by createResources(), and Mesh().

◆ sceneTransform

Transform EngineCore::Mesh::sceneTransform
private

Definition at line 84 of file Mesh.h.

Referenced by createResources(), and getSceneTransform().

◆ textureCount

const uint32_t EngineCore::Mesh::textureCount = 1
static

Definition at line 29 of file Mesh.h.

Referenced by getTextureCount().


The documentation for this class was generated from the following files:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Mesh/Mesh.h
  • /home/magerbeton/Documents/gl3-vulkan/Engine/src/Engine/Mesh/Mesh.cpp