Package org.xj3d.core.loading
Interface WorldLoader
public interface WorldLoader
Independent thread used to load a world from a list of URLs and then
place it in the given node.
This implementation is designed to work as both a loadURL() and createVrmlFromUrl() call handler. The difference is defined by what data is supplied to the thread. If the target node is specified, then we assume that the caller wants us to put the results there. If it is null, then assume that we're doing a loadURL call and replace the entire world.
- Version:
- $Revision: 1.2 $
- Author:
- Justin Couch
-
Method Summary
Modifier and TypeMethodDescriptionloadNow
(BrowserCore core, InputSource source) Request to load the world immediately.loadNow
(BrowserCore core, InputSource source, boolean ignoreHeader) Request to load the world immediately.loadNow
(BrowserCore core, InputSource source, boolean ignoreHeader, int majorVersion, int minorVersion) Request to load the world immediately and constrain that loading to using a specific specification version.void
shutdown()
Shutdown the loader, release any resources
-
Method Details
-
loadNow
Request to load the world immediately. The method is blocking and will not return until the base file has been loaded. It will not load any chained content such as externprotos, scripts, textures etc.- Parameters:
core
- The browser core needed for obtaining informationsource
- The source to take the content from- Returns:
- The completely loaded scene
- Throws:
IOException
- There was an I/OError reading the fileVRMLParseException
- Some parsing error occurred during this scene processing
-
loadNow
VRMLScene loadNow(BrowserCore core, InputSource source, boolean ignoreHeader) throws IOException, VRMLParseException Request to load the world immediately. The method is blocking and will not return until the base file has been loaded. It will not load any chained content such as externprotos, scripts, textures etc.- Parameters:
core
- The browser core needed for obtaining informationsource
- The source to take the content fromignoreHeader
- false if it should look for the file header to check version information- Returns:
- The completely loaded scene
- Throws:
IOException
- There was an I/OError reading the fileVRMLParseException
- Some parsing error occurred during this scene processing
-
loadNow
VRMLScene loadNow(BrowserCore core, InputSource source, boolean ignoreHeader, int majorVersion, int minorVersion) throws IOException, VRMLParseException Request to load the world immediately and constrain that loading to using a specific specification version. The method is blocking and will not return until the base file has been loaded. It will not load any chained content such as externprotos, scripts, textures etc.A major version of 0 means to ignore the required version and just load whatever can be found.
- Parameters:
core
- The browser core needed for obtaining informationsource
- The source to take the content fromignoreHeader
- false if it should look for the file header to check version informationmajorVersion
- Require the given major versionminorVersion
- Require the given minor version- Returns:
- The completely loaded scene
- Throws:
IOException
- There was an I/OError reading the fileVRMLParseException
- Some parsing error occurred during this scene processing
-
shutdown
void shutdown()Shutdown the loader, release any resources
-