An organized collection of vertex and index buffers along with rest of the model specific information which includes colors, texture coordinates and perhaps animation attributes.
More...
#include <Mesh.h>
|
| Mesh (std::shared_ptr< VertexBuffer > vertexBuffer, std::shared_ptr< IndexBuffer > indexBuffer, const std::string &meshName="NoName", MeshType mType=MeshType::Mesh) |
|
| Mesh (const std::string &filePath) |
|
virtual void | ProcessMesh (aiMesh *meshToProcess) |
|
void | ProcessNode (aiNode *nodeToProcess, const aiScene *theScene) |
|
std::shared_ptr< VertexBuffer > | GetVertexBuffer () const |
|
std::shared_ptr< IndexBuffer > | GetIndexBuffer () const |
|
void | SetVertexBuffer (std::shared_ptr< VertexBuffer > vBuffer) |
|
void | SetIndexBuffer (std::shared_ptr< IndexBuffer > iBuffer) |
|
|
static std::shared_ptr< Mesh > | ProcessTheRawMesh (aiMesh *meshToProcess, const std::string &mName="NoName") |
| Generate a layout (BufferLayout) for the supplied mesh.
|
|
static void | DealVertexIndexBufferData (float *&vertexData, uint32_t &vertexDataSize, uint32_t *&indexData, uint32_t &indexDataLength, aiMesh *meshToProcess, BufferLayout &buffLayout) |
| Routine for gauging the vertexbuffer data.
|
|
static void | GaugeVertexDataLayout (aiMesh *meshToProcess, BufferLayout &buffLayout) |
| Routine for extracting the format (BufferLayout) of vertexbuffer.
|
|
static float | LayoutElementToAttributeValue (unsigned int vertexNumber, uint32_t counter, aiMesh *meshToProcess, const BufferElement &layoutElem) |
|
static void | InitializeAttributeDictionary () |
|
|
std::shared_ptr< VertexBuffer > | m_VertexBuffer |
|
std::shared_ptr< IndexBuffer > | m_IndexBuffer |
|
std::string | m_MeshName |
|
MeshType | m_MeshType |
|
|
static std::shared_ptr< std::unordered_map< std::string, MeshAttribute > > | m_NameToAttributeDictionary = std::make_shared<std::unordered_map<std::string, MeshAttribute>>() |
|
An organized collection of vertex and index buffers along with rest of the model specific information which includes colors, texture coordinates and perhaps animation attributes.
◆ DealVertexIndexBufferData()
void Karma::Mesh::DealVertexIndexBufferData |
( |
float *& | vertexData, |
|
|
uint32_t & | vertexDataSize, |
|
|
uint32_t *& | indexData, |
|
|
uint32_t & | indexDataLength, |
|
|
aiMesh * | meshToProcess, |
|
|
BufferLayout & | buffLayout ) |
|
static |
Routine for gauging the vertexbuffer data.
- Parameters
-
vertexData | Reference to float array containing the vertexbuffer data |
vertexDataSize | Reference to the size (in bytes) of the vertex buffer (number of mesh vertices * each vertex attribute's size) |
indexData | Reference to the float containing the index buffer data |
indexDataLength | Reference to the total number of face indices of all the faces of the geometry |
meshToProcess | Reference to the mesh to be processed |
buffLayout | Reference to the buffer layout to be gauged ( |
- See also
- Mesh::GaugeVertexDataLayout)
- Since
- Karma 1.0.0
◆ GaugeVertexDataLayout()
void Karma::Mesh::GaugeVertexDataLayout |
( |
aiMesh * | meshToProcess, |
|
|
BufferLayout & | buffLayout ) |
|
static |
Routine for extracting the format (BufferLayout) of vertexbuffer.
- Parameters
-
meshToProcess | The mesh being analyzed |
buffLayout | Reference to the format |
- Since
- Karma 1.0.0
◆ ProcessMesh()
void Karma::Mesh::ProcessMesh |
( |
aiMesh * | meshToProcess | ) |
|
|
virtual |
◆ ProcessTheRawMesh()
std::shared_ptr< Mesh > Karma::Mesh::ProcessTheRawMesh |
( |
aiMesh * | meshToProcess, |
|
|
const std::string & | mName = "NoName" ) |
|
static |
Generate a layout (BufferLayout) for the supplied mesh.
- Parameters
-
meshToProcess | The Assimp mesh whose layout is to be generated |
mName | Mesh name |
- Since
- Karma 1.0.0
The documentation for this class was generated from the following files:
- Karma/src/Karma/Renderer/Mesh.h
- Karma/src/Karma/Renderer/Mesh.cpp