Class TextBoundaryWriteHandler3D
java.lang.Object
org.apache.commons.geometry.io.euclidean.threed.AbstractBoundaryWriteHandler3D
org.apache.commons.geometry.io.euclidean.threed.txt.AbstractTextBoundaryWriteHandler3D
org.apache.commons.geometry.io.euclidean.threed.txt.TextBoundaryWriteHandler3D
- All Implemented Interfaces:
BoundaryWriteHandler<PlaneConvexSubset,,BoundarySource3D> BoundaryWriteHandler3D
BoundaryWriteHandler3D
implementation for the non-standard TXT format. Output is
written using the UTF-8 charset by default.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TextFacetDefinitionWriterGet a configuredTextFacetDefinitionWriterfor writing output.intGet the number of vertices required per facet or-1if no specific number is required.Get thedata formatsupported by this handler.Get the string used to separate vertex components (ie, individual x, y, z values).Get the string used to separate facet vertices.voidsetFacetVertexCount(int vertexCount) Set the number of vertices required per facet.voidSet the string used to separate vertex components (ie, individual x, y, z values).voidsetVertexSeparator(String sep) Set the string used to separate facet vertices.Methods inherited from class org.apache.commons.geometry.io.euclidean.threed.txt.AbstractTextBoundaryWriteHandler3D
getDefaultCharset, getDoubleFormat, getLineSeparator, setDefaultCharset, setDoubleFormat, setLineSeparator, write, writeFacetsMethods inherited from class org.apache.commons.geometry.io.euclidean.threed.AbstractBoundaryWriteHandler3D
write, writeFacets
-
Field Details
-
vertexComponentSeparator
String used to separate vertex components, ie, x, y, z values. -
vertexSeparator
String used to separate vertices. -
facetVertexCount
private int facetVertexCountNumber of vertices required per facet; will be -1 if disabled.
-
-
Constructor Details
-
TextBoundaryWriteHandler3D
public TextBoundaryWriteHandler3D()
-
-
Method Details
-
getVertexComponentSeparator
Get the string used to separate vertex components (ie, individual x, y, z values).- Returns:
- string used to separate vertex components
- See Also:
-
setVertexComponentSeparator
Set the string used to separate vertex components (ie, individual x, y, z values).- Parameters:
sep- string used to separate vertex components- See Also:
-
getVertexSeparator
Get the string used to separate facet vertices.- Returns:
- string used to separate facet vertices
- See Also:
-
setVertexSeparator
Set the string used to separate facet vertices.- Parameters:
sep- string used to separate facet vertices- See Also:
-
getFacetVertexCount
public int getFacetVertexCount()Get the number of vertices required per facet or-1if no specific number is required.- Returns:
- the number of vertices required per facet or
-1if any geometricallly valid number is allowed (ie, any number greater than or equal to 3) - See Also:
-
setFacetVertexCount
public void setFacetVertexCount(int vertexCount) Set the number of vertices required per facet. This can be used to enforce a consistent format in the output. Set to-1to allow any geometrically valid number of vertices (ie, any number greater than or equal to 3).- Parameters:
vertexCount- number of vertices required per facet or-1to allow any number- See Also:
-
getFormat
Get thedata formatsupported by this handler.- Returns:
- data format supported by this handler
-
getFacetDefinitionWriter
Get a configuredTextFacetDefinitionWriterfor writing output.- Overrides:
getFacetDefinitionWriterin classAbstractTextBoundaryWriteHandler3D- Parameters:
out- output stream to write to- Returns:
- a new, configured text format writer
-