org.jdesktop.wonderland.client.cell.utils
Class CellUtils

java.lang.Object
  extended by org.jdesktop.wonderland.client.cell.utils.CellUtils

public class CellUtils
extends java.lang.Object

A collection of useful utility routines pertaining to Cells.

Author:
Jordan Slott

Constructor Summary
CellUtils()
           
 
Method Summary
static CellID createCell(CellServerState state)
          Creates a cell in the world given the CellServerState of the cell.
static CellID createCell(CellServerState state, CellID parentCellID)
          Creates a cell in the world given the CellServerState of the cell.
static boolean deleteCell(Cell cell)
          Requests the server to delete the given cell from the world of the primary session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CellUtils

public CellUtils()
Method Detail

createCell

public static CellID createCell(CellServerState state)
                         throws CellCreationException
Creates a cell in the world given the CellServerState of the cell. If the given CellServerState is null, this method simply does not create a Cell. This method attempts to position the Cell "optimally" so that the avatar can see it, based upon "hints" about the Cell bounds given to it in the CellServerState.

Parameters:
state - The cell server state for the new cell
Throws:
CellCreationException

createCell

public static CellID createCell(CellServerState state,
                                CellID parentCellID)
                         throws CellCreationException
Creates a cell in the world given the CellServerState of the cell. If the given CellServerState is null, this method simply does not create a Cell. This method attempts to position the Cell "optimally" so that the avatar can see it, based upon "hints" about the Cell bounds given to it in the CellServerState.

Parameters:
state - The cell server state for the new cell
parentCellID - The Cell ID of the parent, of null for world root
Throws:
CellCreationException

deleteCell

public static boolean deleteCell(Cell cell)
Requests the server to delete the given cell from the world of the primary session. Returns true if the deletion succeeds.

Note: currently always returns true because the server doesn't send any response to the cell delete message.



Open Wonderland - http://openwonderland.org