public class VirtualUniverse
extends java.lang.Object
A VirtualUniverse object defines methods to enumerate its Locale objects and to remove them from the virtual universe.
For more information, see the Introduction to the Java 3D API and Scene Graph Superstructure documents.
Locale| Modifier and Type | Field and Description |
|---|---|
(package private) int |
activeViewCount |
(package private) java.util.Vector |
backgrounds |
(package private) java.lang.Object |
behaviorLock |
(package private) BehaviorScheduler |
behaviorScheduler |
(package private) BehaviorStructure |
behaviorStructure |
(package private) java.util.Vector |
clips |
(package private) View |
currentView |
private static RenderingErrorListener |
defaultRenderingErrorListener |
private ShaderErrorListener |
defaultShaderErrorListener |
(package private) java.util.ArrayList |
dirtyGeomList |
(package private) boolean |
enableComponent |
(package private) boolean |
enableFocus |
(package private) boolean |
enableKey |
(package private) boolean |
enableMouse |
(package private) boolean |
enableMouseMotion |
(package private) boolean |
enableMouseWheel |
(package private) GeometryStructure |
geometryStructure |
(package private) boolean |
inBehavior |
(package private) boolean |
isSceneGraphLock |
(package private) java.util.Vector |
listOfLocales |
(package private) static MasterControl |
mc |
(package private) long |
nodeIdCount |
(package private) java.util.Vector |
nodeIdFreeList |
(package private) int |
numNodes |
private static J3dQueryProps |
properties |
(package private) View |
regViewWaiting |
(package private) RenderingEnvironmentStructure |
renderingEnvironmentStructure |
(package private) int |
renderingEnvironmentStructureRefCount |
private static java.util.HashSet<RenderingErrorListener> |
renderingErrorListenerSet |
(package private) static java.lang.ThreadGroup |
rootThreadGroup |
(package private) java.lang.Object |
sceneGraphLock |
(package private) SetLiveState |
setLiveState |
private java.util.HashSet<ShaderErrorListener> |
shaderErrorListenerSet |
(package private) java.util.Vector |
sounds |
(package private) java.util.Vector |
soundscapes |
(package private) SoundStructure |
soundStructure |
private java.util.HashSet<GraphStructureChangeListener> |
structureChangeListenerSet |
(package private) TransformStructure |
transformStructure |
(package private) View |
unRegViewWaiting |
(package private) ObjectUpdate[] |
updateObjects |
(package private) int |
updateObjectsLen |
(package private) int |
viewIdCount |
(package private) java.util.ArrayList |
viewIdFreeList |
(package private) java.lang.Object[] |
viewPlatformList |
(package private) java.util.ArrayList |
viewPlatforms |
(package private) boolean |
vpChanged |
private java.lang.Object |
waitLock |
| Constructor and Description |
|---|
VirtualUniverse()
Constructs a new VirtualUniverse.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addGraphStructureChangeListener(GraphStructureChangeListener listener)
Adds the specified GraphStructureChangeListener to the set of listeners
that will be notified when the graph structure is changed on a live
scene graph.
|
(package private) void |
addLocale(Locale locale)
Adds a locale at the end of list of locales
|
static void |
addRenderingErrorListener(RenderingErrorListener listener)
Adds the specified RenderingErrorListener to the set of listeners
that will be notified when a rendering error is detected.
|
void |
addShaderErrorListener(ShaderErrorListener listener)
Adds the specified ShaderErrorListener to the set of listeners
that will be notified when a programmable shader error is
detected on a live scene graph.
|
(package private) void |
addViewIdToFreeList(java.lang.Integer viewId)
This returns a viewId to the freelist
|
(package private) void |
addViewPlatform(ViewPlatformRetained vp) |
(package private) void |
checkForEnableEvents() |
(package private) void |
disableFocusEvents() |
(package private) void |
disableKeyEvents() |
(package private) void |
disableMouseEvents() |
(package private) void |
disableMouseMotionEvents() |
(package private) void |
disableMouseWheelEvents() |
(package private) void |
enableComponentEvents() |
(package private) void |
enableFocusEvents() |
(package private) void |
enableKeyEvents() |
(package private) void |
enableMouseEvents() |
(package private) void |
enableMouseMotionEvents() |
(package private) void |
enableMouseWheelEvents() |
java.util.Enumeration |
getAllLocales()
Returns the enumeration object of all locales in this virtual universe.
|
(package private) View |
getCurrentView()
Returns the "current" view (the last view activated for this virtual
universe.
|
static int |
getJ3DThreadPriority()
Retrieves that priority of Java 3D's threads.
|
(package private) java.lang.String |
getNodeId()
This returns the next available nodeId as a string.
|
static java.util.Map |
getProperties()
Returns a read-only Map object containing key-value pairs that
define various global properties for Java 3D.
|
(package private) static java.lang.ThreadGroup |
getRootThreadGroup()
Method to return the root thread group.
|
(package private) java.lang.Integer |
getViewId()
This returns the next available viewId
|
(package private) java.lang.Object[] |
getViewPlatformList() |
(package private) void |
initMCStructure() |
(package private) boolean |
isEmpty()
return true if all Locales under it don't have branchGroup
attach to it.
|
(package private) static void |
loadLibraries()
Initialize the native interface and anything else that needs
to be initialized.
|
(package private) static void |
notifyRenderingErrorListeners(RenderingError error)
Notifies all listeners of a rendering error.
|
(package private) void |
notifyShaderErrorListeners(ShaderError error)
Notifies all listeners of a shader error.
|
(package private) void |
notifyStructureChangeListeners(boolean add,
java.lang.Object parent,
BranchGroup child)
Processes all live BranchGroup add and removes and notifies
any registered listeners.
|
(package private) void |
notifyStructureChangeListeners(java.lang.Object oldParent,
java.lang.Object newParent,
BranchGroup child)
Processes all live BranchGroup moves and notifies
any registered listeners.
|
int |
numLocales()
Returns the number of locales.
|
void |
removeAllLocales()
Removes all Locales and their associates branch graphs from
this universe.
|
void |
removeGraphStructureChangeListener(GraphStructureChangeListener listener)
Removes the specified GraphStructureChangeListener from the set of listeners.
|
void |
removeLocale(Locale locale)
Removes a Locale and its associates branch graphs from this
universe.
|
static void |
removeRenderingErrorListener(RenderingErrorListener listener)
Removes the specified RenderingErrorListener from the set of
listeners.
|
void |
removeShaderErrorListener(ShaderErrorListener listener)
Removes the specified ShaderErrorListener from the set of
listeners.
|
(package private) void |
removeViewPlatform(ViewPlatformRetained vp) |
(package private) void |
resetWaitMCFlag() |
(package private) void |
setCurrentView(View view)
Sets the "current" view (during view activation) for this virtual
universe.
|
static void |
setJ3DThreadPriority(int priority)
Sets the priority of all Java 3D threads to the specified
value.
|
(package private) void |
waitForMC() |
static MasterControl mc
java.lang.Object sceneGraphLock
java.lang.Object behaviorLock
java.util.Vector listOfLocales
java.util.ArrayList viewPlatforms
java.lang.Object[] viewPlatformList
boolean vpChanged
java.util.Vector backgrounds
java.util.Vector clips
java.util.Vector sounds
java.util.Vector soundscapes
BehaviorScheduler behaviorScheduler
GeometryStructure geometryStructure
TransformStructure transformStructure
BehaviorStructure behaviorStructure
SoundStructure soundStructure
RenderingEnvironmentStructure renderingEnvironmentStructure
int renderingEnvironmentStructureRefCount
long nodeIdCount
int viewIdCount
java.util.Vector nodeIdFreeList
java.util.ArrayList viewIdFreeList
int numNodes
SetLiveState setLiveState
ObjectUpdate[] updateObjects
int updateObjectsLen
java.util.ArrayList dirtyGeomList
View currentView
boolean inBehavior
boolean enableComponent
boolean enableFocus
boolean enableKey
boolean enableMouse
boolean enableMouseMotion
boolean enableMouseWheel
int activeViewCount
static java.lang.ThreadGroup rootThreadGroup
private static J3dQueryProps properties
View regViewWaiting
View unRegViewWaiting
boolean isSceneGraphLock
private java.lang.Object waitLock
private java.util.HashSet<GraphStructureChangeListener> structureChangeListenerSet
private java.util.HashSet<ShaderErrorListener> shaderErrorListenerSet
private ShaderErrorListener defaultShaderErrorListener
private static java.util.HashSet<RenderingErrorListener> renderingErrorListenerSet
private static RenderingErrorListener defaultRenderingErrorListener
void initMCStructure()
static void loadLibraries()
void addLocale(Locale locale)
locale - the locale to be addedpublic void removeLocale(Locale locale)
locale - the Locale to be removed.java.lang.IllegalArgumentException - if the specified Locale is not
attached to this VirtualUniverse.public void removeAllLocales()
public java.util.Enumeration getAllLocales()
public int numLocales()
public static void setJ3DThreadPriority(int priority)
priority - the new thread priorityjava.lang.IllegalArgumentException - if the priority is not in
the range MIN_PRIORITY to MAX_PRIORITYjava.lang.SecurityException - if the priority is greater than
that of the calling threadpublic static int getJ3DThreadPriority()
public static final java.util.Map getProperties()
The set of global Java 3D properties always includes values for the following keys:
| Key (String) | Value Type |
j3d.version |
String |
j3d.vendor |
String |
j3d.specification.version |
String |
j3d.specification.vendor |
String |
j3d.pipeline |
String |
j3d.renderer |
String |
The descriptions of the values returned for each key are as follows:
j3d.version
j3d.vendor
j3d.specification.version
j3d.specification.vendor
j3d.pipeline
j3d.renderer
java.lang.String getNodeId()
java.lang.Integer getViewId()
void addViewIdToFreeList(java.lang.Integer viewId)
void addViewPlatform(ViewPlatformRetained vp)
void removeViewPlatform(ViewPlatformRetained vp)
java.lang.Object[] getViewPlatformList()
void checkForEnableEvents()
void enableComponentEvents()
void disableFocusEvents()
void enableFocusEvents()
void disableKeyEvents()
void enableKeyEvents()
void disableMouseEvents()
void enableMouseEvents()
void disableMouseMotionEvents()
void enableMouseMotionEvents()
void disableMouseWheelEvents()
void enableMouseWheelEvents()
final void setCurrentView(View view)
last - activated viewfinal View getCurrentView()
static java.lang.ThreadGroup getRootThreadGroup()
boolean isEmpty()
void resetWaitMCFlag()
void waitForMC()
public void addGraphStructureChangeListener(GraphStructureChangeListener listener)
listener - the listener to add to the set.public void removeGraphStructureChangeListener(GraphStructureChangeListener listener)
listener - the listener to remove from the set.void notifyStructureChangeListeners(boolean add,
java.lang.Object parent,
BranchGroup child)
void notifyStructureChangeListeners(java.lang.Object oldParent,
java.lang.Object newParent,
BranchGroup child)
public void addShaderErrorListener(ShaderErrorListener listener)
listener - the listener to add to the set.public void removeShaderErrorListener(ShaderErrorListener listener)
listener - the listener to remove from the set.void notifyShaderErrorListeners(ShaderError error)
public static void addRenderingErrorListener(RenderingErrorListener listener)
listener - the listener to add to the set.public static void removeRenderingErrorListener(RenderingErrorListener listener)
listener - the listener to remove from the set.static void notifyRenderingErrorListeners(RenderingError error)
Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.