cocos2d-x  3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MeshCache Class Reference

Mesh Cache. More...

#include <CCMesh.h>

Public Member Functions

MeshgetMesh (const std::string &key) const
 get mesh from cache More...
 
bool addMesh (const std::string &key, Mesh *mesh)
 add mesh to cache More...
 
void removeAllMeshes ()
 remove all meshes More...
 
void removeUnusedMesh ()
 remove unused meshes More...
 
void listenRendererRecreated (EventCustom *event)
 ~MeshCache ()

Static Public Member Functions

static MeshCachegetInstance ()
 get & destroy More...
 
static void destroyInstance ()

Public Attributes

CC_CONSTRUCTOR_ACCESS __pad0__: MeshCache()

Protected Attributes

std::unordered_map
< std::string, Mesh * > 
_meshes
EventListenerCustom_rendererRecreatedListener

Static Protected Attributes

static MeshCache_cacheInstance

Detailed Description

Mesh Cache.

Constructor & Destructor Documentation

~MeshCache ( )

Member Function Documentation

bool addMesh ( const std::string &  key,
Mesh mesh 
)

add mesh to cache

static void destroyInstance ( )
static
static MeshCache* getInstance ( )
static

get & destroy

Mesh* getMesh ( const std::string &  key) const

get mesh from cache

void listenRendererRecreated ( EventCustom event)
void removeAllMeshes ( )

remove all meshes

void removeUnusedMesh ( )

remove unused meshes

Member Data Documentation

MeshCache* _cacheInstance
staticprotected
std::unordered_map<std::string,
Mesh*> _meshes
protected
EventListenerCustom*
_rendererRecreatedListener
protected

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