Class ObjFacetDefinitionReader
java.lang.Object
org.apache.commons.geometry.io.euclidean.threed.obj.AbstractObjPolygonReader
org.apache.commons.geometry.io.euclidean.threed.obj.ObjFacetDefinitionReader
- All Implemented Interfaces:
Closeable, AutoCloseable, FacetDefinitionReader
public class ObjFacetDefinitionReader
extends AbstractObjPolygonReader
implements FacetDefinitionReader
Class for reading
facets from OBJ content.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionObjFacetDefinitionReader(Reader reader) Construct a new instance that reads OBJ content from the given reader. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidhandleNormal(Vector3D normal) Method called when a normal is found in the OBJ content.protected voidhandleVertex(Vector3D vertex) Method called when a vertex is found in the OBJ content.Return the next facet definition from the input source or null if no more facets are available.Methods inherited from class AbstractObjPolygonReader
close, isFailOnNonPolygonKeywords, readFace, setFailOnNonPolygonKeywordsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FacetDefinitionReader
close
-
Field Details
-
vertices
-
normals
-
-
Constructor Details
-
ObjFacetDefinitionReader
Construct a new instance that reads OBJ content from the given reader.- Parameters:
reader- reader to read from
-
-
Method Details
-
readFacet
Return the next facet definition from the input source or null if no more facets are available.- Specified by:
readFacetin interfaceFacetDefinitionReader- Returns:
- the next facet definition or null if no more facets are available
-
handleVertex
Method called when a vertex is found in the OBJ content.- Specified by:
handleVertexin classAbstractObjPolygonReader- Parameters:
vertex- vertex value
-
handleNormal
Method called when a normal is found in the OBJ content.- Specified by:
handleNormalin classAbstractObjPolygonReader- Parameters:
normal- normal value
-