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 org.apache.commons.geometry.io.euclidean.threed.obj.AbstractObjPolygonReader
close, isFailOnNonPolygonKeywords, readFace, setFailOnNonPolygonKeywordsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.geometry.io.euclidean.threed.FacetDefinitionReader
close
-
Field Details
-
vertices
List of vertices encountered in the input. -
normals
List of normals encountered in the input.
-
-
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
-