Documentation of 'vgp.tutor.loader.PgAbcLoader' Java class
PgAbcLoader ("JavaView Reference Manual")
"JavaView? v5.03.003"
vgp.tutor.loader

Class 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)
    • 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)
"JavaView? v5.03.003"

"

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

Ads help maintain this website.