|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xj3d.ui.construct.BlockingWorldLoader
public class BlockingWorldLoader
A function module that handles world loading and blocks until the world is loaded and all the content loader threads return to their idle state. Additionally this loader reduces the frame rate while loading is in process to prevent unnecessary CPU time being spent on rendering.
| Field Summary | |
|---|---|
protected Construct |
construct
The construct instance to load |
protected ErrorReporter |
errorReporter
The error reporting mechanism |
protected java.util.Map |
inProgress
Map of in progress loader tasks |
protected LoaderThreadPool |
loaderPool
Manager of the loader threads |
protected boolean |
loadInProgress
Synchronization variable, indicating that loader threads are active |
protected boolean |
loadStatus
The completion status of the load, true for success, false otherwise. |
protected ContentLoadQueue |
pending
Shared queue of load tasks |
protected ScenePreprocessor |
preprocessor
The preprocessor to invoke after the scene is loaded, and before the scene is set to the Construct |
protected InputSource |
source
The source to load from |
| Constructor Summary | |
|---|---|
BlockingWorldLoader(Construct construct)
Constructor |
|
| Method Summary | |
|---|---|
void |
allEventsComplete()
Notification that the rendering of the event model is complete and that rendering is about to begin. |
void |
browserDisposed()
Ignored. |
void |
browserInitialized(VRMLScene scene)
The browser has been initialised with new content. |
void |
browserShutdown()
Ignored. |
boolean |
isLoadingInProgress()
Return whether loading threads are active |
boolean |
load(InputSource source)
Load the world from the specified source, return when all the loading threads have returned to the idle state. |
void |
run()
Thread that handles the initial world load |
void |
setScenePreprocessor(ScenePreprocessor preprocessor)
Set the preprocessor module |
void |
urlLoadFailed(java.lang.String msg)
Ignored. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Construct construct
protected ScenePreprocessor preprocessor
protected ErrorReporter errorReporter
protected InputSource source
protected boolean loadStatus
protected boolean loadInProgress
protected LoaderThreadPool loaderPool
protected ContentLoadQueue pending
protected java.util.Map inProgress
| Constructor Detail |
|---|
public BlockingWorldLoader(Construct construct)
construct - The Construct instance to load to| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablepublic void browserInitialized(VRMLScene scene)
browserInitialized in interface BrowserCoreListenerscene - The scene of the new contentpublic void urlLoadFailed(java.lang.String msg)
urlLoadFailed in interface BrowserCoreListenermsg - An error message to go with the failurepublic void browserShutdown()
browserShutdown in interface BrowserCoreListenerpublic void browserDisposed()
browserDisposed in interface BrowserCoreListenerpublic void allEventsComplete()
FrameStateListener
allEventsComplete in interface FrameStateListenerpublic boolean load(InputSource source)
source - The source to loadpublic boolean isLoadingInProgress()
public void setScenePreprocessor(ScenePreprocessor preprocessor)
preprocessor - The ScenePreprocessor module. If null, this clears
any previous preprocessor module.
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||