GluonGraphics::Mesh Class Reference
A collection of vertices that combine to an object.
More...
#include <mesh.h>
List of all members.
Detailed Description
A collection of vertices that combine to an object.
A mesh contains all the vertex data of an object. This vertex data is used to render triangles on the screen.
Definition at line 41 of file mesh.h.
Constructor & Destructor Documentation
Mesh::Mesh |
( |
QObject * |
parent = 0 |
) |
|
Mesh::~Mesh |
( |
|
) |
[virtual] |
Member Function Documentation
void Mesh::createBuffer |
( |
const QVector< float > & |
vertices, |
|
|
const QVector< float > & |
colors, |
|
|
const QVector< float > & |
uvs | |
|
) |
| | [protected, virtual] |
Create an OpenGL buffer to store data and store the data passed as arguments.
- Parameters:
-
| vertices | The vertex positions to store in the buffer. - Parameters:
-
| colors | The vertex colors to store in the buffer. - Parameters:
-
| uvs | The UV coordinate data to store in the buffer. |
|
|
Definition at line 121 of file mesh.cpp.
bool Mesh::isLoaded |
( |
|
) |
[virtual] |
Has this mesh been loaded yet?
Definition at line 115 of file mesh.cpp.
void Mesh::load |
( |
const QString & |
filename |
) |
[virtual] |
Load the data for this mesh.
- Parameters:
-
| filename | The name of the file to load. |
Definition at line 69 of file mesh.cpp.
Render this mesh to the screen.
- Parameters:
-
| material | The material used to render the mesh. This is only used to determine vertex attribute locations in the program. |
Definition at line 109 of file mesh.cpp.
Render the local OpenGL buffer.
- Parameters:
-
| mode | The OpenGL mode to use, for example GL_TRIAGLES. - Parameters:
-
| count | The number of vertices to render. - Parameters:
-
| material | The material to get attribute locations from. |
|
|
Definition at line 135 of file mesh.cpp.
The documentation for this class was generated from the following files: