com.badlogic.gdx.assets.loaders
Class ModelLoader<P extends AssetLoaderParameters<Model>>

java.lang.Object
  extended by com.badlogic.gdx.assets.loaders.AssetLoader<T,P>
      extended by com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader<Model,P>
          extended by com.badlogic.gdx.assets.loaders.ModelLoader<P>
Direct Known Subclasses:
G3dModelLoader, ObjLoader

public abstract class ModelLoader<P extends AssetLoaderParameters<Model>>
extends AsynchronousAssetLoader<Model,P>


Constructor Summary
ModelLoader(FileHandleResolver resolver)
           
 
Method Summary
 Array<AssetDescriptor> getDependencies(String fileName, FileHandle file, P parameters)
          Returns the assets this asset requires to be loaded first.
 void loadAsync(AssetManager manager, 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, String fileName, FileHandle file, P parameters)
          Loads the OpenGL part of the asset.
 
Methods inherited from class com.badlogic.gdx.assets.loaders.AssetLoader
resolve
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelLoader

public ModelLoader(FileHandleResolver resolver)
Method Detail

loadModelData

public abstract ModelData loadModelData(FileHandle fileHandle,
                                        P parameters)
Directly load the raw model data on the calling thread.


loadModelData

public ModelData loadModelData(FileHandle fileHandle)
Directly load the raw model data on the calling thread.


loadModel

public Model loadModel(FileHandle fileHandle,
                       TextureProvider textureProvider,
                       P parameters)
Directly load the model on the calling thread. The model with not be managed by an AssetManager.


loadModel

public Model loadModel(FileHandle fileHandle,
                       P parameters)
Directly load the model on the calling thread. The model with not be managed by an AssetManager.


loadModel

public Model loadModel(FileHandle fileHandle,
                       TextureProvider textureProvider)
Directly load the model on the calling thread. The model with not be managed by an AssetManager.


loadModel

public Model loadModel(FileHandle fileHandle)
Directly load the model on the calling thread. The model with not be managed by an AssetManager.


getDependencies

public Array<AssetDescriptor> getDependencies(String fileName,
                                              FileHandle file,
                                              P parameters)
Description copied from class: AssetLoader
Returns the assets this asset requires to be loaded first. This method may be called on a thread other than the GL thread.

Specified by:
getDependencies in class AssetLoader<Model,P extends AssetLoaderParameters<Model>>
Parameters:
fileName - name of the asset to load
file - the resolved file to load
parameters - parameters for loading the asset
Returns:
other assets that the asset depends on and need to be loaded first or null if there are no dependencies.

loadAsync

public void loadAsync(AssetManager manager,
                      String fileName,
                      FileHandle file,
                      P parameters)
Description copied from class: AsynchronousAssetLoader
Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.

Specified by:
loadAsync in class AsynchronousAssetLoader<Model,P extends AssetLoaderParameters<Model>>
fileName - the name of the asset to load
file - the resolved file to load
parameters - the parameters to use for loading the asset

loadSync

public Model loadSync(AssetManager manager,
                      String fileName,
                      FileHandle file,
                      P parameters)
Description copied from class: AsynchronousAssetLoader
Loads the OpenGL part of the asset.

Specified by:
loadSync in class AsynchronousAssetLoader<Model,P extends AssetLoaderParameters<Model>>
file - the resolved file to load


Copyright © 2013. All Rights Reserved.