public abstract class AbstractObjPolygonReader extends Object implements Closeable
PolygonObjParser.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractObjPolygonReader(Reader reader)
Construct a new instance that reads OBJ content from the given reader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected abstract void |
handleNormal(Vector3D normal)
Method called when a normal is found in the OBJ content.
|
protected abstract void |
handleVertex(Vector3D vertex)
Method called when a vertex is found in the OBJ content.
|
boolean |
isFailOnNonPolygonKeywords()
Get the flag indicating whether or not an
IllegalStateException will be thrown
if the OBJ content contains any keywords defining non-polygon geometric content
(ex: curv). |
protected PolygonObjParser.Face |
readFace()
Return the next face from the OBJ content or null if no face is found.
|
void |
setFailOnNonPolygonKeywords(boolean fail)
Set the flag indicating whether or not an
IllegalStateException will be thrown
if the OBJ content contains any keywords defining non-polygon geometric content
(ex: curv). |
protected AbstractObjPolygonReader(Reader reader)
reader - reader to read characters frompublic boolean isFailOnNonPolygonKeywords()
IllegalStateException will be thrown
if the OBJ content contains any keywords defining non-polygon geometric content
(ex: curv). If false, non-polygon data is ignored.IllegalStateException will be thrown
if non-polygon content is encounteredPolygonObjParser.isFailOnNonPolygonKeywords()public void setFailOnNonPolygonKeywords(boolean fail)
IllegalStateException will be thrown
if the OBJ content contains any keywords defining non-polygon geometric content
(ex: curv). If set to false, non-polygon data is ignored.fail - flag indicating whether or not an IllegalStateException will be thrown
if non-polygon content is encounteredpublic void close()
close in interface Closeableclose in interface AutoCloseableprotected PolygonObjParser.Face readFace()
IllegalStateException - if a parsing error occursUncheckedIOException - if an I/O error occursprotected abstract void handleVertex(Vector3D vertex)
vertex - vertex valueprotected abstract void handleNormal(Vector3D normal)
normal - normal valueCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.