edu.washington.NVisF.animator
Class SimpleMovieIO

java.lang.Object
  |
  +--edu.washington.NVisF.animator.MovieIO
        |
        +--edu.washington.NVisF.animator.SimpleMovieIO

public class SimpleMovieIO
extends MovieIO

This class provides a very simple file format for NVisF movies in which each ObjectGroup wraps a PointArray. Basically, it pulls the coordinates and colors from the PointArray and writes them to file, then stuffs them back into a new PointArray on reading. The Appearance is written to a separate file. This is not a proper way to handle movies, but this is intended as a stopgap procedure until the Compressed Geometry methods can be properly debugged.


Constructor Summary
SimpleMovieIO()
           
 
Method Summary
 ObjectGroup[] readMovie(java.lang.String inputFileName)
          Reads a set of ObjectGroups from file.
 boolean writeMovie(ObjectGroup[] frames, java.lang.String outputFileName)
          Writes the Geometry component of the movie onto a file called 'outputFileName.smv', and the Appearance to a file called 'outputFIleName.apr'.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleMovieIO

public SimpleMovieIO()
Method Detail

writeMovie

public boolean writeMovie(ObjectGroup[] frames,
                          java.lang.String outputFileName)
                   throws java.io.IOException
Writes the Geometry component of the movie onto a file called 'outputFileName.smv', and the Appearance to a file called 'outputFIleName.apr'.
Overrides:
writeMovie in class MovieIO
Following copied from class: edu.washington.NVisF.animator.MovieIO
Parameters:
frames - the array of ObjectGroups to write
outputFileName - a String identifying the file to write to
Returns:
boolean true if the write succeeded, false otherwise
Throws:
java.io.IOException - if a write error occurs
java.lang.IllegalArgumentException - if something is wrong with the supplied ObjectGroups

readMovie

public ObjectGroup[] readMovie(java.lang.String inputFileName)
                        throws java.io.IOException
Description copied from class: MovieIO
Reads a set of ObjectGroups from file. The supplied file name is used as a pattern to construct the actual file name, according to the standards of the implmenting class. Most classes will append an extension identifying the file format.
Overrides:
readMovie in class MovieIO
Following copied from class: edu.washington.NVisF.animator.MovieIO
Parameters:
inputFileName - a String identifying the file to read from
Returns:
ObjectGroup[] the frames read from file, or null if something went wrong
Throws:
java.io.IOException - if a read error occurs
java.lang.IllegalArgumentException - if the data is somehow corrupted