Class dnx.lr.SceneContents
All Packages Class Hierarchy This Package Previous Next Index
Class dnx.lr.SceneContents
java.lang.Object
|
+----dnx.util.DNXObject
|
+----dnx.util.DNXInstancedObject
|
+----dnx.util.DNXJavaStyleObservable
|
+----dnx.lr.SceneContents
- public class SceneContents
- extends DNXJavaStyleObservable
A SceneContents object is a "frozen" (un-instanced) scene.
It contains lists of routes, prototypes, and nodes. When you read
in a scene or a prototype from a file, you get a SceneContents object;
from this, a Scene or prototype can be created. (The Scene just gets
the root node and uses it directly; prototypes do a deep clone
because they may instance the SceneContents multiple times [one
per prototype instance].)
-
abortLoading()
- Make the loading stop immediately, as soon as it's safe.
-
addPrototype(Prototype)
-
-
addRoute(Route)
-
-
addTopLevelNode(Node)
-
-
beginAsyncLoad(Object, ReadAction)
- Actually begin the asynchronous loading process.
-
beginAsyncLoad(Object, ReadAction[])
- Actually begin the asynchronous loading process.
-
clone()
-
-
countPrototypes()
-
-
countRoutes()
-
-
countTopLevelNodes()
- Return the number of top-level nodes.
-
createAsync()
-
-
createAsync(NodeDefinition)
- Read in a SceneContents object asynchronously, optionally with
a set of external interfaces.
-
currentlyLoading()
-
-
deleteAllTopLevelNodes()
-
-
deletePrototype(Prototype)
-
-
deleteRoute(Route)
-
-
deleteTopLevelNode(Node)
-
-
finishedLoading()
-
-
getInterfaceMappings()
-
-
getPrototypes()
-
-
getRootNode()
-
-
getRoute(Node, int, Node, int)
-
-
getRoutes()
-
-
getURL()
-
-
hasFakeGroupRootNode()
-
-
loadAborted()
-
-
loadedSuccessfully()
-
-
notifyingRead(Object, ReadAction, NodeDefinition, DNXObservable)
- Read and create a new SceneContents object.
-
print(PrintAction)
-
-
printPrototypes(PrintAction)
-
-
printRoutes(PrintAction)
-
-
read(ReadAction)
- Read and create a new SceneContents object.
-
read(ReadAction, NodeDefinition)
- Read and create a new SceneContents object.
-
resolvePrototype(String)
-
-
waitForAsyncLoadCompletion()
- Wait for an in-progress load to finish.
createAsync
public static SceneContents createAsync(NodeDefinition interfaceDefs)
- Read in a SceneContents object asynchronously, optionally with
a set of external interfaces. This does not start loading the
scene; call beginAsyncLoad() to do that. This two-stage process
allows you to add observers and such before starting the load
process.
createAsync
public static SceneContents createAsync()
beginAsyncLoad
public void beginAsyncLoad(Object whatIsLoading,
ReadAction actions[])
- Actually begin the asynchronous loading process.
beginAsyncLoad
public void beginAsyncLoad(Object whatIsLoading,
ReadAction a)
- Actually begin the asynchronous loading process.
abortLoading
public void abortLoading()
- Make the loading stop immediately, as soon as it's safe.
After this method returns, it is guaranteed that a LOAD_DONE
event will never get sent for this SceneContents.
waitForAsyncLoadCompletion
public boolean waitForAsyncLoadCompletion()
- Wait for an in-progress load to finish. If the loading has already
finished, this returns immediately.
finishedLoading
public boolean finishedLoading()
currentlyLoading
public boolean currentlyLoading()
loadedSuccessfully
public boolean loadedSuccessfully()
loadAborted
public boolean loadAborted()
read
public static SceneContents read(ReadAction a,
NodeDefinition interfaceDefs) throws IOException, VRMLSyntaxException
- Read and create a new SceneContents object.
read
public static SceneContents read(ReadAction a) throws VRMLSyntaxException, IOException
- Read and create a new SceneContents object.
notifyingRead
public static SceneContents notifyingRead(Object whatIsLoading,
ReadAction a,
NodeDefinition interfaceDefs,
DNXObservable throwee)
- Read and create a new SceneContents object. If an error occurs,
don't throw an exception; instead, send a SceneObserverEvent to the
specified DNXObservable (which can be null) and return null. If no
errors occur, return the new SceneContents.
getURL
public URL getURL()
print
public void print(PrintAction a)
printPrototypes
public void printPrototypes(PrintAction a)
addPrototype
public void addPrototype(Prototype proto)
resolvePrototype
public Prototype resolvePrototype(String name)
printRoutes
public void printRoutes(PrintAction a)
addRoute
public void addRoute(Route route)
deleteRoute
public void deleteRoute(Route route)
getRoute
public Route getRoute(Node from,
int eventOut,
Node to,
int eventIn)
addTopLevelNode
public void addTopLevelNode(Node node)
deletePrototype
public void deletePrototype(Prototype proto)
deleteAllTopLevelNodes
public void deleteAllTopLevelNodes()
deleteTopLevelNode
public void deleteTopLevelNode(Node node)
getPrototypes
public Enumeration getPrototypes()
getRoutes
public Enumeration getRoutes()
getRootNode
public Node getRootNode()
getInterfaceMappings
public InterfaceMappingTable getInterfaceMappings()
countPrototypes
public int countPrototypes()
countRoutes
public int countRoutes()
countTopLevelNodes
public int countTopLevelNodes()
- Return the number of top-level nodes.
hasFakeGroupRootNode
public boolean hasFakeGroupRootNode()
clone
protected Object clone()
- Overrides:
- clone in class Object
All Packages Class Hierarchy This Package Previous Next Index