public class ModelLoaderRegistry
extends java.lang.Object
ModelLoader instances on a per file suffix basis. Use one
of the static methods to load a Model. The registry will then try out all the registered loaders for that extension and
eventually return a Model or throw a GdxRuntimeException.| Constructor and Description |
|---|
ModelLoaderRegistry() |
| Modifier and Type | Method and Description |
|---|---|
static Model |
load(FileHandle file)
Loads the specified file with one of the loaders registered with this ModelLoaderRegistry.
|
static Model |
load(FileHandle file,
ModelLoaderHints hints)
Loads the specified file with one of the loaders registered with this ModelLoaderRegistry.
|
static KeyframedModel |
loadKeyframedModel(FileHandle file)
Loads the specified file with one of the loaders registered with this ModelLoaderRegistry.
|
static KeyframedModel |
loadKeyframedModel(FileHandle file,
ModelLoaderHints hints)
Loads the specified file with one of the loaders registered with this ModelLoaderRegistry.
|
static SkeletonModel |
loadSkeletonModel(FileHandle file)
Loads the specified file with one of the loaders registered with this ModelLoaderRegistry.
|
static SkeletonModel |
loadSkeletonModel(FileHandle file,
ModelLoaderHints hints)
Loads the specified file with one of the loaders registered with this ModelLoaderRegistry.
|
static StillModel |
loadStillModel(FileHandle file)
Loads the specified file with one of the loaders registered with this ModelLoaderRegistry.
|
static StillModel |
loadStillModel(FileHandle file,
ModelLoaderHints hints)
Loads the specified file with one of the loaders registered with this ModelLoaderRegistry.
|
static void |
registerLoader(java.lang.String extension,
ModelLoader loader,
ModelLoaderHints defaultHints)
Registers a new loader with the registry.
|
public static void registerLoader(java.lang.String extension,
ModelLoader loader,
ModelLoaderHints defaultHints)
extension - the extension string, e.g. "dae" or "obj"loader - the ModelLoaderdefaultHints - the default ModelLoaderHints to be used with this loader.public static Model load(FileHandle file)
file - the file to be loadedModelGdxRuntimeException - in case the model could not be loaded.public static Model load(FileHandle file, ModelLoaderHints hints)
file - the file to be loadedhints - the ModelLoaderHints to useModelGdxRuntimeException - in case the model could not be loaded.public static StillModel loadStillModel(FileHandle file)
StillModelLoader instances.file - the file to be loadedModelGdxRuntimeException - in case the model could not be loaded.public static StillModel loadStillModel(FileHandle file, ModelLoaderHints hints)
StillModelLoader instances.file - the file to be loadedhints - the ModelLoaderHints to be used.ModelGdxRuntimeException - in case the model could not be loaded.public static KeyframedModel loadKeyframedModel(FileHandle file)
KeyframedModelLoader
instances.file - the file to be loadedModelGdxRuntimeException - in case the model could not be loaded.public static KeyframedModel loadKeyframedModel(FileHandle file, ModelLoaderHints hints)
KeyframedModelLoader
instances.file - the file to be loadedhints - the ModelModelGdxRuntimeException - in case the model could not be loaded.public static SkeletonModel loadSkeletonModel(FileHandle file)
SkeletonModelLoader instances.file - the file to be loadedModelGdxRuntimeException - in case the model could not be loaded.public static SkeletonModel loadSkeletonModel(FileHandle file, ModelLoaderHints hints)
SkeletonModelLoader instances.file - the file to be loadedhints - the ModelLoaderHints to useModelGdxRuntimeException - in case the model could not be loaded.