de.rico.engine.camera.recorder
Class CamPlayer

java.lang.Object
  extended by de.rico.engine.camera.recorder.CamPlayer

public class CamPlayer
extends java.lang.Object

This class can be used to play the checkpoints of a camera flight, which simulates a scripted camera. The checkpoints can either be provided directly as a CameraFlight object or be retrieved from a file that containes the camera flight data in serialized form.

Author:
Frank Bruns

Constructor Summary
CamPlayer(CameraFlight flight)
          Creates a new camera flight player initialized with the specified camera flight object.
CamPlayer(java.lang.String pathToFile)
          Creates a new camera flight player initialized with the camera flight object specified by the file path.
 
Method Summary
 boolean isPlaying()
          Determines whether or not the player is playing a camera flight.
 void reset()
          Resets the camera flight player to the initial status.
 void start()
          Stats playing the previously assigned camera flight.
 void stop()
          Stops playing the camera flight.
 void update(long elapsedTime)
          Updates the camera flight player.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CamPlayer

public CamPlayer(CameraFlight flight)
Creates a new camera flight player initialized with the specified camera flight object.

Parameters:
flight - camera flight to play with the player

CamPlayer

public CamPlayer(java.lang.String pathToFile)
Creates a new camera flight player initialized with the camera flight object specified by the file path.

Parameters:
pathToFile - path to file containing the camera flight.
Method Detail

start

public void start()
Stats playing the previously assigned camera flight.


isPlaying

public boolean isPlaying()
Determines whether or not the player is playing a camera flight.

Returns:
is playing? --> true=yes, false=no

stop

public void stop()
Stops playing the camera flight.


reset

public void reset()
Resets the camera flight player to the initial status.


update

public void update(long elapsedTime)
Updates the camera flight player.

Parameters:
elapsedTime - time between two frames