org.jdesktop.wonderland.client.jme.cellrenderer
Class ModelRenderer

java.lang.Object
  extended by org.jdesktop.wonderland.client.jme.cellrenderer.BasicRenderer
      extended by org.jdesktop.wonderland.client.jme.cellrenderer.ModelRenderer
All Implemented Interfaces:
CellRenderer, CellRendererJME

public class ModelRenderer
extends BasicRenderer

Author:
paulby

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jdesktop.wonderland.client.jme.cellrenderer.BasicRenderer
BasicRenderer.AssetResourceLocator, BasicRenderer.MoveProcessor
 
Field Summary
 
Fields inherited from class org.jdesktop.wonderland.client.jme.cellrenderer.BasicRenderer
cell, entity, logger, moveProcessor, rootNode, sceneRoot
 
Constructor Summary
ModelRenderer(Cell cell, DeployedModel deployedModel)
           
ModelRenderer(Cell cell, DeployedModel deployedModel, ModelCellComponent modelComponent)
           
ModelRenderer(Cell cell, ModelCellComponent modelComponent)
           
ModelRenderer(Cell cell, java.net.URL deployedModelURL)
           
ModelRenderer(Cell cell, java.net.URL deployedModelURL, com.jme.math.Vector3f modelTranslation, com.jme.math.Quaternion modelRotation, com.jme.math.Vector3f modelScale, java.util.Map<java.lang.String,java.lang.Object> properties)
           
 
Method Summary
protected  void addDefaultComponents(org.jdesktop.mtgame.Entity entity, com.jme.scene.Node rootNode)
           
protected  void applyTransparency(ModelCellComponentServerState.TransparencyMode oldTM, ModelCellComponentServerState.TransparencyMode newTM)
           
protected  void cleanupSceneGraph(org.jdesktop.mtgame.Entity entity)
          Cleanup the scene graph, allowing resources to be gc'ed TODO - should be abstract, but don't want to break compatability in 0.5 API
protected  com.jme.scene.Node createSceneGraph(org.jdesktop.mtgame.Entity entity)
          Create the scene graph.
 void reload()
          For the renderer to reload the scene graph.
 void setTransparency(ModelCellComponentServerState.TransparencyMode transparency)
          Change the transparency properties of the model
 
Methods inherited from class org.jdesktop.wonderland.client.jme.cellrenderer.BasicRenderer
addRenderState, applyTransform, cellTransformUpdate, createEntity, entityAddChild, getAssetURL, getCell, getEntity, getSceneRoot, getStatus, isCollisionEnabled, setBackfaceCullingEnabled, setCollisionEnabled, setLightingEnabled, setPickingEnabled, setStatus, setupCollision, setupPhysics, setupPhysicsCollision
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelRenderer

public ModelRenderer(Cell cell,
                     java.net.URL deployedModelURL)

ModelRenderer

public ModelRenderer(Cell cell,
                     ModelCellComponent modelComponent)

ModelRenderer

public ModelRenderer(Cell cell,
                     DeployedModel deployedModel)

ModelRenderer

public ModelRenderer(Cell cell,
                     DeployedModel deployedModel,
                     ModelCellComponent modelComponent)

ModelRenderer

public ModelRenderer(Cell cell,
                     java.net.URL deployedModelURL,
                     com.jme.math.Vector3f modelTranslation,
                     com.jme.math.Quaternion modelRotation,
                     com.jme.math.Vector3f modelScale,
                     java.util.Map<java.lang.String,java.lang.Object> properties)
Method Detail

createSceneGraph

protected com.jme.scene.Node createSceneGraph(org.jdesktop.mtgame.Entity entity)
Description copied from class: BasicRenderer
Create the scene graph. The node returned will have default components set to handle collision and rendering. The returned graph will also automatically be positioned correctly with the cells transform. This is achieved by adding the returned Node to a rootNode for this renderer which automatically tracks the cells transform.

Specified by:
createSceneGraph in class BasicRenderer
Returns:

addDefaultComponents

protected void addDefaultComponents(org.jdesktop.mtgame.Entity entity,
                                    com.jme.scene.Node rootNode)
Overrides:
addDefaultComponents in class BasicRenderer

reload

public void reload()
For the renderer to reload the scene graph. This is required if the user changes properties of the graph, such as optimization levels. The detach of the current graph and loading of the new graph are done asynchronously, this method returns immediately.


setTransparency

public void setTransparency(ModelCellComponentServerState.TransparencyMode transparency)
Change the transparency properties of the model

Parameters:
transparency - the new transparency

applyTransparency

protected void applyTransparency(ModelCellComponentServerState.TransparencyMode oldTM,
                                 ModelCellComponentServerState.TransparencyMode newTM)

cleanupSceneGraph

protected void cleanupSceneGraph(org.jdesktop.mtgame.Entity entity)
Description copied from class: BasicRenderer
Cleanup the scene graph, allowing resources to be gc'ed TODO - should be abstract, but don't want to break compatability in 0.5 API

Overrides:
cleanupSceneGraph in class BasicRenderer


Open Wonderland - http://openwonderland.org