Class ObjBoundaryReadHandler3D
- java.lang.Object
-
- org.apache.commons.geometry.io.euclidean.threed.AbstractBoundaryReadHandler3D
-
- org.apache.commons.geometry.io.euclidean.threed.obj.ObjBoundaryReadHandler3D
-
- All Implemented Interfaces:
BoundaryReadHandler<PlaneConvexSubset,BoundarySource3D>,BoundaryReadHandler3D
public class ObjBoundaryReadHandler3D extends AbstractBoundaryReadHandler3D
BoundaryReadHandler3Dimplementation for reading OBJ data. Input is read using the UTF-8 charset by default.
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.charset.CharsetdefaultCharsetCharset for reading text input.
-
Constructor Summary
Constructors Constructor Description ObjBoundaryReadHandler3D()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.io.ReadercreateReader(GeometryInput in)Create aReaderfor reading character data from the given input.FacetDefinitionReaderfacetDefinitionReader(GeometryInput in)Return aFacetDefinitionReaderfor reading rawfacetsfrom the given input stream.java.nio.charset.CharsetgetDefaultCharset()Get the text input default charset, used if the input does not specify a charset.GeometryFormatgetFormat()Get thedata formatsupported by this handler.TriangleMeshreadTriangleMesh(GeometryInput in, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)Read a triangle mesh from the given input.voidsetDefaultCharset(java.nio.charset.Charset charset)Set the text input default charset, used if the input does not specify a charset.-
Methods inherited from class org.apache.commons.geometry.io.euclidean.threed.AbstractBoundaryReadHandler3D
boundaries, facets, read
-
-
-
-
Method Detail
-
getFormat
public GeometryFormat getFormat()
Get thedata formatsupported by this handler.- Returns:
- data format supported by this handler
-
getDefaultCharset
public java.nio.charset.Charset getDefaultCharset()
Get the text input default charset, used if the input does not specify a charset.- Returns:
- text input default charset
-
setDefaultCharset
public void setDefaultCharset(java.nio.charset.Charset charset)
Set the text input default charset, used if the input does not specify a charset.- Parameters:
charset- text input default charset
-
facetDefinitionReader
public FacetDefinitionReader facetDefinitionReader(GeometryInput in)
Return aFacetDefinitionReaderfor reading rawfacetsfrom the given input stream.- Parameters:
in- input stream to read from- Returns:
- facet definition reader instance
-
readTriangleMesh
public TriangleMesh readTriangleMesh(GeometryInput in, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Read a triangle mesh from the given input. Implementations may throw runtime exceptions if mathematically invalid boundaries are encountered.- Specified by:
readTriangleMeshin interfaceBoundaryReadHandler3D- Overrides:
readTriangleMeshin classAbstractBoundaryReadHandler3D- Parameters:
in- input stream to read fromprecision- precision context used for floating point comparisons- Returns:
- triangle mesh containing the data from the given input stream
-
createReader
private java.io.Reader createReader(GeometryInput in)
Create aReaderfor reading character data from the given input.- Parameters:
in- input to read from- Returns:
- reader instance
- Throws:
java.io.UncheckedIOException- if an I/O error occurs
-
-