Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
MeshSoA Struct Reference

Structure of Arrays representing mesh buffers and geometry information. More...

#include <MeshSoA.hpp>

Public Member Functions

size_t push (const std::vector< Vertex > &verts, const std::vector< uint32_t > &inds)
 Pushes a new mesh geometry configuration.
void clear ()
 Safely destroys and clears all allocated Vulkan buffers.

Public Attributes

std::vector< uint32_t > ids
 Unique mesh IDs.
std::vector< std::vector< Vertex > > vertices
 Arrays of vertices for each mesh.
std::vector< std::vector< uint32_t > > indices
 Arrays of indices for each mesh.
std::vector< VulkanBuffer > vertexBuffers
 Allocated Vulkan vertex buffers.
std::vector< VulkanBuffer > indexBuffers
 Allocated Vulkan index buffers.

Detailed Description

Structure of Arrays representing mesh buffers and geometry information.

Member Function Documentation

◆ clear()

void MeshSoA::clear ( )
inline

Safely destroys and clears all allocated Vulkan buffers.

◆ push()

size_t MeshSoA::push ( const std::vector< Vertex > & verts,
const std::vector< uint32_t > & inds )
inline

Pushes a new mesh geometry configuration.

Parameters
vertsList of vertices.
indsList of indices.
Returns
The index of the added mesh configuration.

Member Data Documentation

◆ ids

std::vector<uint32_t> MeshSoA::ids

Unique mesh IDs.

◆ indexBuffers

std::vector<VulkanBuffer> MeshSoA::indexBuffers

Allocated Vulkan index buffers.

◆ indices

std::vector<std::vector<uint32_t> > MeshSoA::indices

Arrays of indices for each mesh.

◆ vertexBuffers

std::vector<VulkanBuffer> MeshSoA::vertexBuffers

Allocated Vulkan vertex buffers.

◆ vertices

std::vector<std::vector<Vertex> > MeshSoA::vertices

Arrays of vertices for each mesh.


The documentation for this struct was generated from the following file: