Documentation of 'jvx.loader.PgOffLoader' Java class
PgOffLoader ("JavaView Reference Manual")
"JavaView? v5.03.003"
jvx.loader

Class PgOffLoader

  • All Implemented Interfaces:
    PgLoaderIf


    public final class PgOffLoader
    extends PgAbstractLoader
    Loader for geometry files given in Geometry Center's OFF file format.

    Currently, alpha value is only considered as global alpha and not per face (this will be improved when available in JavaView). The last alpha value of an off file is consider the global alpha of the surface.

    Author:
    Konrad Polthier
    Version:
    22.03.10, 3.00 revised (kp) Superclass changed to PgAbstractLoader.
    25.02.07, 2.10 revised (kp) Now use (1-alpha) as transparency value when reading and writing off files.
    15.02.04, 2.00 revised (kp) Export of 2D geometries improved.
    06.10.03, 1.95 revised (kp) Interface extended by isEnabledOptimization().
    19.04.03, 1.90 revised (kp) Interface extended by setGeometryOption().
    03.03.03, 1.80 revised (kp) Order of vertex colors and normals changed, now normals before colors.
    21.08.02, 1.70 revised (kp) New methods getGeometries/getAnimations of PgLoaderIf implemented.
    23.09.01, 1.60 revised (kp) Implement PgLoaderIf extended with methods for display options.
    11.06.01, 1.50 revised (kp) Implement PgLoaderIf.
    22.08.99, 1.00 created (kp)
    • Constructor Detail

      • PgOffLoader

        public PgOffLoader()
    • Method Detail

      • read

        public static PgJvxSrc[] read(java.lang.String fileName)
        Read an OFF 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().

        Parameters:
        fileName - Name of file to read textual data from.
        Returns:
        Array of JVX geometries.
        See Also:
        write(Writer, PgJvxSrc [])
        Author:
        Konrad Polthier
        Version:
        17.08.12, 1.30 revised (kp) Method made static to sync with other loaders.
        10.06.01, 1.20 revised (kp) Return an array instead a single geometry.
        20.02.01, 1.10 revised (kp) Adjusted to same method of other loaders.
        26.07.00, 1.00 created (kp)
      • read

        public PgJvxSrc[] read(java.io.BufferedReader in)
        Read geometry file in Geometry Center's OFF file format.

        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 [])
        Author:
        Konrad Polthier
        Version:
        10.06.01, 2.10 revised (kp) Return an array instead a single geometry.
        04.03.00, 2.00 revised (kp) Argument geometry removed, just fill private arrays.
        22.08.99, 1.00 created (kp)
      • write

        public boolean write(java.io.Writer writer,
                             PgJvxSrc[] geomArr)
                      throws java.io.IOException
        Write an array of geometries into an output stream writer.

        Numbers with absolute value less than 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)
        Version:
        10.06.01, 1.20 revised (kp) Save array of geometries instead of single geometry.
        22.08.99, 1.10 revised (kp) Number with abs value less than PuMath.EPS are shown as zero.
        22.08.99, 1.00 created (kp)
"JavaView? v5.03.003"

"

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

Ads help maintain this website.