|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.graphics.g3d.loaders.ModelLoaderRegistry
public class ModelLoaderRegistry
Simple "pluggable" class for loading models. Keeps a list of 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 Summary | |
---|---|
ModelLoaderRegistry()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModelLoaderRegistry()
Method Detail |
---|
public static void registerLoader(java.lang.String extension, ModelLoader loader, ModelLoaderHints defaultHints)
extension
- the extension string, e.g. "dae" or "obj"loader
- the ModelLoader
defaultHints
- the default ModelLoaderHints
to be used with this loader.public static Model load(FileHandle file)
file
- the file to be loaded
Model
GdxRuntimeException
- 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 use
Model
GdxRuntimeException
- in case the model could not be loaded.public static StillModel loadStillModel(FileHandle file)
StillModelLoader
instances.
file
- the file to be loaded
Model
GdxRuntimeException
- 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.
Model
GdxRuntimeException
- in case the model could not be loaded.public static KeyframedModel loadKeyframedModel(FileHandle file)
KeyframedModelLoader
instances.
file
- the file to be loaded
Model
GdxRuntimeException
- 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 Model
Model
GdxRuntimeException
- in case the model could not be loaded.public static SkeletonModel loadSkeletonModel(FileHandle file)
SkeletonModelLoader
instances.
file
- the file to be loaded
Model
GdxRuntimeException
- 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 use
Model
GdxRuntimeException
- in case the model could not be loaded.
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |