|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jv.loader.PgObjLoader
Loader for geometry files given in Wavefront's OBJ file format. This reader supports a subset of the commands, similar to the subset supported by Java3d. For details see the webpage on supported file formats.
| Field Summary | |
protected static boolean |
m_bElements
|
protected static boolean |
m_bPolygonColors
|
protected static boolean |
m_bPolygonNormals
|
protected static boolean |
m_bPolygons
|
protected static boolean |
m_bVertexNormals
|
protected static boolean |
m_bVertexTextures
|
protected static boolean |
m_bVertexVector
|
protected int |
m_dimOfElements
Dimension of elements. |
protected int |
m_dimOfPolygons
Dimension of polygons. |
protected int[] |
m_meshType
Mesh type information. |
protected int |
m_numElements
|
protected int |
m_numMeshType
|
protected int |
m_numPolygons
|
protected int |
m_numVertexNormals
|
protected int |
m_numVertexTextures
|
protected int |
m_numVertexVectors
|
protected int |
m_numVertices
|
protected java.util.Vector |
m_vElement
List of parsed elements, element connectivity. |
protected java.util.Vector |
m_vElementColor
List of parsed element colors. |
protected PiVector |
m_vElementColorInd
List of parsed element color indices. |
protected java.util.Vector |
m_vElementNormal
List of parsed element normals. |
protected java.util.Vector |
m_vPolygon
List of parsed polygons. |
protected java.util.Vector |
m_vPolygonColor
List of parsed polygon colors. |
protected PiVector |
m_vPolygonColorInd
List of parsed polygon color indices. |
protected java.util.Vector |
m_vVertex
List of parsed vertices. |
protected java.util.Vector |
m_vVertexColor
List of parsed vertex colors. |
protected PiVector |
m_vVertexColorInd
List of parsed vertex color indices. |
protected java.util.Vector |
m_vVertexNormal
List of parsed vertex normals. |
protected java.util.Vector |
m_vVertexTexture
List of parsed vertex textures. |
protected java.util.Vector |
m_vVertexVector
List of parsed vertex vectors or vertex used data. |
| Constructor Summary | |
PgObjLoader()
|
|
| Method Summary | |
protected boolean |
parse(java.io.BufferedReader bufReader)
Parse a wavefront .obj file and fill instance variables of this class.
|
PgJvxSrc |
read(java.io.BufferedReader in)
Read geometry file in Wavefront's OBJ file format. |
PgJvxSrc |
read(java.lang.String fileName)
Read geometry file in Wavefront's OBJ file format. |
static java.lang.String |
write(PgJvxSrc geom)
|
protected static java.lang.String |
writeElements(int num,
PiVector[] element)
Write list of elements and element normals into string. |
protected static java.lang.String |
writePdVectors(java.lang.String type,
java.lang.String id,
int num,
PdVector[] vector)
Write list of double vectors into string. |
protected static java.lang.String |
writePolygons(int num,
PiVector[] polygon)
Write list of polygons and polygon normals into string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int m_numVertices
protected int m_numVertexNormals
protected int m_numVertexTextures
protected int m_numVertexVectors
protected int m_numPolygons
protected int m_numElements
protected int m_numMeshType
protected java.util.Vector m_vVertex
protected java.util.Vector m_vVertexColor
protected PiVector m_vVertexColorInd
protected java.util.Vector m_vVertexNormal
protected java.util.Vector m_vVertexTexture
protected java.util.Vector m_vVertexVector
protected int[] m_meshType
protected int m_dimOfElements
protected java.util.Vector m_vElement
protected java.util.Vector m_vElementColor
protected PiVector m_vElementColorInd
protected java.util.Vector m_vElementNormal
protected int m_dimOfPolygons
protected java.util.Vector m_vPolygon
protected java.util.Vector m_vPolygonColor
protected PiVector m_vPolygonColorInd
protected static boolean m_bVertexNormals
protected static boolean m_bVertexTextures
protected static boolean m_bVertexVector
protected static boolean m_bElements
protected static boolean m_bPolygons
protected static boolean m_bPolygonColors
protected static boolean m_bPolygonNormals
| Constructor Detail |
public PgObjLoader()
| Method Detail |
public PgJvxSrc read(java.lang.String fileName)
public PgJvxSrc read(java.io.BufferedReader in)
protected boolean parse(java.io.BufferedReader bufReader)
throws java.io.IOException
.obj file and fill instance variables of this class.
This is a helper routine of read.PgObjLoader#read(PgGeometry, String)public static java.lang.String write(PgJvxSrc geom)
protected static java.lang.String writePdVectors(java.lang.String type,
java.lang.String id,
int num,
PdVector[] vector)
EPS are
shown as zero. This avoids the annoying fact that double precision numbers fill
the whole text area hiding the exponent, which hides their small value.
protected static java.lang.String writeElements(int num,
PiVector[] element)
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.
protected static java.lang.String writePolygons(int num,
PiVector[] polygon)
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.
|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||