vgp.tutor.loader

## Class PgAbcLoader

- java.lang.Object
- - jv.loader.PgAbstractLoader
  - - vgp.tutor.loader.PgAbcLoader

- All Implemented Interfaces:
    PgLoaderIf

      public class PgAbcLoader
      extends PgAbstractLoader

  Loader for geometry files given in a user defined file format.

  In JavaView the file name convention is that Abc is replaced with a user defined file name extension of three characters.

  Author:
    Konrad Polthier
  Version:
    22.03.10, 2.00 revised (kp) Superclass changed to PgAbstractLoader.
    07.03.03, 1.10 revised (kp) Index of first vertex may now be changed.
    09.11.01, 1.00 created (kp)

- - ### 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
    `PgAbcLoader()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getFirstVertexIndex()` Vertices are assigned an index starting at the given value.
    `PgJvxSrc[]` | `read(java.io.BufferedReader in)` Read an ABC geometry file and return an array of new geometries.
    `void` | `setFirstVertexIndex(int index)` Vertices are assigned an index starting at the given value.
    `boolean` | `write(java.io.Writer writer, PgJvxSrc[] geomArr)` Write an array of geometries into an output stream writer.

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

      `getAnimations, 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

    - #### PgAbcLoader

          public PgAbcLoader()

  - ### Method Detail

    - #### write

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

      Write an array of geometries into an output stream writer.
      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)`
      Version:
        07.03.03, 1.10 revised (kp) Index of first vertex is used.
        09.11.01, 1.00 created (kp)

    - #### read

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

      Read an ABC 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 [])`
      Author:
        Konrad Polthier
      Version:
        10.06.01, 1.10 revised (kp) Return an array instead a single geometry.
        26.02.01, 1.00 created (kp)

    - #### getFirstVertexIndex

          public int getFirstVertexIndex()

      Vertices are assigned an index starting at the given value. Default index counting starts at 0. For example, OBJ, OFF and JVX use index counting [0, numOfVertices-1] while BUY use indices in the range [1, numOfVertices].

      The faces of a mesh are defined by referencing the vertices of a face by their index.

      Returns:
        index of first vertex
      Since:
        JavaView 2.81.000
      Version:
        07.06.03, 1.00 created (kp)

    - #### setFirstVertexIndex

          public void setFirstVertexIndex(int index)

      Vertices are assigned an index starting at the given value. Default index counting starts at 0. For example, OBJ, OFF and JVX use index counting [0, numOfVertices-1] while BUY use indices in the range [1, numOfVertices].

      The faces of a mesh are defined by referencing the vertices of a face by their index.

      Parameters:
        `index` - index of first vertex
      Since:
        JavaView 2.81.000
      Version:
        07.06.03, 1.00 created (kp)

"

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