#include <Mesh.h>

Public Member Functions | |
| Mesh () | |
| Standard constructor. | |
| Mesh (const Mesh &source) | |
| Copy Constructor. | |
| Mesh (const string &meshFilename, const string &textureFilename, const string &shaderFilename) | |
| Creates mesh from vef file. | |
| ~Mesh () | |
| Destructor. | |
| void | renderGl () |
| Draw the mesh. | |
| void | selectGl () |
| Picking rendering for OpenGL. | |
| void | setMaterial (const PhongMaterial &material) |
| Setter for Material. | |
| void | setTexture (const Texture &texture) |
| Setter for Texture. | |
| Shader | getShader () |
| Getter for Shader. | |
| virtual string | toString () const |
| Returns a textual representation. | |
| virtual string | className () const |
| Returns the class name of the object. | |
| virtual enum classId | classId () const |
| Returns the class id of the object. | |
Private Member Functions | |
| void | createVBO () |
| Creates a vertex buffer object for the mesh. | |
| void | calculateNormals () |
| Calculates the normals for each vertex. | |
Private Attributes | |
| Vbo | meshData |
| The triangle mesh data. | |
| PhongMaterial | material |
| Phong material properties. | |
| Texture | texDiffuse |
| Texture this mesh should use. | |
| Shader | shader |
| Shader this mesh should use. | |
| string | filename |
| Reference to file (for later reloads). | |
Contains the vertices, the triangle list and the normal list of the mesh
| Mesh::Mesh | ( | ) |
Standard constructor.
| Mesh::Mesh | ( | const Mesh & | source | ) |
Copy Constructor.
| Mesh::Mesh | ( | const string & | meshFilename, | |
| const string & | textureFilename, | |||
| const string & | shaderFilename | |||
| ) |
Creates mesh from vef file.
Opens and loads a bmm-file with a texture and shader
| Mesh::~Mesh | ( | ) |
Destructor.
| void Mesh::createVBO | ( | ) | [private] |
Creates a vertex buffer object for the mesh.
| void Mesh::calculateNormals | ( | ) | [private] |
Calculates the normals for each vertex.
| void Mesh::renderGl | ( | ) | [virtual] |
| void Mesh::selectGl | ( | ) | [virtual] |
| void Mesh::setMaterial | ( | const PhongMaterial & | material | ) |
Setter for Material.
Setter for Material
| string Mesh::toString | ( | ) | const [virtual] |
Returns a textual representation.
Reimplemented from Object3d.
| string Mesh::className | ( | ) | const [virtual] |
Returns the class name of the object.
Reimplemented from Object3d.
| enum classId Mesh::classId | ( | ) | const [virtual] |
Returns the class id of the object.
Reimplemented from Object3d.
Vbo Mesh::meshData [private] |
The triangle mesh data.
PhongMaterial Mesh::material [private] |
Phong material properties.
Texture Mesh::texDiffuse [private] |
Texture this mesh should use.
Shader Mesh::shader [private] |
Shader this mesh should use.
string Mesh::filename [private] |
Reference to file (for later reloads).
1.5.6