JavaView® v2.12

jv.loader
Class PgMathLoader

java.lang.Object
  |
  +--jv.loader.PgMathLoader

public class PgMathLoader
extends java.lang.Object

Loader for Mathematica geometries. Reads Graphics, Graphics3d, SurfaceGraphics or lists of these from the Mathematica format "InputForm". If a list of Graphics, Graphics3d or SurfaceGraphics should get animated in JavaView, it must be applied with the keyword "ShowAnimation"; the former keywords "Animation" and "KeyAnimation" will work still.

Version:
17.05.01, 1.39 revised (kp) Bug with class verification exception in jvLite cured.
23.03.01, 1.38 revised (ur) Color handling adjusted for Lighting->True/False.
20.03.01, 1.37 revised (ur) Correct camera settings without display.fit().
14.03.01, 1.37 revised (ur) Lighting->False handled, Bug in SurfaceGraphics faceColors removed.
08.03.01, 1.36 revised (ur) Set neighbour informations in readParametricSurface.
07.03.01, 1.35 revised (ur) Read DensityGraphics, new Graphics primitive Arrow, add two LightSources, whenever Mathematica default Lightsorces are given.
05.03.01, 1.34 revised (ur) Setting of backFace Colors activated.
28.02.01, 1.33 revised (ur) Call of computeMathematicaColors moved to method read, using of ShowAnimation as keyword enabled.
12.02.01, 1.32 revised (ur) Computing of element colors from LightSources, handling of some options improved.
06.02.01, 1.31 revised (ur) Internal changes in Color handling.
31.01.01, 1.30 revised (ur) Compute camera position and interest in world coordinates and give these to displayOption.
11.12.00, 1.29 revised (ur) "PgMathData" replaced by PgJvxSrc[]; setting of display options improved.
06.10.00, 1.28 revised (ur) Doubled code for reading viewer options moved to new method.
26.09.00, 1.27 revised (ur) Improved reading colors of geometries.
18.09.00, 1.26 revised (ep) Bugfix "ordinaryChar('-')" in method readGraphics(StreamTokenizer).
24.08.00, 1.25 revised (ur) Parsing of Mathematica's viewer options added.
23.08.00, 1.24 revised (ur) Enabled to read mgs files with header comment indicated by (* ... *).
13.07.00, 1.23 revised (kp) Static instance variables replaced with direct reference to PvGeometry variables.
13.07.00, 1.22 revised (ur) Adapted geomType integers to PvGeometryIf; bug in read(String fileName) removed.
01.05.00, 1.21 revised (ep) Removed bug in polygon allocation.
27.03.00, 1.20 revised (ur) All PgGeometry dependency removed; modified to be extension of PgLoaderSrc.
09.11.99, 1.10 revised (ur) Enabled reading lists of lists of graphics primitives in readGraphics.
07.09.99, 1.00 created (ur)
Author:
Ulrich Reitebuch

Constructor Summary
PgMathLoader()
           
 
Method Summary
 PvDisplayOption getDisplayOption()
          Return display options.
 boolean isAnimation()
          Return, if list of geometries is an animation.
 boolean isKeyAnimation()
          Return, if list of geometries is a keyframe animation.
 PgJvxSrc[][] read(java.io.BufferedReader in)
          Parse a Mathematica graphics from a bufferedReader.
 void setAnimation(boolean flag)
          Set flag, if list of geometries is an animation.
 void setKeyAnimation(boolean flag)
          Set flag, if list of geometries is a keyframe animation.
 boolean write(java.io.Writer writer, PgJvxSrc[] geomArr)
          Write an array of geometries into an output stream writer in Mathematica expression file format, called MGS.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PgMathLoader

public PgMathLoader()
Method Detail

isKeyAnimation

public boolean isKeyAnimation()
Return, if list of geometries is a keyframe animation.

setKeyAnimation

public void setKeyAnimation(boolean flag)
Set flag, if list of geometries is a keyframe animation.

isAnimation

public boolean isAnimation()
Return, if list of geometries is an animation.

setAnimation

public void setAnimation(boolean flag)
Set flag, if list of geometries is an animation.

read

public PgJvxSrc[][] read(java.io.BufferedReader in)
Parse a Mathematica graphics from a bufferedReader.

write

public boolean write(java.io.Writer writer,
                     PgJvxSrc[] geomArr)
              throws java.io.IOException
Write an array of geometries into an output stream writer in Mathematica expression file format, called MGS.

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.

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

getDisplayOption

public PvDisplayOption getDisplayOption()
Return display options.

JavaView® v2.12

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