public final class PgMapleLoader extends PgAbstractLoader
This loader carefully reads most Maple graphics properties and converts them to JavaView equivalent representation.
The MPL format supported by this loader work bi-directional and can, for example, be re-imported into Maple as Maple plot.
Parsing of some properties like label fonts or axes tickmarks may not be implemented yet.
GEOM_DATA_AUTHOR, GEOM_DATA_COLORS, GEOM_DATA_HEADER, GEOM_DATA_INFO, GEOM_DATA_NORMALS, GEOM_DATA_TEXTURE, GEOM_DATA_VECTORS
Constructor and Description |
---|
PgMapleLoader() |
Modifier and Type | Method and Description |
---|---|
PgJvxSrc[][] |
getAnimations()
Retrieve the previously loaded animations.
|
static boolean |
makeEdgeColorsFromXYZ(PgJvxSrc geom,
int dimCol,
PdVector[] bnd)
Create color from the edge position within its bounding box
which is interpreted as RGB cube.
|
static boolean |
makePolygonColorsFromXYZ(PgJvxSrc geom,
int dimCol,
PdVector[] bnd)
Create color from the edge position within its bounding box
which is interpreted as RGB cube.
|
static boolean |
makeVertexColorsFromXYZ(PgJvxSrc geom,
int dimCol,
PdVector[] bnd)
Create color from the edge position within its bounding box
which is interpreted as RGB cube.
|
static boolean |
makeVertexColorsFromZ(PgJvxSrc geom,
java.awt.Color colLow,
java.awt.Color colHigh,
PdVector[] bnd)
Create color from the vertical z-height within its bounding box
ranging from low blue to high red.
|
static boolean |
makeVertexColorsFromZHue(PgJvxSrc geom,
PdVector[] bnd)
Create color from the vertical z-height within its bounding box
ranging through hue rainbow.
|
PgJvxSrc[] |
read(java.io.BufferedReader in)
Read Maple graphics data.
|
static PgJvxSrc[] |
read(java.lang.String fileName)
Read geometry file in Maple graphic file format.
|
boolean |
write(java.io.Writer writer,
PgJvxSrc[] geomArr)
Write an array of geometries into an output stream writer in Maple PLOT/PLOT3D
file format, called MPL.
|
getDisplayOption, getGeometries, getSpecializedGeometries, isAnimation, isEnabledOptimization, load, read, setAnimation, setDisplayOption, setGeometryOption, write
public PgJvxSrc[][] getAnimations()
This method may be called after successful parsing an input stream
with the method load(BufferedReader)
and
if isAnimation()
returns true
.
getAnimations
in interface PgLoaderIf
getAnimations
in class PgAbstractLoader
PgAbstractLoader.load(BufferedReader)
public static PgJvxSrc[] read(java.lang.String fileName)
public PgJvxSrc[] read(java.io.BufferedReader in)
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 PgLoaderIf
read
in class PgAbstractLoader
in
- BufferedReader to read textual data from.PgAbstractLoader.write(Writer, PgJvxSrc [])
public static boolean makePolygonColorsFromXYZ(PgJvxSrc geom, int dimCol, PdVector[] bnd)
public static boolean makeEdgeColorsFromXYZ(PgJvxSrc geom, int dimCol, PdVector[] bnd)
public static boolean makeVertexColorsFromXYZ(PgJvxSrc geom, int dimCol, PdVector[] bnd)
public static boolean makeVertexColorsFromZ(PgJvxSrc geom, java.awt.Color colLow, java.awt.Color colHigh, PdVector[] bnd)
public static boolean makeVertexColorsFromZHue(PgJvxSrc geom, PdVector[] bnd)
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 annoying fact that double precision numbers fill
the whole text area hiding the exponent, which hides their small value.
write
in interface PgLoaderIf
write
in class PgAbstractLoader
writer
- Write all data to this streamgeomArr
- Array with geometries to savetrue
on success.java.io.IOException
read(BufferedReader)
"