public final class ModelIO extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
OBJ
String representing the OBJ file format.
|
| Modifier and Type | Method and Description |
|---|---|
static ModelIOHandlerRegistry |
getModelIOHandlerRegistry()
Get the
ModelIOHandlerRegistry singleton instance. |
static BoundarySource3D |
read(File in,
DoublePrecisionContext precision)
Read a 3D model from the given file, using the file extension as the model type.
|
static BoundarySource3D |
read(String type,
File in,
DoublePrecisionContext precision)
Read a 3D model of the given type from the file.
|
static BoundarySource3D |
read(String type,
InputStream in,
DoublePrecisionContext precision)
Read a 3D model of the given type from the input stream.
|
static void |
write(BoundarySource3D model,
File out)
Write the model to the file.
|
static void |
write(BoundarySource3D model,
String type,
File out)
Write the model to the file using the specified file type.
|
static void |
write(BoundarySource3D model,
String type,
OutputStream out)
Write the model to the output stream using the specific file type.
|
public static final String OBJ
public static ModelIOHandlerRegistry getModelIOHandlerRegistry()
ModelIOHandlerRegistry singleton instance.ModelIOHandlerRegistry singleton instancepublic static BoundarySource3D read(File in, DoublePrecisionContext precision)
ModelIOHandlerRegistry singleton.in - file to readprecision - precision context to use in model constructionUncheckedIOException - if an IO operation failsIllegalArgumentException - if the file does not have a file extension or the
file extension does not indicate a supported model typegetModelIOHandlerRegistry(),
ModelIOHandlerRegistry.read(File, DoublePrecisionContext)public static BoundarySource3D read(String type, File in, DoublePrecisionContext precision)
ModelIOHandlerRegistry
singleton.type - model input typein - input fileprecision - precision context to use in model constructionUncheckedIOException - if an IO operation failsIllegalArgumentException - if the model input type is not supportedgetModelIOHandlerRegistry(),
ModelIOHandler.read(String, File, DoublePrecisionContext)public static BoundarySource3D read(String type, InputStream in, DoublePrecisionContext precision)
ModelIOHandlerRegistry singleton.type - model input typein - input stream to read fromprecision - precision context to use in model constructionUncheckedIOException - if an IO operation failsIllegalArgumentException - if the model input type is not supportedgetModelIOHandlerRegistry(),
ModelIOHandler.read(String, InputStream, DoublePrecisionContext)public static void write(BoundarySource3D model, File out)
ModelIOHandlerRegistry singleton.model - model to writeout - output fileUncheckedIOException - if an IO operation failsIllegalArgumentException - if the file does not have a file extension or the
file extension does not indicate a supported model typegetModelIOHandlerRegistry(),
ModelIOHandlerRegistry.write(BoundarySource3D, File)public static void write(BoundarySource3D model, String type, File out)
ModelIOHandlerRegistry singleton.model - model to writetype - model file typeout - output fileUncheckedIOException - if an IO operation failsIllegalArgumentException - if the file type is not supportedgetModelIOHandlerRegistry(),
ModelIOHandler.write(BoundarySource3D, String, File)public static void write(BoundarySource3D model, String type, OutputStream out)
ModelIOHandlerRegistry singleton.model - model to writetype - model file typeout - output streamUncheckedIOException - if an IO operation failsIllegalArgumentException - if the file type is not supportedgetModelIOHandlerRegistry(),
ModelIOHandler.write(BoundarySource3D, String, OutputStream)Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.