org.jdesktop.wonderland.server.spatial
Interface UniverseManager

All Known Implementing Classes:
UniverseService, UniverseServiceManagerImpl

public interface UniverseManager

Manages Cells within the WonderlandUniverse. Computes and tracks the WorldTransform and WorldBounds of cells as their localTransform and localBounds are modified (or parents/children in the graph are modified). Changes to the graph will trigger cell cache updates. Each modification is scheduled in associating with the calling Darkstar transaction so the change is not immediate but is guaranteed to complete (or fail) correctly with the calling transaction.

Author:
paulby

Method Summary
 void addCellListener(CellMOListener listener)
          Add a cell listener.
 void addChild(CellMO parent, CellMO child)
           
 void addRootToUniverse(CellMO rootCellMO)
           
 void addTransformChangeListener(CellMO cell, TransformChangeListenerSrv listener)
           
 void addViewUpdateListener(CellMO cell, ViewUpdateListener viewUpdateListener)
          Add a ViewUpdateLIstener to this cell.
 void createCell(CellMO cellMO, boolean notify)
           
 com.jme.bounding.BoundingVolume getWorldBounds(CellMO cell, com.jme.bounding.BoundingVolume result)
           
 CellTransform getWorldTransform(CellMO cell, CellTransform result)
           
 void removeCell(CellMO cellMO)
           
 void removeCellListener(CellMOListener listener)
          Remove a cell listener.
 void removeChild(CellMO parent, CellMO child)
           
 void removeRootFromUniverse(CellMO rootCellMO)
           
 void removeTransformChangeListener(CellMO cell, TransformChangeListenerSrv listener)
           
 void removeViewUpdateListener(CellMO cell, ViewUpdateListener viewUpdateListener)
          Remove the specified ViewUpdateListener
 void revalidateCell(CellMO cellMO)
           
 void runTxnRunnable(UniverseTxnRunnable runnable)
          Immediately run the given runnable with the universe's TransactionProxy
 void scheduleTask(UniverseKernelRunnable task)
          Schedule a runnable to execute when the current transaction commits.
 void setLocalTransform(CellMO cell, CellTransform localCellTransform)
           
 void viewLogin(ViewCellMO viewCell)
           
 void viewLogout(ViewCellMO viewCell)
           
 void viewRevalidate(ViewCellMO viewCell)
           
 

Method Detail

addChild

void addChild(CellMO parent,
              CellMO child)

addTransformChangeListener

void addTransformChangeListener(CellMO cell,
                                TransformChangeListenerSrv listener)

createCell

void createCell(CellMO cellMO,
                boolean notify)

revalidateCell

void revalidateCell(CellMO cellMO)

removeCell

void removeCell(CellMO cellMO)

removeChild

void removeChild(CellMO parent,
                 CellMO child)

addRootToUniverse

void addRootToUniverse(CellMO rootCellMO)

removeRootFromUniverse

void removeRootFromUniverse(CellMO rootCellMO)

removeTransformChangeListener

void removeTransformChangeListener(CellMO cell,
                                   TransformChangeListenerSrv listener)

setLocalTransform

void setLocalTransform(CellMO cell,
                       CellTransform localCellTransform)

getWorldTransform

CellTransform getWorldTransform(CellMO cell,
                                CellTransform result)

getWorldBounds

com.jme.bounding.BoundingVolume getWorldBounds(CellMO cell,
                                               com.jme.bounding.BoundingVolume result)

viewLogin

void viewLogin(ViewCellMO viewCell)

viewRevalidate

void viewRevalidate(ViewCellMO viewCell)

viewLogout

void viewLogout(ViewCellMO viewCell)

addViewUpdateListener

void addViewUpdateListener(CellMO cell,
                           ViewUpdateListener viewUpdateListener)
Add a ViewUpdateLIstener to this cell. This listener will be called whenever the view of a ViewCache that contains this cell is updated

Parameters:
viewUpdateListener - listener to add

removeViewUpdateListener

void removeViewUpdateListener(CellMO cell,
                              ViewUpdateListener viewUpdateListener)
Remove the specified ViewUpdateListener

Parameters:
viewUpdateListener - listener to remove

addCellListener

void addCellListener(CellMOListener listener)
Add a cell listener. The listener will be notified whenever a cell is added or removed. Cell listeners must be serializable and may optionally implement managed object. Listeners will be notified in a Darkstar transaction, and are persisted across restarts.

Parameters:
listener - the listener to add

removeCellListener

void removeCellListener(CellMOListener listener)
Remove a cell listener.

Parameters:
listener - the listener to remove

scheduleTask

void scheduleTask(UniverseKernelRunnable task)
Schedule a runnable to execute when the current transaction commits. This is useful if you need to interact with other changes in the UniverseManager that are pending on the completion of the current transaction.


runTxnRunnable

void runTxnRunnable(UniverseTxnRunnable runnable)
Immediately run the given runnable with the universe's TransactionProxy

Parameters:
runnable - the runnable to run


Open Wonderland - http://openwonderland.org