LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
LibCarna::base::Mesh< VertexType, IndexType > Class Template Reference

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

#include <Mesh.hpp>

+ Inheritance diagram for LibCarna::base::Mesh< VertexType, IndexType >:
+ Collaboration diagram for LibCarna::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 LibCarna::base::MeshBase
 MeshBase (const VertexAttributes &va, Association< VertexBufferBase > *vertexBuffer, Association< IndexBufferBase > *indexBuffer)
 
virtual ~MeshBase () noexcept(false)
 Deletes.
 
void bind () const
 Binds the vertex array object.
 
void render () const
 Renders the mesh.
 
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 LibCarna::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 LibCarna::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

Definition at line 137 of file Mesh.hpp.

Member Typedef Documentation

◆ Index

Holds the element type of the index buffer.

Definition at line 149 of file Mesh.hpp.

◆ Vertex

Holds the element type of the vertex buffer.

Definition at line 148 of file Mesh.hpp.

Constructor & Destructor Documentation

◆ Mesh()

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

Definition at line 155 of file Mesh.hpp.


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