jvx.loader

## Class PgBdLoader

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

- All Implemented Interfaces:
    PgLoaderIf

      public final class PgBdLoader
      extends PgAbstractLoader

  Reads a build file '*.bd' and fills information in PgMacroPatch. Class is later queried by an application for macro patches. An application is responsible to generate actual geometries, like triangulations, out of a macro patch.

  Each macro patch may be bounded by simple straight lines or by curves with sophisticated boundary constraints to be used in calculus of variations. See description of the file format '*.bd' for more details.

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getNumPatches()` Get number of macro patches found in the build file.
    `PgMacroPatch` | `getPatch(int anInd)` Return the macro patch with given index.
    `PgGeometryIf[]` | `getSpecializedGeometries()` Return the loaded geometry in a more specialized class.
    `PgJvxSrc[]` | `read(java.io.BufferedReader in)` Read an inhouse BD geometry file and return an array with a single surface.
    `PgElementSet[]` | `readElementSet(java.io.BufferedReader in)` Read bd-file into an array of macro patches, then merge the generated element sets into a single element set.

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

      `getAnimations, getDisplayOption, getGeometries, isAnimation, isEnabledOptimization, load, read, setAnimation, setDisplayOption, setGeometryOption, write, write`

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

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

- - ### Constructor Detail

    - #### PgBdLoader

          public PgBdLoader()

  - ### Method Detail

    - #### getSpecializedGeometries

          public PgGeometryIf[] getSpecializedGeometries()

      Return the loaded geometry in a more specialized class. This method allows a loader to return a geometry class which best fits the data found in a geometry file.

      The loader manager `jv.loader.PgLoader` in JavaView will first check if a loader returns specialized geometries, and if not, check for a data supplied in a container class PgJvxSrc.

      This method may be called after successful parsing an input stream with the method `load(BufferedReader)` and if `isAnimation()` returns `false`.

      Specified by:
        `getSpecializedGeometries` in interface `PgLoaderIf`
      Overrides:
        `getSpecializedGeometries` in class `PgAbstractLoader`
      Returns:
        Array of element sets.
      Since:
        JavaView 2.53
      See Also:
        `PgAbstractLoader.getGeometries()`

    - #### getNumPatches

          public int getNumPatches()

      Get number of macro patches found in the build file.

    - #### getPatch

          public PgMacroPatch getPatch(int anInd)

      Return the macro patch with given index.

    - #### read

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

      Read an inhouse BD geometry file and return an array with a single surface. All interior boundaries are removed.

      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:
        `PgAbstractLoader.write(Writer, PgJvxSrc [])`

    - #### readElementSet

          public PgElementSet[] readElementSet(java.io.BufferedReader in)

      Read bd-file into an array of macro patches, then merge the generated element sets into a single element set.

"

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