public final class PgJvxLoader 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 |
---|
PgJvxLoader() |
Modifier and Type | Method and Description |
---|---|
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)
Read XML file and fill a new PsJvxSrc class.
|
static PgJvxSrc[] |
read(java.lang.String fileName)
Read geometry from file in JavaView JVX format.
|
java.lang.String |
write(PgJvxSrc[] geom)
Write all geometries in a XML tree structure of instances of type
PsXmlNode and create a XML formatted string. |
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, load, read, setAnimation, setDisplayOption, setGeometryOption, write
public static PgJvxSrc[] read(java.lang.String fileName)
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.
fileName
- File or URL to read data from.public PgJvxSrc[] read(java.io.BufferedReader in)
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 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.write(PgJvxSrc [])
public java.lang.String write(PgJvxSrc[] geom)
PsXmlNode
and create a XML formatted string.geom
- Array with geometries to savewrite(Writer, 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."