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.
- Author:
- Konrad Polthier
- Version:
- 22.03.10, 3.00 revised (kp) Superclass changed to PgAbstractLoader.
06.10.03, 2.65 revised (kp) Interface extended by isEnabledOptimization().
19.04.03, 2.60 revised (kp) Interface extended by setGeometryOption().
05.03.03, 2.50 revised (kp) Moved to package jvx.loader from jv.loader.
21.08.02, 2.20 revised (kp) New methods getGeometries/getAnimations of PgLoaderIf implemented.
23.09.01, 2.10 revised (kp) Implement PgLoaderIf extended with methods for display options.
11.06.01, 2.00 revised (kp) Implement PgLoaderIf.
28.08.99, 1.10 revised (kp) Name changed from PgBuildFile to PgBdLoader.
00.00.98, 1.00 created (kp)
-
-
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
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetNumPatches()Get number of macro patches found in the build file.PgMacroPatchgetPatch(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
-
-
-
-
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.PgLoaderin 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 ifisAnimation()returnsfalse.- Specified by:
getSpecializedGeometriesin interfacePgLoaderIf- Overrides:
getSpecializedGeometriesin classPgAbstractLoader- Returns:
- Array of element sets.
- Since:
- JavaView 2.53
- See Also:
PgAbstractLoader.getGeometries()- Author:
- Konrad Polthier
- Version:
- 06.03.03, 1.00 created (kp)
-
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:
readin interfacePgLoaderIf- Overrides:
readin classPgAbstractLoader- Parameters:
in- BufferedReader to read textual data from.- Returns:
- Array of JVX geometries.
- See Also:
PgAbstractLoader.write(Writer, PgJvxSrc [])- Author:
- Konrad Polthier
- Version:
- 25.06.01, 1.20 revised (kp) Remove interior boundaries after loading, i.e. call close().
10.06.01, 1.10 revised (kp) Return an array instead a single geometry.
20.02.01, 1.00 created (kp) Method body from former version read(String fileName).
-
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.- Version:
- 15.05.06, 1.20 revised (kp) Method body reorganized.
-
-
"