public class PgAbcLoader extends PgAbstractLoader
In JavaView the file name convention is that Abc is replaced with a user defined file name extension of three characters.
GEOM_DATA_AUTHOR, GEOM_DATA_COLORS, GEOM_DATA_HEADER, GEOM_DATA_INFO, GEOM_DATA_NORMALS, GEOM_DATA_TEXTURE, GEOM_DATA_VECTORS
Constructor and Description |
---|
PgAbcLoader() |
Modifier and Type | Method and Description |
---|---|
int |
getFirstVertexIndex()
Vertices are assigned an index starting at the given value.
|
PgJvxSrc[] |
read(java.io.BufferedReader in)
Read an ABC geometry file and return an array of new geometries.
|
void |
setFirstVertexIndex(int index)
Vertices are assigned an index starting at the given value.
|
boolean |
write(java.io.Writer writer,
PgJvxSrc[] geomArr)
Write an array of geometries into an output stream writer.
|
getAnimations, getDisplayOption, getGeometries, getSpecializedGeometries, isAnimation, isEnabledOptimization, load, read, setAnimation, setDisplayOption, setGeometryOption, write
public boolean write(java.io.Writer writer, PgJvxSrc[] geomArr) throws java.io.IOException
write
in interface PgLoaderIf
write
in class PgAbstractLoader
writer
- Write all data to this streamgeomArr
- Array with geometries to savetrue
on success.java.io.IOException
read(BufferedReader)
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.write(Writer, PgJvxSrc [])
public int getFirstVertexIndex()
The faces of a mesh are defined by referencing the vertices of a face by their index.
public void setFirstVertexIndex(int index)
The faces of a mesh are defined by referencing the vertices of a face by their index.
index
- index of first vertex"