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
public class TextBoundaryWriteHandler3D extends AbstractTextBoundaryWriteHandler3D
BoundaryWriteHandler3D
implementation for the non-standardTXT
format. Output is written using the UTF-8 charset by default.- See Also:
BoundaryWriteHandler3D
,TextFacetDefinitionWriter
-
-
Field Summary
Fields Modifier and Type Field Description private int
facetVertexCount
Number of vertices required per facet; will be -1 if disabled.private java.lang.String
vertexComponentSeparator
String used to separate vertex components, ie, x, y, z values.private java.lang.String
vertexSeparator
String used to separate vertices.
-
Constructor Summary
Constructors Constructor Description TextBoundaryWriteHandler3D()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TextFacetDefinitionWriter
getFacetDefinitionWriter(GeometryOutput out)
Get a configuredTextFacetDefinitionWriter
for writing output.int
getFacetVertexCount()
Get the number of vertices required per facet or-1
if no specific number is required.GeometryFormat
getFormat()
Get thedata format
supported by this handler.java.lang.String
getVertexComponentSeparator()
Get the string used to separate vertex components (ie, individual x, y, z values).java.lang.String
getVertexSeparator()
Get the string used to separate facet vertices.void
setFacetVertexCount(int vertexCount)
Set the number of vertices required per facet.void
setVertexComponentSeparator(java.lang.String sep)
Set the string used to separate vertex components (ie, individual x, y, z values).void
setVertexSeparator(java.lang.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, writeFacets
-
Methods inherited from class org.apache.commons.geometry.io.euclidean.threed.AbstractBoundaryWriteHandler3D
write, writeFacets
-
-
-
-
Field Detail
-
vertexComponentSeparator
private java.lang.String vertexComponentSeparator
String used to separate vertex components, ie, x, y, z values.
-
vertexSeparator
private java.lang.String vertexSeparator
String used to separate vertices.
-
facetVertexCount
private int facetVertexCount
Number of vertices required per facet; will be -1 if disabled.
-
-
Method Detail
-
getVertexComponentSeparator
public java.lang.String getVertexComponentSeparator()
Get the string used to separate vertex components (ie, individual x, y, z values).- Returns:
- string used to separate vertex components
- See Also:
TextFacetDefinitionWriter.getVertexComponentSeparator()
-
setVertexComponentSeparator
public void setVertexComponentSeparator(java.lang.String sep)
Set the string used to separate vertex components (ie, individual x, y, z values).- Parameters:
sep
- string used to separate vertex components- See Also:
TextFacetDefinitionWriter.setVertexComponentSeparator(String)
-
getVertexSeparator
public java.lang.String getVertexSeparator()
Get the string used to separate facet vertices.- Returns:
- string used to separate facet vertices
- See Also:
TextFacetDefinitionWriter.getVertexSeparator()
-
setVertexSeparator
public void setVertexSeparator(java.lang.String sep)
Set the string used to separate facet vertices.- Parameters:
sep
- string used to separate facet vertices- See Also:
TextFacetDefinitionWriter.setVertexSeparator(String)
-
getFacetVertexCount
public int getFacetVertexCount()
Get the number of vertices required per facet or-1
if no specific number is required.- Returns:
- the number of vertices required per facet or
-1
if any geometricallly valid number is allowed (ie, any number greater than or equal to 3) - See Also:
TextFacetDefinitionWriter.getFacetVertexCount()
-
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-1
to 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-1
to allow any number- See Also:
TextFacetDefinitionWriter.setFacetVertexCount(int)
-
getFormat
public GeometryFormat getFormat()
Get thedata format
supported by this handler.- Returns:
- data format supported by this handler
-
getFacetDefinitionWriter
protected TextFacetDefinitionWriter getFacetDefinitionWriter(GeometryOutput out)
Get a configuredTextFacetDefinitionWriter
for writing output.- Overrides:
getFacetDefinitionWriter
in classAbstractTextBoundaryWriteHandler3D
- Parameters:
out
- output stream to write to- Returns:
- a new, configured text format writer
-
-