le3d - LightEngine 3D
A straightforward C++ 3D software engine for real-time graphics
Classes | Public Member Functions | Public Attributes | List of all members
LeMeshCache Class Reference

Cache and inventory all meshes loaded. More...

#include <meshcache.h>

Classes

struct  Slot
 represents a mesh cache slot More...
 

Public Member Functions

 LeMeshCache ()
 
 ~LeMeshCache ()
 
void clean ()
 Unload all resources in cache and remove entries. More...
 
void loadDirectory (const char *path)
 Load in cache all the recognized mesh files from the given directory. More...
 
LeMeshloadOBJ (const char *path)
 Load a OBJ file of given path and apply transforms. More...
 
int getSlotFromName (const char *name)
 Retrieve a mesh slot index from a mesh name or path. More...
 
LeMeshgetMeshFromName (const char *path)
 Retrieve a mesh object from its name or path. More...
 

Public Attributes

Slot cacheSlots [LE_MESHCACHE_SLOTS]
 
int noSlots
 

Detailed Description

Cache and inventory all meshes loaded.

Constructor & Destructor Documentation

LeMeshCache::LeMeshCache ( )
LeMeshCache::~LeMeshCache ( )

Member Function Documentation

void LeMeshCache::clean ( )

Unload all resources in cache and remove entries.

LeMesh * LeMeshCache::getMeshFromName ( const char *  path)

Retrieve a mesh object from its name or path.

Parameters
[in]pathmesh path or name
Returns
mesh object or default mesh if not found
int LeMeshCache::getSlotFromName ( const char *  path)

Retrieve a mesh slot index from a mesh name or path.

Parameters
[in]pathmesh path or name
Returns
cache slot number or 0 (default slot) if not found
void LeMeshCache::loadDirectory ( const char *  path)

Load in cache all the recognized mesh files from the given directory.

LeMesh * LeMeshCache::loadOBJ ( const char *  path)

Load a OBJ file of given path and apply transforms.

Parameters
[in]pathOBJ file path
Returns
pointer to a new mesh

Member Data Documentation

Slot LeMeshCache::cacheSlots[LE_MESHCACHE_SLOTS]

Slots in cache

int LeMeshCache::noSlots

Number of cacheSlots in cache


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