JavaView® v2.12

jvx.loader
Class PgOffLoader

java.lang.Object
  |
  +--jvx.loader.PgOffLoader
All Implemented Interfaces:
PgLoaderIf

public class PgOffLoader
extends java.lang.Object
implements PgLoaderIf

Loader for geometry files given in Geometry Center's OFF file format.

Version:
23.09.01, 1.60 revised (kp) Implement PgLoaderIf extended with methods for display options.
11.06.01, 1.50 revised (kp) Implement PgLoaderIf.
22.08.99, 1.00 created (kp)
Author:
Konrad Polthier

Constructor Summary
PgOffLoader()
           
 
Method Summary
 PvDisplayOption getDisplayOption()
          Get display options which some parsers and geometry file formats supply.
 boolean isAnimation()
          Determine if currently loaded data is an animation.
 PgJvxSrc[] read(java.io.BufferedReader in)
          Read geometry file in Geometry Center's OFF file format.
 PgJvxSrc[] read(java.lang.String fileName)
          Read an OFF geometry file and return an array of new geometries.
 void setAnimation(boolean flag)
          Set flag whether current geometry data is an animation.
 void setDisplayOption(PvDisplayOption option)
          Set the display options to be saved within the geometry file.
 boolean write(java.io.Writer writer, PgJvxSrc[] geomArr)
          Write an array of geometries into an output stream writer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PgOffLoader

public PgOffLoader()
Method Detail

getDisplayOption

public PvDisplayOption getDisplayOption()
Get display options which some parsers and geometry file formats supply.
Specified by:
getDisplayOption in interface PgLoaderIf

setDisplayOption

public void setDisplayOption(PvDisplayOption option)
Set the display options to be saved within the geometry file. This method must be called before writing the geometry.
Specified by:
setDisplayOption in interface PgLoaderIf

isAnimation

public boolean isAnimation()
Determine if currently loaded data is an animation.
Specified by:
isAnimation in interface PgLoaderIf

setAnimation

public void setAnimation(boolean flag)
Set flag whether current geometry data is an animation.
Specified by:
setAnimation in interface PgLoaderIf

read

public PgJvxSrc[] read(java.lang.String fileName)
Read an OFF geometry file and return an array of new geometries.

The returned array of geometry may contain keyframes of an animation. This is checked with the method isAnimation().

Parameters:
in - BufferedReader to read textual data from.
Returns:
Array of JVX geometries.
See Also:
#write(Writer)

read

public PgJvxSrc[] read(java.io.BufferedReader in)
Read geometry file in Geometry Center's OFF file format.
Specified by:
read in interface PgLoaderIf
Following copied from interface: jv.loader.PgLoaderIf
Parameters:
in - BufferedReader to read textual data from.
Returns:
Array of JVX geometries.
See Also:
#write(Writer)

write

public boolean write(java.io.Writer writer,
                     PgJvxSrc[] geomArr)
              throws java.io.IOException
Write an array of geometries into an output stream writer.

Numbers with absolute value less than EPS are shown as zero. This avoids the anoying fact that double precision numbers fill the whole text area hiding the exponent, which hides their small value.

Specified by:
write in interface PgLoaderIf
Parameters:
writer - Write all data to this stream
geomArr - Array with geometries to save
Returns:
true on success.
See Also:
#read(PgGeometry [], BufferedReader)

JavaView® v2.12

The software JavaView® is copyright protected. All Rights Reserved.