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 void
handleNormal
(Vector3D normal) Method called when a normal is found in the OBJ content.protected void
handleVertex
(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, setFailOnNonPolygonKeywords
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
readFacet
in 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:
handleVertex
in classAbstractObjPolygonReader
- Parameters:
vertex
- vertex value
-
handleNormal
Method called when a normal is found in the OBJ content.- Specified by:
handleNormal
in classAbstractObjPolygonReader
- Parameters:
normal
- normal value
-