|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jv.loader.PgMathLoader
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.
readGraphics(StreamTokenizer).| Field Summary | |
protected java.util.Vector |
graphicsVector
|
protected PdVector |
m_boundingBoxMax
Bounding box for all parsed geometries, maximum values. |
protected PdVector |
m_boundingBoxMin
Bounding box for all parsed geometries, minimum values. |
protected PdVector[] |
m_circle
List of circles in one graphics-object |
protected int |
m_dim
Dimension of geometries |
protected PdVector[] |
m_disk
List of discs in one graphics-object |
protected PvDisplayOption |
m_displayOption
Options to be set in Display |
protected PgJvxSrc[] |
m_geom
List of geometries in one graphics object. |
protected PgJvxSrc[][] |
m_graphics
List of Graphics objects. |
protected boolean |
m_isAnimation
Flag, if list of geometries is an animation. |
protected boolean |
m_isKeyAnimation
Flag, if list of geometries is a keyframe animation. |
protected int |
m_numGraphics
Number of PgJvxSrc[] in graphicsVector |
protected PdVector |
m_viewVertical
Vector to be showed vertical in display. |
| Constructor Summary | |
PgMathLoader()
Constructor |
|
| Method Summary | |
protected void |
adjustViewer()
Compute the correct 3D position of camera and lightSources. |
protected void |
computeMathematicaColors(PgJvxSrc geom)
Compute element colors from lightSources as in Mathematica. |
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. |
protected boolean |
parseMath(java.io.BufferedReader bufReader)
Parse the Mathematica graphics given in the input bufferedReader. |
protected boolean |
parseVector(java.io.StreamTokenizer st,
PdVector vec,
int dimension)
Parse a vector of doubles. |
PgJvxSrc[][] |
read(java.io.BufferedReader in)
Parse a Mathematica graphics from a bufferedReader. |
protected void |
readAxesLabel(java.io.StreamTokenizer st,
int dim)
Read "AxesLabel" option. |
java.awt.Color |
readCMYKColor(java.io.StreamTokenizer st)
Parse a Color in cyan-magenta-yellow-black notation. |
boolean |
readGraphics(java.io.StreamTokenizer st)
Parse a Mathematica graphics object. |
java.awt.Color |
readGrayLevel(java.io.StreamTokenizer st)
Parse a Color given by gray-level. |
java.awt.Color |
readHueColor(java.io.StreamTokenizer st)
Parse a Color by hue-saturation-brightness notation. |
double |
readNumber(java.io.StreamTokenizer st)
Parse a number in Mathematica exponential notation "*^". |
protected boolean |
readOptions(java.io.StreamTokenizer st)
Read viewer options: Boxed, Axes, Lighting, LightSources, ViewPoint, ViewCenter, AxesEdge, AmbientLight, BoxRatios, Background, PolygonIntersections, ViewVertical. |
boolean |
readParametricSurface(java.io.StreamTokenizer st)
Parse a Mathematica parametric surface graphics object. |
java.awt.Color |
readRGBColor(java.io.StreamTokenizer st)
Parse a Color in red-green-blue notation. |
java.lang.String |
readString(java.io.StreamTokenizer st)
Parse a String included by quotes |
int |
readSurfaceColor(java.io.StreamTokenizer st,
java.awt.Color[] c)
Parse a SurfaceColor object. |
protected void |
setDisplayDefault()
Set all values in PvDisplayOption to the Mathematica default values. |
void |
setKeyAnimation(boolean flag)
Return, if list of geometries is a keyframe animation. |
static java.lang.String |
write(PgJvxSrc geom)
Write a geometry into a string in Mathematica expression file format, called MGS. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int m_dim
protected PdVector[] m_circle
protected PdVector[] m_disk
protected boolean m_isKeyAnimation
protected boolean m_isAnimation
protected PgJvxSrc[] m_geom
protected PgJvxSrc[][] m_graphics
protected java.util.Vector graphicsVector
protected int m_numGraphics
protected PvDisplayOption m_displayOption
protected PdVector m_boundingBoxMin
protected PdVector m_boundingBoxMax
protected PdVector m_viewVertical
| Constructor Detail |
public PgMathLoader()
| Method Detail |
public void setKeyAnimation(boolean flag)
public boolean isKeyAnimation()
public boolean isAnimation()
public PgJvxSrc[][] read(java.io.BufferedReader in)
protected boolean parseMath(java.io.BufferedReader bufReader)
throws java.io.IOException
public boolean readGraphics(java.io.StreamTokenizer st)
public boolean readParametricSurface(java.io.StreamTokenizer st)
public double readNumber(java.io.StreamTokenizer st)
public static java.lang.String write(PgJvxSrc geom)
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.
public java.lang.String readString(java.io.StreamTokenizer st)
public java.awt.Color readRGBColor(java.io.StreamTokenizer st)
public java.awt.Color readGrayLevel(java.io.StreamTokenizer st)
public java.awt.Color readHueColor(java.io.StreamTokenizer st)
public java.awt.Color readCMYKColor(java.io.StreamTokenizer st)
public int readSurfaceColor(java.io.StreamTokenizer st,
java.awt.Color[] c)
protected void setDisplayDefault()
public PvDisplayOption getDisplayOption()
protected boolean readOptions(java.io.StreamTokenizer st)
protected void readAxesLabel(java.io.StreamTokenizer st,
int dim)
protected boolean parseVector(java.io.StreamTokenizer st,
PdVector vec,
int dimension)
protected void computeMathematicaColors(PgJvxSrc geom)
protected void adjustViewer()
|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||