jvx.loader

## Class PgU3dLoader

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

- All Implemented Interfaces:
    PgLoaderIf

      public final class PgU3dLoader
      extends PgAbstractLoader

  Loader for geometry files given in U3D format, specified by the ecma standard ECMA-363.
  Author:
    Ulrich Reitebuch
  Version:
    13.03.18, 3.10 revised (kp) Obsolete empty dummy read()-methods removed.
    09.03.15, 3.00 revised (kp) Moved to jvx.loader from dev.loader.
    22.03.10, 2.00 revised (kp) Superclass changed to PgAbstractLoader.
    23.03.06, 1.00 created (ur)

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `storeElementColorsAtVertices(boolean flag)` Enable storing of element colors at vertices.
    `static void` | `storeElementColorsInShaders(boolean flag)` Enable storing of element colors in shaders.
    `boolean` | `write(java.io.DataOutputStream outWriter, PgJvxSrc[] geomArr)` Write an array of geometries to a file.
    `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, read, setAnimation, setDisplayOption, setGeometryOption`

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

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

- - ### Constructor Detail

    - #### PgU3dLoader

          public PgU3dLoader()

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

      Numbers with absolute value less than `jv.vecmath.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:
        `PgAbstractLoader.read(BufferedReader)`
      Version:
        09.09.02, 2.00 revised (kp) Exchange vn and vt, remove vd vector fields to comply with OBJ format.
        10.05.02, 1.30 revised (ep) Save first vector field if existent and vertex based as 'vd'.
        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)

    - #### write

          public boolean write(java.io.DataOutputStream outWriter,
                               PgJvxSrc[] geomArr)

      Write an array of geometries to a file.
      Specified by:
        `write` in interface `PgLoaderIf`
      Overrides:
        `write` in class `PgAbstractLoader`
      Parameters:
        `outWriter` - Write all data to this stream
        `geomArr` - Array with geometries to save
      Returns:
        `true` on success.
      See Also:
        `PgAbstractLoader.read(BufferedReader)`, `PgAbstractLoader.read(DataInputStream)`, `PgAbstractLoader.write(Writer, PgJvxSrc [])`
      Version:
        23.03.06, 1.00 created (ur)

    - #### storeElementColorsAtVertices

          public static void storeElementColorsAtVertices(boolean flag)

      Enable storing of element colors at vertices.

    - #### storeElementColorsInShaders

          public static void storeElementColorsInShaders(boolean flag)

      Enable storing of element colors in shaders. SHOULD NOT BE USED! IS IN A DEBUGGING-AND-UNDERSTAND_ADOBE_VIEWER STATE!

"

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