org.jdesktop.wonderland.client.cell
Class MovableAvatarComponent

java.lang.Object
  extended by org.jdesktop.wonderland.client.cell.CellComponent
      extended by org.jdesktop.wonderland.client.cell.MovableComponent
          extended by org.jdesktop.wonderland.client.cell.MovableAvatarComponent

public class MovableAvatarComponent
extends MovableComponent

A component that extends MovableComponent to add additional information for animating avatars.

Author:
paulby

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jdesktop.wonderland.client.cell.MovableComponent
MovableComponent.CellMoveListener, MovableComponent.CellMoveModifiedListener, MovableComponent.CellMoveSource
 
Field Summary
static int NO_TRIGGER
           
 
Fields inherited from class org.jdesktop.wonderland.client.cell.MovableComponent
channelComp, logger, msgReceiver, serverMoveListeners, throttle
 
Fields inherited from class org.jdesktop.wonderland.client.cell.CellComponent
cell, status
 
Constructor Summary
MovableAvatarComponent(Cell cell)
           
 
Method Summary
protected  CellMessage createMoveRequestMessage(CellTransform transform)
           
protected  ResponseListener createMoveResponseListener(MovableComponent.CellMoveModifiedListener listener)
           
protected  java.lang.Class getMessageClass()
           
 java.lang.String getServerAnimationName()
           
 int getServerTrigger()
           
 void localMoveRequest(CellTransform transform)
          A request from this client to move the cell.
 void localMoveRequest(CellTransform transform, float height, boolean collision)
           
 void localMoveRequest(CellTransform transform, int trigger, boolean pressed, java.lang.String animationName, float height, boolean collision, MovableComponent.CellMoveModifiedListener listener)
           
 void localMoveRequest(CellTransform transform, int trigger, boolean pressed, java.lang.String animationName, MovableComponent.CellMoveModifiedListener listener)
           
 void localMoveRequest(CellTransform transform, MovableComponent.CellMoveModifiedListener listener)
          A request from this client to move the cell.
protected  void serverMoveRequest(MovableMessage msg)
          Called when a message arrives from the server requesting that the cell be moved.
 void setClientState(CellComponentClientState clientState)
          Sets the client state of the cell components.
 
Methods inherited from class org.jdesktop.wonderland.client.cell.MovableComponent
addServerCellMoveListener, applyLocalTransformChange, notifyServerCellMoveListeners, removeServerCellMoveListener, setStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_TRIGGER

public static final int NO_TRIGGER
See Also:
Constant Field Values
Constructor Detail

MovableAvatarComponent

public MovableAvatarComponent(Cell cell)
Method Detail

localMoveRequest

public void localMoveRequest(CellTransform transform)
Description copied from class: MovableComponent
A request from this client to move the cell. The cell we be moved locally and the requested change sent to the server. If the server denies the move the cell will be moved to a server provided location. The server will notify all other clients of the new location.

Overrides:
localMoveRequest in class MovableComponent

localMoveRequest

public void localMoveRequest(CellTransform transform,
                             float height,
                             boolean collision)

localMoveRequest

public void localMoveRequest(CellTransform transform,
                             MovableComponent.CellMoveModifiedListener listener)
Description copied from class: MovableComponent
A request from this client to move the cell. The cell we be moved locally and the requested change sent to the server. If the server denies the move the cell will be moved to a server provided location and the listener will be called. The server will notify all other clients of the new location.

Overrides:
localMoveRequest in class MovableComponent
Parameters:
transform - the requrested transformt
listener - the listener that will be notified in the event the system modifies this move (due to collision etc).

localMoveRequest

public void localMoveRequest(CellTransform transform,
                             int trigger,
                             boolean pressed,
                             java.lang.String animationName,
                             MovableComponent.CellMoveModifiedListener listener)

localMoveRequest

public void localMoveRequest(CellTransform transform,
                             int trigger,
                             boolean pressed,
                             java.lang.String animationName,
                             float height,
                             boolean collision,
                             MovableComponent.CellMoveModifiedListener listener)

createMoveRequestMessage

protected CellMessage createMoveRequestMessage(CellTransform transform)
Overrides:
createMoveRequestMessage in class MovableComponent

createMoveResponseListener

protected ResponseListener createMoveResponseListener(MovableComponent.CellMoveModifiedListener listener)
Overrides:
createMoveResponseListener in class MovableComponent

getMessageClass

protected java.lang.Class getMessageClass()
Overrides:
getMessageClass in class MovableComponent
Returns:
the class of the message this component handles.

serverMoveRequest

protected void serverMoveRequest(MovableMessage msg)
Description copied from class: MovableComponent
Called when a message arrives from the server requesting that the cell be moved.

Overrides:
serverMoveRequest in class MovableComponent
Parameters:
msg - the message received from the server

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

getServerTrigger

public int getServerTrigger()

getServerAnimationName

public java.lang.String getServerAnimationName()


Open Wonderland - http://openwonderland.org