public final class PgBdLoader extends PgAbstractLoader
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.
GEOM_DATA_AUTHOR, GEOM_DATA_COLORS, GEOM_DATA_HEADER, GEOM_DATA_INFO, GEOM_DATA_NORMALS, GEOM_DATA_TEXTURE, GEOM_DATA_VECTORS
Constructor and Description |
---|
PgBdLoader() |
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.
|
getAnimations, getDisplayOption, getGeometries, isAnimation, isEnabledOptimization, load, read, setAnimation, setDisplayOption, setGeometryOption, write, write
public PgGeometryIf[] getSpecializedGeometries()
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
.
getSpecializedGeometries
in interface PgLoaderIf
getSpecializedGeometries
in class PgAbstractLoader
PgAbstractLoader.getGeometries()
public int getNumPatches()
public PgMacroPatch getPatch(int anInd)
public PgJvxSrc[] read(java.io.BufferedReader in)
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.
read
in interface PgLoaderIf
read
in class PgAbstractLoader
in
- BufferedReader to read textual data from.PgAbstractLoader.write(Writer, PgJvxSrc [])
public PgElementSet[] readElementSet(java.io.BufferedReader in)
"