Carna  Version 3.3.2
Public Types | Public Member Functions | List of all members
Carna::base::Mesh< VertexType, IndexType > Class Template Reference

Implements MeshBase class for particular VertexType and IndexType. More...

#include <Mesh.h>

+ Inheritance diagram for Carna::base::Mesh< VertexType, IndexType >:
+ Collaboration diagram for Carna::base::Mesh< VertexType, IndexType >:

Public Types

typedef VertexType Vertex
 Holds the element type of the vertex buffer.
 
typedef IndexType Index
 Holds the element type of the index buffer.
 

Public Member Functions

 Mesh (Association< VertexBufferBase > *vertexBuffer, Association< IndexBufferBase > *indexBuffer)
 
- Public Member Functions inherited from Carna::base::MeshBase
 MeshBase (const VertexAttributes &va, Association< VertexBufferBase > *vertexBuffer, Association< IndexBufferBase > *indexBuffer)
 
virtual ~MeshBase ()
 Deletes. More...
 
void bind () const
 Binds the vertex array object. More...
 
void render () const
 Renders the mesh. More...
 
const VertexBufferBasevertexBuffer () const
 References the mesh's vertex buffer.
 
const IndexBufferBaseindexBuffer () const
 References the mesh's index buffer.
 
VertexBufferBasevertexBuffer ()
 References the mesh's vertex buffer.
 
IndexBufferBaseindexBuffer ()
 References the mesh's index buffer.
 

Additional Inherited Members

- Public Attributes inherited from Carna::base::MeshBase
const unsigned int id
 Holds the ID of the OpenGL vertex array object.
 
const GLContextglContext
 References the OpenGL context this mesh is valid within.
 

Detailed Description

template<typename VertexType, typename IndexType>
class Carna::base::Mesh< VertexType, IndexType >

Implements MeshBase class for particular VertexType and IndexType.

Parameters
VertexTypespecifies the vertex buffer format.
VertexTypespecifies the index buffer format.
See also
The MeshFactory class contains a few examples.
Author
Leonid Kostrykin
Date
22.2.15 - 24.3.15

Definition at line 135 of file Mesh.h.

Constructor & Destructor Documentation

◆ Mesh()

template<typename VertexType , typename IndexType >
Carna::base::Mesh< VertexType, IndexType >::Mesh ( Association< VertexBufferBase > *  vertexBuffer,
Association< IndexBufferBase > *  indexBuffer 
)

Creates new mesh. It is only valid within the current OpenGL context.

Definition at line 154 of file Mesh.h.


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