| java.lang.Object com.sun.j3d.loaders.lw3d.ParserObject com.sun.j3d.loaders.lw3d.LwoParser
All known Subclasses: com.sun.j3d.loaders.lw3d.J3dLwoParser,
LwoParser | class LwoParser extends ParserObject (Code) | | This class is responsible for parsing a binary Object file and storing
the data. This class is not called directly, but is the parent class of
J3dLwoObject. The subclass calls this class to parse the file, then it
turns the resulting data into Java3D objects. LwoObject instantiates
an LWOBFileReader object to parse the data. Then the class creates a
list of ShapeHolder objects to hold all of the vertex/facet data and
surface references and creates a list of LwoSurface objects to hold
the data for each surface.
Rather than describe in detail how the file is parsed for each method,
I advise the user of this code to understand the lw3d file format
specs, which are pretty clear.
|
coordsArray | float coordsArray(Code) | | |
currLength | int currLength(Code) | | |
diffusespeculartransparencyluminosity | float diffusespeculartransparencyluminosity(Code) | | |
facetIndicesArray | int facetIndicesArray(Code) | | |
facetSizesArray | int facetSizesArray(Code) | | |
normalCoordsArray | float normalCoordsArray(Code) | | |
normalIndicesArray | int normalIndicesArray(Code) | | |
redgreenblue | int redgreenblue(Code) | | |
LwoParser | LwoParser(String fileName, int debugVals) throws FileNotFoundException(Code) | | Constructor: Creates file reader and calls parseFile() to actually
read the file and grab the data
|
getAppropriateShape | ShapeHolder getAppropriateShape(int numSurf, int numVerts)(Code) | | Returns already-existing ShapeHolder if one exists with the same
surface and the same geometry type (point, line, or poly)
|
getPols | void getPols(int length)(Code) | | Parse the file for all the data for a POLS object (polygon
description)
|
getSrfs | void getSrfs(int length)(Code) | | Parses file to get the names of all surfaces. Each polygon will
be associated with a particular surface number, which is the index
number of these names
|
getSurf | void getSurf(int length) throws FileNotFoundException(Code) | | Creates new LwoSurface object that parses file and gets all
surface parameters for a particular surface
|
main | static void main(String[] args)(Code) | | This method is used only for testing
|
skipDetailPolygons | int skipDetailPolygons(int numPolys) throws ParsingErrorException(Code) | | Detail polygons are currently not implemented by this loader. Their
structure in geometry files is a bit complex, so there's this separate
method for simply parsing through and ignoring the data for detail
polygons
|
|
|