Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | Friends | List of all members
Scene::Mesh Class Reference

Public Member Functions

 Mesh (Scene *scene, string const &name, GLuint const baseIdx, GLuint const idxCount, Material *material)
 
void drawInstances (Shader *shader, set< SceneInstance * > const &instances)
 

Private Attributes

Scenem_scene
 
string m_name
 
vector< int > m_nodeIndices
 
GLuint m_baseIndex
 
GLuint m_indexCount
 
Materialm_material
 

Friends

class Scene
 

Detailed Description

Scene::Mesh contains information about one Mesh in the scene. It does not host the vertex-data, since all vertices for a whole scene are stored into a single VBO.

Definition at line 134 of file Scene.hpp.

Constructor & Destructor Documentation

Mesh ( Scene scene,
string const &  name,
GLuint const  baseIdx,
GLuint const  idxCount,
Material material 
)

Constructs a Scene::Mesh.

Parameters
sceneThe scene this mesh belongs to
nameThe name of the mesh
baseIdxThe index with wich the vertex-data for this mesh starts
idxCountThe index-count for vertex-data that is used by this mesh
materialThe material for this mesh

Definition at line 727 of file Scene.cpp.

Member Function Documentation

void drawInstances ( Shader shader,
set< SceneInstance * > const &  instances 
)

Draws this mesh for all instances of the scene.

Parameters
shaderThe shader that is used for drawing.
instancesA set of all instances to be drawn.

Definition at line 734 of file Scene.cpp.

Friends And Related Function Documentation

friend class Scene
friend

Definition at line 146 of file Scene.hpp.

Member Data Documentation

GLuint m_baseIndex
private

The index with wich the vertex-data for this mesh starts

Definition at line 141 of file Scene.hpp.

GLuint m_indexCount
private

The index-count for vertex-data that is used by this mesh

Definition at line 142 of file Scene.hpp.

Material* m_material
private

The material for this mesh

Definition at line 144 of file Scene.hpp.

string m_name
private

The name of the mesh

Definition at line 137 of file Scene.hpp.

vector<int> m_nodeIndices
private

The indices of the scene-nodes that are used by this mesh

Definition at line 139 of file Scene.hpp.

Scene* m_scene
private

The scene this mesh belongs to

Definition at line 136 of file Scene.hpp.


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