public class PgJvfLoader extends PgAbstractLoader
GEOM_DATA_AUTHOR, GEOM_DATA_COLORS, GEOM_DATA_HEADER, GEOM_DATA_INFO, GEOM_DATA_NORMALS, GEOM_DATA_TEXTURE, GEOM_DATA_VECTORS| Constructor and Description |
|---|
PgJvfLoader() |
| Modifier and Type | Method and Description |
|---|---|
static double |
getRsrcAsDoubleF(PsXmlNode rsrcNode,
java.lang.String type)
Get content of node in resource tree with given element type by searching from given node.
|
boolean |
load(java.io.BufferedReader in)
Read a geometry file containing a set of geometries or animations.
|
static java.lang.String[][] |
parseFunList(PsXmlNode parentNode,
java.lang.String type,
java.lang.String[] attr)
Parse an array of PsXmlNodes of same element type, where each element
has data consisting of a blank separated list of functions to be interpreted.
|
static PgGeometryIf[] |
readSpecial(java.lang.String fileName)
Read JVF geometry file in JavaView JVF file format.
|
boolean |
write(java.io.Writer writer,
PgJvxSrc[] geom)
Write all geometries in a XML tree structure of instances of type
PsXmlNode and into a writer. |
getAnimations, getDisplayOption, getGeometries, getSpecializedGeometries, isAnimation, isEnabledOptimization, read, read, setAnimation, setDisplayOption, setGeometryOption, writepublic 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 PgLoaderIfload in class PgAbstractLoaderin - BufferedReader to read textual data from.true if parsing was successfull.PgAbstractLoader.getAnimations(),
PgAbstractLoader.getGeometries(),
PgAbstractLoader.isAnimation()public static PgGeometryIf[] readSpecial(java.lang.String fileName)
public boolean write(java.io.Writer writer,
PgJvxSrc[] geom)
PsXmlNode and into a writer.write in interface PgLoaderIfwrite in class PgAbstractLoaderwriter - Write all data to this streamgeom - Array with geometries to savetrue on success.PgAbstractLoader.read(BufferedReader),
PgAbstractLoader.write(DataOutputStream, PgJvxSrc [])public static java.lang.String[][] parseFunList(PsXmlNode parentNode, java.lang.String type, java.lang.String[] attr)
parentNode - parent node containing a set of color nodes as childrentype - type of elements in arrayattr - array of attributes the vector might have, may be null.public static double getRsrcAsDoubleF(PsXmlNode rsrcNode, java.lang.String type)
rsrcNode - node whose descendants are searched including itselftype - element type of node to be searched"