org.jdesktop.wonderland.client.cell
Class ModelCellComponent

java.lang.Object
  extended by org.jdesktop.wonderland.client.cell.CellComponent
      extended by org.jdesktop.wonderland.client.cell.ModelCellComponent
All Implemented Interfaces:
AssetPreloader

public class ModelCellComponent
extends CellComponent
implements AssetPreloader

A Component that represents a deployed model.

Author:
paulby

Field Summary
protected  DeployedModel deployedModel
           
protected  ModelRenderer renderer
           
 
Fields inherited from class org.jdesktop.wonderland.client.cell.CellComponent
cell, status
 
Constructor Summary
ModelCellComponent(Cell cell)
           
 
Method Summary
 java.util.List<java.net.URL> assetLoaded(java.net.URL u, java.io.InputStream is)
          Called whenever an asset is finished loading.
 java.util.List<java.net.URL> getAssets()
          Get the initial assets for this model
 CellRenderer getCellRenderer(Cell.RendererType type, Cell cell)
          Instantiate and return the cell renderer
 java.lang.String getDeployedModelURL()
           
 com.jme.scene.Node loadModel(org.jdesktop.mtgame.Entity rootEntity)
          Load and return the model.
 void setClientState(CellComponentClientState clientState)
          Sets the client state of the cell components.
protected  void setDeployedModelURL(java.lang.String url)
           
 
Methods inherited from class org.jdesktop.wonderland.client.cell.CellComponent
setStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deployedModel

protected DeployedModel deployedModel

renderer

protected ModelRenderer renderer
Constructor Detail

ModelCellComponent

public ModelCellComponent(Cell cell)
Method Detail

getCellRenderer

public CellRenderer getCellRenderer(Cell.RendererType type,
                                    Cell cell)
Instantiate and return the cell renderer

Parameters:
type -
cell -
Returns:

loadModel

public com.jme.scene.Node loadModel(org.jdesktop.mtgame.Entity rootEntity)
Load and return the model. The node returned is the model BG

Returns:

setClientState

public void setClientState(CellComponentClientState clientState)
Description copied from class: CellComponent
Sets the client state of the cell components.

Overrides:
setClientState in class CellComponent
Parameters:
clientState - The client state of the cell component

getAssets

public java.util.List<java.net.URL> getAssets()
Get the initial assets for this model

Specified by:
getAssets in interface AssetPreloader
Returns:
a list of the assets for this cell, or an empty list if no assets are available.

assetLoaded

public java.util.List<java.net.URL> assetLoaded(java.net.URL u,
                                                java.io.InputStream is)
Description copied from interface: AssetPreloader
Called whenever an asset is finished loading. This method returns an additional list of assets to load based on the contents of the newly added file.

Specified by:
assetLoaded in interface AssetPreloader
is - the InputStream from the loaded URL
Returns:
a list of additional URLs to load, or null if there are no more URLs that need loading

getDeployedModelURL

public java.lang.String getDeployedModelURL()
Returns:
the deployedModelURL

setDeployedModelURL

protected void setDeployedModelURL(java.lang.String url)


Open Wonderland - http://openwonderland.org