org.xith3d.utility.camera.flight
Class CameraFlightRecorder

java.lang.Object
  extended by org.xith3d.loop.opscheduler.Interval
      extended by org.xith3d.utility.camera.flight.CameraFlightRecorder
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, IntervalListener

public class CameraFlightRecorder
extends Interval
implements IntervalListener

Used to record a camera flight. The flight can be replayed with CameraFlight.

See Also:
CameraFlight

Constructor Summary
CameraFlightRecorder(Transformable view, long resolution)
          Creates a new CameraFlightRecorder
 
Method Summary
 void onIntervalHit(Interval interval, long gameTime, long frameTime, UpdatingThread.TimingMode timingMode)
          This method is executed each time an interval is hit
 void startRecord(long startTime, java.io.File file)
          Starts the record.
 void startRecord(long startTime, java.io.File file, CameraFlight.Format format)
          Starts the record.
 void startRecord(long startTime, java.lang.String filename)
          Starts the record.
 void startRecord(long startTime, java.lang.String filename, CameraFlight.Format format)
          Starts the record.
 void stopRecord()
          Stops the recording and closes the file.
 
Methods inherited from class org.xith3d.loop.opscheduler.Interval
check, getInterval, getName, isAlive, kill, onIntervalHit, onIntervalStarted, revive, setInterval, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CameraFlightRecorder

public CameraFlightRecorder(Transformable view,
                            long resolution)
Creates a new CameraFlightRecorder

Method Detail

onIntervalHit

public void onIntervalHit(Interval interval,
                          long gameTime,
                          long frameTime,
                          UpdatingThread.TimingMode timingMode)
This method is executed each time an interval is hit

Specified by:
onIntervalHit in interface IntervalListener
Parameters:
interval - the hit Interval
gameTime - the current gameTime
frameTime - the time needed to render the last frame

startRecord

public void startRecord(long startTime,
                        java.io.File file,
                        CameraFlight.Format format)
Starts the record.

Parameters:
startTime - the current gameTime
file - the file where the flight is to be saved
format - the file's format

startRecord

public void startRecord(long startTime,
                        java.lang.String filename,
                        CameraFlight.Format format)
Starts the record.

Parameters:
startTime - the current gameTime
filename - the filename where the flight is to be saved
format - the file's format

startRecord

public void startRecord(long startTime,
                        java.io.File file)
Starts the record.

Parameters:
startTime - the current gameTime
file - the file where the flight is to be saved

startRecord

public void startRecord(long startTime,
                        java.lang.String filename)
Starts the record.

Parameters:
startTime - the current gameTime
filename - the filename where the flight is to be saved

stopRecord

public void stopRecord()
Stops the recording and closes the file.