class LwoParser extends ParserObject
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
blue |
(package private) float[] |
coordsArray |
(package private) int |
currLength |
(package private) float |
diffuse |
(package private) int[] |
facetIndicesArray |
(package private) int[] |
facetSizesArray |
(package private) int |
gloss |
(package private) int |
green |
(package private) float |
luminosity |
(package private) float[] |
normalCoordsArray |
(package private) int[] |
normalIndicesArray |
(package private) int |
red |
(package private) java.util.Vector |
shapeList |
(package private) float |
specular |
(package private) java.util.Vector |
surfaceList |
(package private) java.util.Vector |
surfNameList |
(package private) LWOBFileReader |
theReader |
(package private) float |
transparency |
debugPrinter, EXCEPTION, LINE_TRACE, MISC, NONE, TIME, TRACE, VALUES, WARNING| Constructor and Description |
|---|
LwoParser(java.lang.String fileName,
int debugVals)
Constructor: Creates file reader and calls parseFile() to actually
read the file and grab the data
|
LwoParser(java.net.URL url,
int debugVals) |
| Modifier and Type | Method and Description |
|---|---|
(package private) ShapeHolder |
getAppropriateShape(int numSurf,
int numVerts)
Returns already-existing ShapeHolder if one exists with the same
surface and the same geometry type (point, line, or poly)
|
(package private) void |
getPnts(int length)
Parses file to get all vertices
|
(package private) void |
getPols(int length)
Parse the file for all the data for a POLS object (polygon
description)
|
(package private) void |
getSrfs(int length)
Parses file to get the names of all surfaces.
|
(package private) void |
getSurf(int length)
Creates new LwoSurface object that parses file and gets all
surface parameters for a particular surface
|
(package private) static void |
main(java.lang.String[] args)
This method is used only for testing
|
(package private) int |
parseFile()
parses entire file.
|
(package private) int |
skipDetailPolygons(int numPolys)
Detail polygons are currently not implemented by this loader.
|
debugOutput, debugOutputLnLWOBFileReader theReader
int currLength
float[] coordsArray
float[] normalCoordsArray
int[] facetIndicesArray
int[] facetSizesArray
int[] normalIndicesArray
int red
int green
int blue
float diffuse
float specular
float transparency
float luminosity
int gloss
java.util.Vector surfNameList
java.util.Vector surfaceList
java.util.Vector shapeList
LwoParser(java.lang.String fileName,
int debugVals)
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionLwoParser(java.net.URL url,
int debugVals)
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionint skipDetailPolygons(int numPolys)
throws ParsingErrorException
ParsingErrorExceptionShapeHolder getAppropriateShape(int numSurf, int numVerts)
void getPols(int length)
void getSrfs(int length)
void getPnts(int length)
throws ParsingErrorException
ParsingErrorExceptionvoid getSurf(int length)
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionint parseFile()
throws java.io.FileNotFoundException,
IncorrectFormatException
java.io.FileNotFoundExceptionIncorrectFormatExceptionstatic void main(java.lang.String[] args)
Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.