public interface BoundaryReadHandler3D extends BoundaryReadHandler<PlaneConvexSubset,BoundarySource3D>
BoundaryIOManager3D
.
Implementation note: implementations of this interface must be thread-safe.
Modifier and Type | Method and Description |
---|---|
FacetDefinitionReader |
facetDefinitionReader(GeometryInput in)
Return a
FacetDefinitionReader for reading raw
facets from the given
input stream. |
Stream<FacetDefinition> |
facets(GeometryInput in)
Return a
Stream that can be used to access all facet information from the given input stream. |
TriangleMesh |
readTriangleMesh(GeometryInput in,
Precision.DoubleEquivalence precision)
Read a triangle mesh from the given input.
|
boundaries, getFormat, read
FacetDefinitionReader facetDefinitionReader(GeometryInput in)
FacetDefinitionReader
for reading raw
facets
from the given
input stream.in
- input stream to read fromIllegalStateException
- if a data format error occursUncheckedIOException
- if an I/O error occursStream<FacetDefinition> facets(GeometryInput in)
Stream
that can be used to access all facet information from the given input stream.
The input stream is expected to contain data in the format supported by this handler.
The underlying input stream is closed when the returned stream is closed. Callers should therefore use the returned stream in a try-with-resources statement to ensure that all resources are properly released.
try (Stream<FacetDefinition> stream = handler.facets(in)) { // access stream content }
The following exceptions may be thrown during stream iteration:
IllegalArgumentException
if mathematically invalid data is encounteredIllegalStateException
if a parsing or syntax error occursUncheckedIOException
if an I/O error occursin
- input stream to read from; this is not closed when the returned stream is closedUncheckedIOException
- if an I/O error occurs during stream creationTriangleMesh readTriangleMesh(GeometryInput in, Precision.DoubleEquivalence precision)
in
- input stream to read fromprecision
- precision context used for floating point comparisonsIllegalStateException
- if a parsing or syntax error occursUncheckedIOException
- if an I/O error occursCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.