public final class PgMathLoader extends PgAbstractLoader
GEOM_DATA_AUTHOR, GEOM_DATA_COLORS, GEOM_DATA_HEADER, GEOM_DATA_INFO, GEOM_DATA_NORMALS, GEOM_DATA_TEXTURE, GEOM_DATA_VECTORS| Constructor and Description |
|---|
PgMathLoader() |
| Modifier and Type | Method and Description |
|---|---|
PvDisplayOption[] |
getDisplayOptions()
Get array of display options which some parsers and geometry file formats supply.
|
boolean |
isEnabledOptimization()
Determines if the loaded geometry requires some optimization.
|
boolean |
isKeyAnimation()
Return, if list of geometries is a keyframe animation.
|
PgJvxSrc[] |
read(java.io.BufferedReader in)
Read a Mathematica graphics from a bufferedReader.
|
void |
setKeyAnimation(boolean flag)
Set flag, if list of geometries is a keyframe animation.
|
void |
setMathematicaVersion(double version)
Set Mathematica Version number.
|
boolean |
write(java.io.DataOutputStream outWriter,
PgJvxSrc[] geom)
Write an array of geometries into a binary output stream writer.
|
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.
|
getAnimations, getDisplayOption, getGeometries, getSpecializedGeometries, isAnimation, load, read, setAnimation, setDisplayOption, setGeometryOptionpublic boolean isEnabledOptimization()
For example, some file formats do not store a connected mesh but provide individual vertices for each face every time the face is mentioned. In this case, a loader manager may identify equal vertices.
A similar method in the loader manager PgLoader may override the individual settings of each loader.
isEnabledOptimization in interface PgLoaderIfisEnabledOptimization in class PgAbstractLoadertrue if loader is enabled for optimization.PgLoader.isEnabledOptimization(),
PgLoader.setEnabledOptimization(boolean)public void setMathematicaVersion(double version)
version - public boolean isKeyAnimation()
public void setKeyAnimation(boolean flag)
public PgJvxSrc[] read(java.io.BufferedReader in)
isAnimation() use either the methods
getGeometries() or
getAnimations() to retrieve the loaded geometries
from this loader.
Alternatively, one may call load(BuffereredReader) followed by getGeometries() resp. getAnimations() to have a finer control about which information one wants to use from a source. For example, optional display information must be retrieve by a subsequent call getDisplayOption() if available.
read in interface PgLoaderIfread in class PgAbstractLoaderin - BufferedReader to read textual data from.PgAbstractLoader.isAnimation(),
PgAbstractLoader.getAnimations(),
PgAbstractLoader.getGeometries()public boolean write(java.io.DataOutputStream outWriter,
PgJvxSrc[] geom)
throws java.io.IOException
write in interface PgLoaderIfwrite in class PgAbstractLoaderoutWriter - Write all data to this streamgeom - Array with geometries to savetrue on success.java.io.IOExceptionread(BufferedReader),
write(Writer, PgJvxSrc [])public boolean write(java.io.Writer writer,
PgJvxSrc[] geomArr)
throws java.io.IOException
Numbers with absolute value less than jv.vecmath.PuMath#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.
write in interface PgLoaderIfwrite in class PgAbstractLoaderwriter - Write all data to this streamgeomArr - Array with geometries to savetrue on success.java.io.IOExceptionread(BufferedReader)public PvDisplayOption[] getDisplayOptions()
"