jvx.loader

## Class PgStlLoader

- java.lang.Object
- - jv.loader.PgAbstractLoader
  - - jvx.loader.PgStlLoader

- All Implemented Interfaces:
    PgLoaderIf

      public final class PgStlLoader
      extends PgAbstractLoader

  Loader for geometry files given in STL file format.

- - ### 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
    `PgStlLoader()` Constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `PgJvxSrc[]` | `read(java.io.BufferedReader in)` Read an STL geometry file and return an array of new geometries.
    `PgJvxSrc[]` | `read(java.io.DataInputStream inReader)` Read an array of geometries from a binary input stream.
    `boolean` | `write(java.io.Writer writer, PgJvxSrc[] geomArr)` Write a single element set into an output stream writer.

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

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

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

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

- - ### Constructor Detail

    - #### PgStlLoader

          public PgStlLoader()

      Constructor.

  - ### Method Detail

    - #### read

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

      Read an STL geometry file and return an array of new geometries.

      The returned array of geometry may contain keyframes of an animation. This is checked with the method `isAnimation()`.

      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:
        `write(Writer, PgJvxSrc [])`

    - #### read

          public PgJvxSrc[] read(java.io.DataInputStream inReader)

      Read an array of geometries from a binary input stream.
      Overrides:
        `read` in class `PgAbstractLoader`
      Parameters:
        `inReader` - Provides all data to this stream
      Returns:
        set of loaded geometries on success.
      See Also:
        `PgAbstractLoader.load(BufferedReader)`, `write(Writer, PgJvxSrc [])`

    - #### write

          public boolean write(java.io.Writer writer,
                      PgJvxSrc[] geomArr)
                        throws java.io.IOException

      Write a single element set into an output stream writer. Only the first element set of an array is exported.
      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.
"