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 Types | Private Attributes | List of all members
SimpleMeshes Class Reference

#include <SimpleMesh.hpp>

Public Member Functions

 SimpleMeshes (Application *app)
 
template<typename t_fnc >
SimpleMeshcreate (string const &name, t_fnc fnc)
 
SimpleMeshget (string const &name)
 
void drawAll (DrawArgs &args)
 

Private Types

typedef map< string,
unique_ptr< SimpleMesh > > 
mesh_map
 

Private Attributes

mesh_map m_meshes
 
Applicationm_app
 
Shaderm_shader
 

Detailed Description

SimpleMeshes is a collection of SimpleMesh-instances. It manages the creation, accessing, destruction and rendering of these.

Definition at line 147 of file SimpleMesh.hpp.

Member Typedef Documentation

typedef map<string,unique_ptr<SimpleMesh> > mesh_map
private

Definition at line 149 of file SimpleMesh.hpp.

Constructor & Destructor Documentation

Constructs a SimpleMeshes instance.

Parameters
appThe global application

Definition at line 157 of file SimpleMesh.cpp.

Member Function Documentation

SimpleMesh* create ( string const &  name,
t_fnc  fnc 
)
inline

Creates a new SimpleMesh and returns it.

Parameters
nameThe name of the mesh
fncA function that takes pointers to a vector of positions, normals, uvs and indicses and fills them
Returns
The created SimpleMesh.

Definition at line 169 of file SimpleMesh.hpp.

void drawAll ( DrawArgs args)

Draws all SimpleMesh-instances hosted by this object.

Parameters
argsThe DrawArgs that should be used for this rendering

Definition at line 186 of file SimpleMesh.cpp.

SimpleMesh * get ( string const &  name)

Accesses an existing SimpleMesh and returns it.

Parameters
nameThe name of the mesh
Returns
If the mesh was found it will be returned, otherwise nullptr is returned.

Definition at line 176 of file SimpleMesh.cpp.

Member Data Documentation

Application* m_app
private

The global application

Definition at line 152 of file SimpleMesh.hpp.

mesh_map m_meshes
private

A map of meshes indiced by their name

Definition at line 151 of file SimpleMesh.hpp.

Shader* m_shader
private

The shader which is used to render all SimpleMesh objects

Definition at line 153 of file SimpleMesh.hpp.


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