Karma Engine
Loading...
Searching...
No Matches
Karma::Mesh Class Reference
Inheritance diagram for Karma::Mesh:

Public Member Functions

 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< VertexBufferGetVertexBuffer () const
 
std::shared_ptr< IndexBufferGetIndexBuffer () const
 
void SetVertexBuffer (std::shared_ptr< VertexBuffer > vBuffer)
 
void SetIndexBuffer (std::shared_ptr< IndexBuffer > iBuffer)
 

Static Public Member Functions

static std::shared_ptr< MeshProcessTheRawMesh (aiMesh *meshToProcess, const std::string &mName="NoName")
 
static void DealVertexIndexBufferData (float *&vertexData, uint32_t &vertexDataSize, uint32_t *&indexData, uint32_t &indexDataLength, aiMesh *meshToProcess, BufferLayout &buffLayout)
 
static void GaugeVertexDataLayout (aiMesh *meshToProcess, BufferLayout &buffLayout)
 
static float LayoutElementToAttributeValue (unsigned int vertexNumber, uint32_t counter, aiMesh *meshToProcess, const BufferElement &layoutElem)
 
static void InitializeAttributeDictionary ()
 

Protected Attributes

std::shared_ptr< VertexBufferm_VertexBuffer
 
std::shared_ptr< IndexBufferm_IndexBuffer
 
std::string m_MeshName
 
MeshType m_MeshType
 

Static Protected Attributes

static std::shared_ptr< std::unordered_map< std::string, MeshAttribute > > m_NameToAttributeDictionary = std::make_shared<std::unordered_map<std::string, MeshAttribute>>()
 

The documentation for this class was generated from the following files: