org.xith3d.utility.camera
Class BasicPlaceableVerticalFocuser

java.lang.Object
  extended by org.xith3d.utility.camera.BasicPlaceableVerticalFocuser
All Implemented Interfaces:
ScheduledOperation, Updatable
Direct Known Subclasses:
SmoothPlaceableVerticalFocuser

public class BasicPlaceableVerticalFocuser
extends java.lang.Object
implements ScheduledOperation

A Camera which follows a Placeable object, so that it is always at the center of the screen. The height of the camera is adjustable, up vector is always +Y


Field Summary
protected  org.openmali.vecmath2.Vector3f move
           
 
Constructor Summary
BasicPlaceableVerticalFocuser(OperationScheduler opSched, View view, org.jagatoo.datatypes.Placeable placeable, float height)
           
 
Method Summary
protected  org.openmali.vecmath2.Tuple3f getFocusPoint()
           
 float getHeight()
           
 boolean isAlive()
          if false, the object will be removed from the scheduler next loop iteration
 boolean isPersistent()
          If this operation is persistent, it remains scheduled after beeing executed once.
protected  void lookAt(org.openmali.vecmath2.Tuple3f pos)
           
 void setAlive(boolean alive)
          Sets this Object alive or dead
 void setHeight(float height)
           
 void update(long gameTime, long frameTime, UpdatingThread.TimingMode timingMode)
          Updates this Updatable object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

move

protected org.openmali.vecmath2.Vector3f move
Constructor Detail

BasicPlaceableVerticalFocuser

public BasicPlaceableVerticalFocuser(OperationScheduler opSched,
                                     View view,
                                     org.jagatoo.datatypes.Placeable placeable,
                                     float height)
Method Detail

update

public void update(long gameTime,
                   long frameTime,
                   UpdatingThread.TimingMode timingMode)
Description copied from interface: Updatable
Updates this Updatable object.

Specified by:
update in interface Updatable
Parameters:
gameTime - the gameTime in Milliseconds
frameTime - the frameTime in Milliseconds (needed time for the last frame)
timingMode - the TimingMode to use for frameTime.

lookAt

protected void lookAt(org.openmali.vecmath2.Tuple3f pos)

getFocusPoint

protected org.openmali.vecmath2.Tuple3f getFocusPoint()

isAlive

public boolean isAlive()
Description copied from interface: ScheduledOperation
if false, the object will be removed from the scheduler next loop iteration

Specified by:
isAlive in interface ScheduledOperation

isPersistent

public boolean isPersistent()
Description copied from interface: ScheduledOperation
If this operation is persistent, it remains scheduled after beeing executed once.

Specified by:
isPersistent in interface ScheduledOperation

setAlive

public void setAlive(boolean alive)
Description copied from interface: ScheduledOperation
Sets this Object alive or dead

Specified by:
setAlive in interface ScheduledOperation
Parameters:
alive - if false, the object will be removed from the scheduler next loop iteration

getHeight

public float getHeight()
Returns:
the height

setHeight

public void setHeight(float height)
Parameters:
height - the height to set