public final class SceneLoader
extends java.lang.Object
Scenes and CompiledScenes.| Constructor and Description |
|---|
SceneLoader()
Constructs a new
SceneLoader instance. |
SceneLoader(java.io.File directory)
Constructs a new
SceneLoader instance. |
SceneLoader(java.io.File directory,
boolean isCompilingExistingScene)
Constructs a new
SceneLoader instance. |
SceneLoader(java.io.File directory,
boolean isCompilingExistingScene,
java.lang.String name)
Constructs a new
SceneLoader instance. |
| Modifier and Type | Method and Description |
|---|---|
java.io.File |
getDirectory()
Returns a
File with the root directory. |
java.lang.String |
getName()
Returns the scene name.
|
boolean |
isCompilingExistingScene()
Returns
true if, and only if, compilation of existing scene is enabled, false otherwise. |
CompiledScene |
loadCompiledScene()
Returns a
CompiledScene given the name provided by getName(). |
Scene |
loadScene()
Returns a
Scene given the name provided by getName(). |
void |
setName(java.lang.String name)
Sets the scene name.
|
public SceneLoader()
SceneLoader instance.
Calling this constructor is equivalent to new SceneLoader(new File(".")).
public SceneLoader(java.io.File directory)
SceneLoader instance.
Calling this constructor is equivalent to new SceneLoader(directory, false).
If directory is null, a NullPointerException will be thrown.
directory - the root directory to usejava.lang.NullPointerException - thrown if, and only if, directory is nullpublic SceneLoader(java.io.File directory,
boolean isCompilingExistingScene)
SceneLoader instance.
Calling this constructor is equivalent to new SceneLoader(directory, isCompilingExistingScene, "Material_Showcase_Scene").
If directory is null, a NullPointerException will be thrown.
directory - the root directory to useisCompilingExistingScene - true if, and only if, compilation should be performed if the scene has already been compiled, false otherwisejava.lang.NullPointerException - thrown if, and only if, directory is nullpublic SceneLoader(java.io.File directory,
boolean isCompilingExistingScene,
java.lang.String name)
SceneLoader instance.
If either directory or name are null, a NullPointerException will be thrown.
directory - the root directory to useisCompilingExistingScene - true if, and only if, compilation should be performed if the scene has already been compiled, false otherwisename - the name of the scenejava.lang.NullPointerException - thrown if, and only if, either directory or name are nullpublic CompiledScene loadCompiledScene()
CompiledScene given the name provided by getName().CompiledScene given the name provided by getName()public java.io.File getDirectory()
File with the root directory.File with the root directorypublic Scene loadScene()
Scene given the name provided by getName().Scene given the name provided by getName()public java.lang.String getName()
public boolean isCompilingExistingScene()
true if, and only if, compilation of existing scene is enabled, false otherwise.true if, and only if, compilation of existing scene is enabled, false otherwisepublic void setName(java.lang.String name)
If name is null, a NullPointerException will be thrown.
name - the new scene namejava.lang.NullPointerException - thrown if, and only if, name is null