org.jdesktop.wonderland.client.jme
Class ThirdPersonCameraProcessor

java.lang.Object
  extended by org.jdesktop.wonderland.client.jme.ThirdPersonCameraProcessor
All Implemented Interfaces:
CameraController
Direct Known Subclasses:
FirstPersonCameraProcessor, FrontHackPersonCameraProcessor

public class ThirdPersonCameraProcessor
extends java.lang.Object
implements CameraController

A very simplistic third person camera model

Author:
paulby

Field Summary
protected  com.jme.math.Vector3f cameraLook
           
protected  float cameraZoom
           
protected  com.jme.math.Vector3f offset
           
 
Constructor Summary
ThirdPersonCameraProcessor()
           
 
Method Summary
 void commit()
           
 void compute()
           
protected  void setCameraPosition(com.jme.math.Quaternion rotation, com.jme.math.Vector3f translation)
          Override this method to add offsets to the camera before the update is applied.
protected  void setCommitRequired()
          Notify the camera that an update is required
 void setEnabled(boolean enabled, com.jme.scene.CameraNode cameraNode)
           
 void viewMoved(CellTransform worldTransform)
          Called from the compute thread if the view has moved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cameraZoom

protected float cameraZoom

offset

protected com.jme.math.Vector3f offset

cameraLook

protected com.jme.math.Vector3f cameraLook
Constructor Detail

ThirdPersonCameraProcessor

public ThirdPersonCameraProcessor()
Method Detail

compute

public void compute()
Specified by:
compute in interface CameraController

commit

public void commit()
Specified by:
commit in interface CameraController

setCameraPosition

protected void setCameraPosition(com.jme.math.Quaternion rotation,
                                 com.jme.math.Vector3f translation)
Override this method to add offsets to the camera before the update is applied.

Parameters:
rotation - the calculated rotation
translation - the calculated translation

setCommitRequired

protected void setCommitRequired()
Notify the camera that an update is required


viewMoved

public void viewMoved(CellTransform worldTransform)
Description copied from interface: CameraController
Called from the compute thread if the view has moved

Specified by:
viewMoved in interface CameraController

setEnabled

public void setEnabled(boolean enabled,
                       com.jme.scene.CameraNode cameraNode)
Specified by:
setEnabled in interface CameraController


Open Wonderland - http://openwonderland.org