Package org.sunflow.core.parser
Class SCAbstractParser
java.lang.Object
org.sunflow.core.parser.SCAbstractParser
- All Implemented Interfaces:
SceneParser
- Direct Known Subclasses:
SCAsciiParser
,SCBinaryParser
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
protected abstract void
openParser
(String filename) boolean
parse
(String filename, SunflowAPIInterface api) Parse the specified file to create a scene description into the providedSunflowAPI
object.protected abstract boolean
protected abstract float
protected float[]
parseFloatArray
(int size) protected abstract int
parseInt()
protected abstract ParameterList.InterpolationType
protected abstract SCAbstractParser.Keyword
protected abstract Matrix4
protected abstract String
protected abstract String
-
Constructor Details
-
SCAbstractParser
public SCAbstractParser()
-
-
Method Details
-
parse
Description copied from interface:SceneParser
Parse the specified file to create a scene description into the providedSunflowAPI
object.- Specified by:
parse
in interfaceSceneParser
- Parameters:
filename
- filename to parseapi
- scene to parse the file into- Returns:
true
upon sucess, orfalse
if errors have occured.
-
parseFloatArray
- Throws:
IOException
-
parseInterpolationType
- Throws:
IOException
-
openParser
- Throws:
IOException
-
closeParser
- Throws:
IOException
-
parseKeyword
- Throws:
IOException
-
parseBoolean
- Throws:
IOException
-
parseInt
- Throws:
IOException
-
parseFloat
- Throws:
IOException
-
parseString
- Throws:
IOException
-
parseVerbatimString
- Throws:
IOException
-
parseMatrix
- Throws:
IOException
-