public class ModelLibrary extends AssetLibrary<ModelReaderSettings,AsyncModel>
AsyncModel| Constructor and Description |
|---|
ModelLibrary() |
ModelLibrary(boolean concurrent) |
ModelLibrary(boolean concurrent,
boolean soft) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ModelReaderSettings assetKey,
AsyncModel asset)
Add an asset to the library.
|
boolean |
contains(java.lang.String id) |
void |
destroy(IGL gl,
AsyncModel asyncModel)
Destroy the specified model from this
ModelLibrary |
void |
destroyAll(IGL gl)
Destroy (unload + remove) all models from this
ModelLibrary |
void |
destroyUnreferenced(IGL gl)
Destroy (unload + remove) unreferenced models from this
ModelLibrary |
AsyncModel |
get(java.lang.String id) |
ModelReaderSettings |
getKey(java.lang.String id) |
void |
onContextLost() |
AsyncModel |
remove(java.lang.String id)
Remove the
AsyncModel with the specified id. |
void |
unloadAll(IGL gl)
Unload all models from this
ModelLibrary |
void |
unloadUnreferenced(IGL gl)
Unload unreferenced models from this
ModelLibrary |
AsyncModel |
use(AssetManager assets,
ModelReaderSettings settings)
AsyncModel.release() must be called on the result returned when it's not used anymore. |
assets, clear, contains, get, getKey, iterator, remove, removeValue, sizepublic ModelLibrary()
public ModelLibrary(boolean concurrent)
public ModelLibrary(boolean concurrent,
boolean soft)
public void add(ModelReaderSettings assetKey, AsyncModel asset) throws java.lang.IllegalArgumentException
AssetLibraryadd in class AssetLibrary<ModelReaderSettings,AsyncModel>assetKey - asset key, usually the loading informationasset - asset to store in the libraryjava.lang.IllegalArgumentException - when the asset is already in the librarypublic AsyncModel use(AssetManager assets, ModelReaderSettings settings)
AsyncModel.release() must be called on the result returned when it's not used anymore.assets - AssetManagersettings - ModelReaderSettings of the model to registerAsyncModel, with reference count incrementedpublic AsyncModel get(java.lang.String id)
id - name identifier for the keypublic ModelReaderSettings getKey(java.lang.String id)
id - name identifier for the keypublic AsyncModel remove(java.lang.String id)
id - name of the asset to removepublic boolean contains(java.lang.String id)
public final void destroyAll(IGL gl)
ModelLibrarypublic final void destroyUnreferenced(IGL gl)
ModelLibrarypublic final void unloadAll(IGL gl)
ModelLibrarypublic final void unloadUnreferenced(IGL gl)
ModelLibrarypublic final void destroy(IGL gl, AsyncModel asyncModel)
ModelLibrarypublic final void onContextLost()
Bonzai Engine 1.3.4 11/12/2015 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2015 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com