|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjvx.loader.PgBdLoader
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 | |
PgBdLoader()
|
|
| Method Summary | |
PgJvxSrc[][] |
getAnimations()
Retrieve the previously loaded animations. |
PvDisplayOption |
getDisplayOption()
Get display options which some parsers and geometry file formats supply. |
PgJvxSrc[] |
getGeometries()
Retrieve the previously loaded geometries. |
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. |
boolean |
isAnimation()
Determine if currently loaded data is an animation. |
boolean |
isEnabledOptimization()
Determines if the loaded geometry requires some optimization. |
boolean |
load(java.io.BufferedReader in)
Read a geometry file containing a set of geometries or animations. |
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)
|
void |
setAnimation(boolean flag)
Set flag whether current geometry data is an animation. |
void |
setDisplayOption(PvDisplayOption option)
Set the display options to be saved within the geometry file. |
void |
setGeometryOption(java.util.BitSet option)
Set the geometry options which indicate which parts of a geometry shall be saved. |
boolean |
write(java.io.Writer writer,
PgJvxSrc[] geomArr)
Write an array of geometries into an output stream writer. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PgBdLoader()
| Method Detail |
public boolean isEnabledOptimization()
For example, some file formats do not store a connected mesh but provide individual vertices for each face every time the face is menetioned. In this case, a loader manager may identify equal vertices.
A similar method in the loader manager PgLoader may override the individual settings of each loader.
isEnabledOptimization in interface PgLoaderIftrue if loader is enabled for optimization.PgLoader.isEnabledOptimization(),
PgLoader.setEnabledOptimization(boolean)public void setGeometryOption(java.util.BitSet option)
setGeometryOption in interface PgLoaderIfpublic PvDisplayOption getDisplayOption()
getDisplayOption in interface PgLoaderIfPgLoaderIf.load(BufferedReader)public void setDisplayOption(PvDisplayOption option)
setDisplayOption in interface PgLoaderIfpublic boolean isAnimation()
This method may be called after successful parsing an input stream
with the method load(BufferedReader).
isAnimation in interface PgLoaderIftrue if loaded data is an animation.load(BufferedReader)public void setAnimation(boolean flag)
setAnimation in interface PgLoaderIfflag - true if loaded data is an animation.public PgJvxSrc[][] getAnimations()
This method may be called after successful parsing an input stream
with the method load(BufferedReader) and
if isAnimation() returns true.
getAnimations in interface PgLoaderIfload(BufferedReader)public PgJvxSrc[] getGeometries()
This method may be called after successful parsing an input stream
with the method load(BufferedReader) and
if isAnimation() returns false.
getGeometries in interface PgLoaderIfload(BufferedReader)public PgGeometryIf[] getSpecializedGeometries()
The loader manager jv.loader.PgLoader in JavaView
will first check if a loader returns specialized geometies, 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 PgLoaderIfgetGeometries()public boolean load(java.io.BufferedReader in)
After successful parsing retrieve the loaded geometries or animations
using the methods getGeometries() respectively
getAnimations() depending on the return value
of the method isAnimation().
load in interface PgLoaderIfin - BufferedReader to read textual data from.
true if parsing was successfull.getAnimations(),
getGeometries(),
isAnimation()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 PgLoaderIfin - BufferedReader to read textual data from.
write(Writer, PgJvxSrc [])public PgElementSet[] readElementSet(java.io.BufferedReader in)
public boolean write(java.io.Writer writer,
PgJvxSrc[] geomArr)
throws java.io.IOException
Numbers with absolute value less than jv.vecmath.PuMath#EPS are
shown as zero. This avoids the anoying fact that double precision numbers fill
the whole text area hiding the exponent, which hides their small value.
write in interface PgLoaderIfwriter - Write all data to this streamgeomArr - Array with geometries to save
true on success.
java.io.IOExceptionread(BufferedReader)
|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||