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.

- - ### 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

    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)`

    - #### 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 [])`

    - #### 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

    - #### 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

"

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