public abstract class ModelLoader<P extends ModelLoader.ModelParameters> extends AsynchronousAssetLoader<Model,P>
| Modifier and Type | Class and Description |
|---|---|
static class |
ModelLoader.ModelParameters |
| Modifier and Type | Field and Description |
|---|---|
protected ModelLoader.ModelParameters |
defaultParameters |
protected Array<ObjectMap.Entry<java.lang.String,ModelData>> |
items |
| Constructor and Description |
|---|
ModelLoader(FileHandleResolver resolver) |
| Modifier and Type | Method and Description |
|---|---|
Array<AssetDescriptor> |
getDependencies(java.lang.String fileName,
FileHandle file,
P parameters)
Returns the assets this asset requires to be loaded first.
|
void |
loadAsync(AssetManager manager,
java.lang.String fileName,
FileHandle file,
P parameters)
Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.
|
Model |
loadModel(FileHandle fileHandle)
Directly load the model on the calling thread.
|
Model |
loadModel(FileHandle fileHandle,
P parameters)
Directly load the model on the calling thread.
|
Model |
loadModel(FileHandle fileHandle,
TextureProvider textureProvider)
Directly load the model on the calling thread.
|
Model |
loadModel(FileHandle fileHandle,
TextureProvider textureProvider,
P parameters)
Directly load the model on the calling thread.
|
ModelData |
loadModelData(FileHandle fileHandle)
Directly load the raw model data on the calling thread.
|
abstract ModelData |
loadModelData(FileHandle fileHandle,
P parameters)
Directly load the raw model data on the calling thread.
|
Model |
loadSync(AssetManager manager,
java.lang.String fileName,
FileHandle file,
P parameters)
Loads the OpenGL part of the asset.
|
resolveprotected Array<ObjectMap.Entry<java.lang.String,ModelData>> items
protected ModelLoader.ModelParameters defaultParameters
public ModelLoader(FileHandleResolver resolver)
public abstract ModelData loadModelData(FileHandle fileHandle, P parameters)
public ModelData loadModelData(FileHandle fileHandle)
public Model loadModel(FileHandle fileHandle, TextureProvider textureProvider, P parameters)
AssetManager.public Model loadModel(FileHandle fileHandle, P parameters)
AssetManager.public Model loadModel(FileHandle fileHandle, TextureProvider textureProvider)
AssetManager.public Model loadModel(FileHandle fileHandle)
AssetManager.public Array<AssetDescriptor> getDependencies(java.lang.String fileName, FileHandle file, P parameters)
AssetLoadergetDependencies in class AssetLoader<Model,P extends ModelLoader.ModelParameters>fileName - name of the asset to loadfile - the resolved file to loadparameters - parameters for loading the assetpublic void loadAsync(AssetManager manager, java.lang.String fileName, FileHandle file, P parameters)
AsynchronousAssetLoaderloadAsync in class AsynchronousAssetLoader<Model,P extends ModelLoader.ModelParameters>fileName - the name of the asset to loadfile - the resolved file to loadparameters - the parameters to use for loading the assetpublic Model loadSync(AssetManager manager, java.lang.String fileName, FileHandle file, P parameters)
AsynchronousAssetLoaderloadSync in class AsynchronousAssetLoader<Model,P extends ModelLoader.ModelParameters>file - the resolved file to load