|
Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
|
Represents a mesh component that holds geometry data and its Vulkan buffers. More...
#include <Mesh.hpp>
Public Member Functions | |
| Mesh (const std::vector< Vertex > &verts={}, const std::vector< uint32_t > &inds={}, VkBuffer vBuf=VK_NULL_HANDLE, VkDeviceMemory vMem=VK_NULL_HANDLE, VkBuffer iBuf=VK_NULL_HANDLE, VkDeviceMemory iMem=VK_NULL_HANDLE) | |
| Construct a new Mesh object. | |
Public Attributes | |
| uint32_t | id = 0 |
| Unique identifier for this mesh. | |
| std::string | gltfPath |
| Target glTF/glb file path. | |
| int | primitiveIndex = -1 |
| Index of the primitive submesh in glTF. | |
| std::string | nodeName |
| Name of the node associated with this mesh. | |
| std::string | parentBoneName |
| Name of the parent bone/joint in glTF. | |
| std::vector< Vertex > | vertices |
| CPU-side vertex data. | |
| std::vector< uint32_t > | indices |
| CPU-side index data. | |
| VkBuffer | vertexBuffer { VK_NULL_HANDLE } |
| Vulkan buffer holding the vertex data. | |
| VkDeviceMemory | vertexBufferMemory { VK_NULL_HANDLE } |
| GPU memory backing the vertex buffer. | |
| VkBuffer | indexBuffer { VK_NULL_HANDLE } |
| Vulkan buffer holding the index data. | |
| VkDeviceMemory | indexBufferMemory { VK_NULL_HANDLE } |
| GPU memory backing the index data. | |
| bool | isSkinned = false |
| Whether this mesh has skin weights and is deformed on GPU. | |
| bool | visible = true |
| Whether this mesh should be rendered. | |
Represents a mesh component that holds geometry data and its Vulkan buffers.
|
inline |
Construct a new Mesh object.
| verts | List of vertices. |
| inds | List of indices. |
| vBuf | Vulkan vertex buffer. |
| vMem | GPU memory for vertex buffer. |
| iBuf | Vulkan index buffer. |
| iMem | GPU memory for index buffer. |
| std::string Mesh::gltfPath |
Target glTF/glb file path.
| uint32_t Mesh::id = 0 |
Unique identifier for this mesh.
| VkBuffer Mesh::indexBuffer { VK_NULL_HANDLE } |
Vulkan buffer holding the index data.
| VkDeviceMemory Mesh::indexBufferMemory { VK_NULL_HANDLE } |
GPU memory backing the index data.
| std::vector<uint32_t> Mesh::indices |
CPU-side index data.
| bool Mesh::isSkinned = false |
Whether this mesh has skin weights and is deformed on GPU.
| std::string Mesh::nodeName |
Name of the node associated with this mesh.
| std::string Mesh::parentBoneName |
Name of the parent bone/joint in glTF.
| int Mesh::primitiveIndex = -1 |
Index of the primitive submesh in glTF.
| VkBuffer Mesh::vertexBuffer { VK_NULL_HANDLE } |
Vulkan buffer holding the vertex data.
| VkDeviceMemory Mesh::vertexBufferMemory { VK_NULL_HANDLE } |
GPU memory backing the vertex buffer.
| std::vector<Vertex> Mesh::vertices |
CPU-side vertex data.
| bool Mesh::visible = true |
Whether this mesh should be rendered.