jv.loader

## Class PgMapleLoader

- java.lang.Object
- - jv.loader.PgAbstractLoader
  - - jv.loader.PgMapleLoader

- All Implemented Interfaces:
    PgLoaderIf

      public final class PgMapleLoader
      extends PgAbstractLoader

  Loader for Maple plots which were exported from Maple using JavaViewLib or direct export techniques provides by Maple.

  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.

- - ### Field Summary

    - ### Fields inherited from interface jv.loader.PgLoaderIf

      `GEOM_DATA_AUTHOR, GEOM_DATA_COLORS, GEOM_DATA_HEADER, GEOM_DATA_INFO, GEOM_DATA_NORMALS, GEOM_DATA_TEXTURE, GEOM_DATA_VECTORS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PgMapleLoader()`

  - ### Method Summary

    Methods
    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.

    - ### Methods inherited from class jv.loader.PgAbstractLoader

      `getDisplayOption, getGeometries, getSpecializedGeometries, isAnimation, isEnabledOptimization, load, read, setAnimation, setDisplayOption, setGeometryOption, write`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PgMapleLoader

          public PgMapleLoader()

  - ### Method Detail

    - #### getAnimations

          public PgJvxSrc[][] getAnimations()

      Retrieve the previously loaded animations.

      This method may be called after successful parsing an input stream with the method `load(BufferedReader)` and if `isAnimation()` returns `true`.

      Specified by:
        `getAnimations` in interface `PgLoaderIf`
      Overrides:
        `getAnimations` in class `PgAbstractLoader`
      Returns:
        Double array of JVX geometries.
      See Also:
        `PgAbstractLoader.load(BufferedReader)`

    - #### read

          public static PgJvxSrc[] read(java.lang.String fileName)

      Read geometry file in Maple graphic file format.

    - #### read

          public PgJvxSrc[] read(java.io.BufferedReader in)

      Read Maple graphics data.

      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.

      Specified by:
        `read` in interface `PgLoaderIf`
      Overrides:
        `read` in class `PgAbstractLoader`
      Parameters:
        `in` - BufferedReader to read textual data from.
      Returns:
        Array of JVX geometries.
      See Also:
        `PgAbstractLoader.write(Writer, PgJvxSrc [])`

    - #### makePolygonColorsFromXYZ

          public 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. If dimension of vertices is smaller than three then only the first vertex components are used in the color computation.

    - #### makeEdgeColorsFromXYZ

          public 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. If dimension of vertices is smaller than three then only the first vertex components are used in the color computation.
      Since:
        JavaView 2.69

    - #### makeVertexColorsFromXYZ

          public 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. If dimension of vertices is smaller than three then only the first vertex components are used in the color computation.

    - #### makeVertexColorsFromZ

          public 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. If dimension of vertices is smaller than three then the highest vertex component are used instead of the z-component in the color computation.

    - #### makeVertexColorsFromZHue

          public static boolean makeVertexColorsFromZHue(PgJvxSrc geom,
                                         PdVector[] bnd)

      Create color from the vertical z-height within its bounding box ranging through hue rainbow. If dimension of vertices is smaller than three then the highest vertex component are used instead of the z-component in the color computation.

    - #### 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 Maple PLOT/PLOT3D file format, called MPL.

      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.

      Specified by:
        `write` in interface `PgLoaderIf`
      Overrides:
        `write` in class `PgAbstractLoader`
      Parameters:
        `writer` - Write all data to this stream
        `geomArr` - Array with geometries to save
      Returns:
        `true` on success.
      Throws:
        `java.io.IOException`
      See Also:
        `read(BufferedReader)`

"

The software JavaView? is copyright protected. All Rights Reserved.
"