Falcon
Public Member Functions | Public Attributes | List of all members
Mesh Class Reference

#include <Mesh.h>

Inheritance diagram for Mesh:
Renderable

Public Member Functions

 Mesh ()
 
virtual ~Mesh ()
 
void Setup () override
 
void PreallocMatrixAmount (u32 maxMatrices)
 
void AddWorldMatrix (const glm::mat4 &mat)
 
void ClearWorldMatrices ()
 
u32 GetWorldMatrixAmount ()
 
void Bind () override
 
void GetVertexPositionsArray (std::vector< glm::vec3, fmemory::STLAllocator< glm::vec3 >> &) const
 
VertexBufferGetVB ()
 
VertexBufferGetVertexBuffer ()
 
void SetTransparent (bool transparent)
 
bool GetTransparent () const
 
- Public Member Functions inherited from Renderable
 Renderable ()
 
virtual ~Renderable ()
 
void SetMaterial (Material *mat)
 
MaterialGetMaterial () const
 

Public Attributes

boost::container::vector< u32, fmemory::STLAllocator< u32 > > m_indexArray
 
boost::container::vector< u32, fmemory::STLAllocator< u32 > > m_indexOffsets
 
- Public Attributes inherited from Renderable
boost::container::vector< Vertex, fmemory::STLAllocator< Vertex > > m_vertexArray
 

Additional Inherited Members

- Protected Attributes inherited from Renderable
Materialm_material = nullptr
 
VertexArraym_VAO = nullptr
 

Detailed Description

Mesh Class to store Mesh Data for Renderables.

Constructor & Destructor Documentation

◆ Mesh()

Mesh::Mesh ( )

Basic Mesh Constructor

◆ ~Mesh()

Mesh::~Mesh ( )
virtual

Mesh class Destructor.

Member Function Documentation

◆ AddWorldMatrix()

void Mesh::AddWorldMatrix ( const glm::mat4 &  mat)

Adds a world matrix to the list of matrices for instanced rendering

Parameters
mat- The world matrix to add

◆ Bind()

void Mesh::Bind ( )
overridevirtual

Binds the VertexArray object held by the mesh along with the relevant vertex and index buffer.

Reimplemented from Renderable.

◆ ClearWorldMatrices()

void Mesh::ClearWorldMatrices ( )

Clears the meshes world matrices

◆ GetTransparent()

bool Mesh::GetTransparent ( ) const
inline

◆ GetVB()

VertexBuffer* Mesh::GetVB ( )
inline

◆ GetVertexBuffer()

VertexBuffer* Mesh::GetVertexBuffer ( )
inline

◆ GetVertexPositionsArray()

void Mesh::GetVertexPositionsArray ( std::vector< glm::vec3, fmemory::STLAllocator< glm::vec3 >> &  vertPosArray) const

Returns the vertexArray into the vector passed.

Parameters
glm::vec3vector bufffer to copy data into.

◆ GetWorldMatrixAmount()

u32 Mesh::GetWorldMatrixAmount ( )

Gets the size of the world matrices array

Returns
The size of the world matrix array

◆ PreallocMatrixAmount()

void Mesh::PreallocMatrixAmount ( u32  maxMatrices)

Preallocates the world matrix vector with a specified size

Parameters
maxMatrices- The maximum number of items in the world

◆ SetTransparent()

void Mesh::SetTransparent ( bool  transparent)
inline

◆ Setup()

void Mesh::Setup ( )
overridevirtual

Sets a vertex Array Object with the vertex and indexbuffer values in this mesh class.

Reimplemented from Renderable.

Member Data Documentation

◆ m_indexArray

boost::container::vector<u32, fmemory::STLAllocator<u32> > Mesh::m_indexArray

◆ m_indexOffsets

boost::container::vector<u32, fmemory::STLAllocator<u32> > Mesh::m_indexOffsets

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