Models Class Reference

this class contains all meshes required for the game level we use this as we only need to load meshes once but may need to attach to many objects in our game More...

#include <Models.h>

List of all members.

Public Member Functions

 Models ()
 our ctor
 ~Models ()
 our dtor this will clear the models and remove all of the meshes created
void addModel (const std::string &_name, const std::string &_mesh)
 add a mesh with no texture
void addModel (const std::string &_name, const std::string &_mesh, const std::string &_texture)
 add a mesh with a texture
ngl::Obj * getModel (std::string _name)
 accesor to the model, incase the caller wishes to modify the mesh etc
void draw (std::string _name) const
 method to draw the mesh, all tx must be executed before the call to draw

Private Attributes

std::map< std::string, ngl::Obj * > m_models
 a map to hold our meshes by name

Detailed Description

this class contains all meshes required for the game level we use this as we only need to load meshes once but may need to attach to many objects in our game

Definition at line 18 of file Models.h.


Constructor & Destructor Documentation

Models::Models (  )  [inline]

our ctor

Definition at line 22 of file Models.h.

00022 {;}

Models::~Models (  ) 

our dtor this will clear the models and remove all of the meshes created


Member Function Documentation

void Models::addModel ( const std::string &  _name,
const std::string &  _mesh,
const std::string &  _texture 
)

add a mesh with a texture

Parameters:
[in] the name of the model we wish to use for lookup
[in] the path / name of the mesh
[in] the path / name of the texture
void Models::addModel ( const std::string &  _name,
const std::string &  _mesh 
)

add a mesh with no texture

Parameters:
[in] the name of the model we wish to use for lookup
[in] the path / name of the mesh
void Models::draw ( std::string  _name  )  const

method to draw the mesh, all tx must be executed before the call to draw

Parameters:
[in] the name of the mesh to draw
ngl::Obj* Models::getModel ( std::string  _name  ) 

accesor to the model, incase the caller wishes to modify the mesh etc

Here is the caller graph for this function:


Member Data Documentation

std::map<std::string, ngl::Obj *> Models::m_models [private]

a map to hold our meshes by name

Definition at line 51 of file Models.h.


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

Generated on 16 Aug 2013 for Multi-AgentSystem by  doxygen 1.6.1