| com.db.loaders.Loader
All known Subclasses: com.db.loaders.LoaderBase,
Loader | public interface Loader (Code) | | The Loader interface is used to specify the location
and elements of a file format to load.
The interface is used to give loaders of various
file formats a common public interface. Ideally
the Scene interface will be implemented to give
the user a consistent interface to extract the
data.
See Also: com.db.loaders.Scene |
Field Summary | |
final public static int | LOAD_ALL This flag enables the loading of all objects into the scene. | final public static int | LOAD_BACKGROUND_NODES This flag enables the loading of background objects into the scene. | final public static int | LOAD_BEHAVIOR_NODES This flag enables the loading of behaviors into the scene. | final public static int | LOAD_FOG_NODES This flag enables the loading of fog objects into the scene. | final public static int | LOAD_LIGHT_NODES This flag enables the loading of light objects into the scene. | final public static int | LOAD_SOUND_NODES This flag enables the loading of sound objects into the scene. | final public static int | LOAD_VIEW_GROUPS This flag enables the loading of view (camera) objects into
the scene. |
Method Summary | |
public String | getBasePath() Returns the current base path setting. | public URL | getBaseUrl() Returns the current base URL setting. | public int | getFlags() Returns the current loading flags setting. | public Scene | load(String fileName) This method loads the named file and returns the Scene
containing the scene. | public Scene | load(URL url) This method loads the named file and returns the Scene
containing the scene. | public Scene | load(Reader reader) This method loads the Reader and returns the Scene
containing the scene. | public void | setBasePath(String pathName) This method sets the base path name for data files associated with
the file passed into the load(String) method. | public void | setBaseUrl(URL url) This method sets the base URL name for data files associated with
the file passed into the load(URL) method. | public void | setFlags(int flags) This method sets the load flags for the file. |
LOAD_ALL | final public static int LOAD_ALL(Code) | | This flag enables the loading of all objects into the scene.
|
LOAD_BACKGROUND_NODES | final public static int LOAD_BACKGROUND_NODES(Code) | | This flag enables the loading of background objects into the scene.
|
LOAD_BEHAVIOR_NODES | final public static int LOAD_BEHAVIOR_NODES(Code) | | This flag enables the loading of behaviors into the scene.
|
LOAD_FOG_NODES | final public static int LOAD_FOG_NODES(Code) | | This flag enables the loading of fog objects into the scene.
|
LOAD_LIGHT_NODES | final public static int LOAD_LIGHT_NODES(Code) | | This flag enables the loading of light objects into the scene.
|
LOAD_SOUND_NODES | final public static int LOAD_SOUND_NODES(Code) | | This flag enables the loading of sound objects into the scene.
|
LOAD_VIEW_GROUPS | final public static int LOAD_VIEW_GROUPS(Code) | | This flag enables the loading of view (camera) objects into
the scene.
|
getBasePath | public String getBasePath()(Code) | | Returns the current base path setting. By default this is null,
implying the loader should look for associated files starting
from the same directory as the file passed into the load(String)
method.
|
getBaseUrl | public URL getBaseUrl()(Code) | | Returns the current base URL setting. By default this is null,
implying the loader should look for associated files starting
from the same directory as the file passed into the load(URL) method.
|
getFlags | public int getFlags()(Code) | | Returns the current loading flags setting.
|
setBasePath | public void setBasePath(String pathName)(Code) | | This method sets the base path name for data files associated with
the file passed into the load(String) method.
The basePath should be null by default, which is an indicator
to the loader that it should look for any associated files starting
from the same directory as the file passed into the load(String)
method.
|
setBaseUrl | public void setBaseUrl(URL url)(Code) | | This method sets the base URL name for data files associated with
the file passed into the load(URL) method.
The basePath should be null by default, which is an indicator
to the loader that it should look for any associated files starting
from the same directory as the file passed into the load(URL) method.
|
setFlags | public void setFlags(int flags)(Code) | | This method sets the load flags for the file. The flags should
equal 0 by default (which tells the loader to only load geometry).
To enable the loading of any particular scene elements, pass
in a logical OR of the LOAD values specified above.
|
|
|