public final class OBJReader extends Object
TriangleMesh objects from OBJ files. Only vertex and face definitions
are read from the input; other OBJ keywords are ignored.
Instances of this class are not thread-safe.
| Constructor and Description |
|---|
OBJReader() |
| Modifier and Type | Method and Description |
|---|---|
TriangleMesh |
readTriangleMesh(File file,
DoublePrecisionContext precision)
Read a
TriangleMesh from the given OBJ file. |
TriangleMesh |
readTriangleMesh(Reader reader,
DoublePrecisionContext precision)
Read a
TriangleMesh from the given reader. |
TriangleMesh |
readTriangleMesh(URL url,
DoublePrecisionContext precision)
Read a
TriangleMesh from the given url representing an OBJ file. |
public TriangleMesh readTriangleMesh(File file, DoublePrecisionContext precision) throws IOException
TriangleMesh from the given OBJ file. The file is read using the UTF-8 charset.file - file to read fromprecision - precision context to use in the created meshIOException - if an IO operation failsIllegalArgumentException - if invalid OBj syntax is encountered in the inputpublic TriangleMesh readTriangleMesh(URL url, DoublePrecisionContext precision) throws IOException
TriangleMesh from the given url representing an OBJ file. The input is read using the
UTF-8 charset.url - url to read fromprecision - precision context to use in the created meshIOException - if an IO operation failsIllegalArgumentException - if invalid OBj syntax is encountered in the inputpublic TriangleMesh readTriangleMesh(Reader reader, DoublePrecisionContext precision) throws IOException
TriangleMesh from the given reader. The reader is not closed.reader - the reader to read input fromprecision - precision context to use in the created meshIOException - if an IO operation failsIllegalArgumentException - if invalid OBj syntax is encountered in the inputCopyright © 2016–2020 The Apache Software Foundation. All rights reserved.