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.
|
PgJvxSrc[] |
read(java.io.BufferedReader in)
Deprecated.
use load(BuffereredReader) and getGeometries() resp. getAnimations().
|
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, setAnimation, setDisplayOption, setGeometryOption, write
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 PgLoaderIf
load
in class PgAbstractLoader
in
- BufferedReader to read textual data from.true
if parsing was successfull.PgAbstractLoader.getAnimations()
,
PgAbstractLoader.getGeometries()
,
PgAbstractLoader.isAnimation()
public PgJvxSrc[] read(java.io.BufferedReader in)
read
in interface PgLoaderIf
read
in class PgAbstractLoader
in
- BufferedReader to read textual data from.PgAbstractLoader.write(Writer, PgJvxSrc [])
public boolean write(java.io.Writer writer, PgJvxSrc[] geom)
PsXmlNode
and into a writer.write
in interface PgLoaderIf
write
in class PgAbstractLoader
writer
- 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"