org.xith3d.utility.camera.flight
Class CameraFlight

java.lang.Object
  extended by org.xith3d.utility.camera.flight.CameraFlight

public class CameraFlight
extends java.lang.Object

This class can be used to replay a pre-recorded camera flight.

See Also:
CameraFlightRecorder

Nested Class Summary
static class CameraFlight.Format
           
 class CameraFlight.InterpolationPoint
           
 
Constructor Summary
CameraFlight()
          Creates a new CameraFlight
CameraFlight(java.io.File file)
          Creates a new CameraFlight and loads data from the given file.
CameraFlight(java.io.InputStream in)
          Creates a new CameraFlight and loads data from the given InputStream.
CameraFlight(java.util.List<CameraFlight.InterpolationPoint> interPoints)
           
CameraFlight(java.lang.String filename)
          Creates a new CameraFlight and loads data from the given file.
CameraFlight(java.net.URL url)
          Creates a new CameraFlight and loads data from the given URL.
 
Method Summary
 void addCameraFlightListener(CameraFlightListener l)
          Adds a new CameraFlightListener to the list
 void addRotPos(org.openmali.vecmath2.Matrix3f rot, org.openmali.vecmath2.Point3f pos, float deltaTime)
          Adds a camera-transformation-matrix to the list.
 void load(java.io.File file)
          Loads the CameraFlight from the specified File.
 void load(java.io.InputStream in)
          Loads the CameraFlight from the specified InputStream.
 void load(java.lang.String filename)
          Loads the CameraFlight from the specified file.
 void load(java.net.URL url)
          Loads the CameraFlight from the specified URL.
 void removeCameraFlightListener(CameraFlightListener l)
          Remvoes a CameraFlightListener from the list
 void restart(long gameTime, UpdatingThread.TimingMode timingMode)
           
 void start(long startTime)
           
 void updateCamera(Transformable cam, long gameTime, UpdatingThread.TimingMode timingMode)
          Interpolates View rotation and position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CameraFlight

public CameraFlight()
Creates a new CameraFlight


CameraFlight

public CameraFlight(java.util.List<CameraFlight.InterpolationPoint> interPoints)

CameraFlight

public CameraFlight(java.io.InputStream in)
             throws java.io.IOException
Creates a new CameraFlight and loads data from the given InputStream.

Throws:
java.io.IOException

CameraFlight

public CameraFlight(java.net.URL url)
             throws java.io.IOException
Creates a new CameraFlight and loads data from the given URL. If read from a URL, the resource must not be a compressed flight file.

Throws:
java.io.IOException

CameraFlight

public CameraFlight(java.io.File file)
             throws java.io.IOException
Creates a new CameraFlight and loads data from the given file.

Throws:
java.io.IOException

CameraFlight

public CameraFlight(java.lang.String filename)
             throws java.io.IOException
Creates a new CameraFlight and loads data from the given file.

Throws:
java.io.IOException
Method Detail

addCameraFlightListener

public void addCameraFlightListener(CameraFlightListener l)
Adds a new CameraFlightListener to the list

Parameters:
l - the new listener to be added

removeCameraFlightListener

public void removeCameraFlightListener(CameraFlightListener l)
Remvoes a CameraFlightListener from the list

Parameters:
l - the listener to be removed

updateCamera

public void updateCamera(Transformable cam,
                         long gameTime,
                         UpdatingThread.TimingMode timingMode)
Interpolates View rotation and position.

Parameters:
cam - the View to be updated
gameTime - the current game time
timingMode -

restart

public void restart(long gameTime,
                    UpdatingThread.TimingMode timingMode)
Parameters:
gameTime -
timingMode -

start

public void start(long startTime)

addRotPos

public void addRotPos(org.openmali.vecmath2.Matrix3f rot,
                      org.openmali.vecmath2.Point3f pos,
                      float deltaTime)
Adds a camera-transformation-matrix to the list.

Parameters:
rot -
pos -
deltaTime -

load

public void load(java.io.InputStream in)
          throws java.io.IOException
Loads the CameraFlight from the specified InputStream.

Parameters:
in - the InputStream to load from
Throws:
java.io.IOException

load

public void load(java.net.URL url)
          throws java.io.IOException
Loads the CameraFlight from the specified URL.
If read from a URL, the resource must not be a compressed flight file.

Parameters:
url - the URL to load from
Throws:
java.io.IOException

load

public void load(java.io.File file)
          throws java.io.IOException
Loads the CameraFlight from the specified File.

Parameters:
file - the File to load from
Throws:
java.io.IOException

load

public void load(java.lang.String filename)
          throws java.io.IOException
Loads the CameraFlight from the specified file.

Parameters:
filename - the file to load from
Throws:
java.io.IOException