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
BoundaryWriteHandler3Dimplementation for the non-standardTXTformat. Output is written using the UTF-8 charset by default.- See Also:
BoundaryWriteHandler3D,TextFacetDefinitionWriter
-
-
Field Summary
Fields Modifier and Type Field Description private intfacetVertexCountNumber of vertices required per facet; will be -1 if disabled.private java.lang.StringvertexComponentSeparatorString used to separate vertex components, ie, x, y, z values.private java.lang.StringvertexSeparatorString used to separate vertices.
-
Constructor Summary
Constructors Constructor Description TextBoundaryWriteHandler3D()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TextFacetDefinitionWritergetFacetDefinitionWriter(GeometryOutput out)Get a configuredTextFacetDefinitionWriterfor writing output.intgetFacetVertexCount()Get the number of vertices required per facet or-1if no specific number is required.GeometryFormatgetFormat()Get thedata formatsupported by this handler.java.lang.StringgetVertexComponentSeparator()Get the string used to separate vertex components (ie, individual x, y, z values).java.lang.StringgetVertexSeparator()Get the string used to separate facet vertices.voidsetFacetVertexCount(int vertexCount)Set the number of vertices required per facet.voidsetVertexComponentSeparator(java.lang.String sep)Set the string used to separate vertex components (ie, individual x, y, z values).voidsetVertexSeparator(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-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:
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-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:
TextFacetDefinitionWriter.setFacetVertexCount(int)
-
getFormat
public GeometryFormat getFormat()
Get thedata formatsupported by this handler.- Returns:
- data format supported by this handler
-
getFacetDefinitionWriter
protected TextFacetDefinitionWriter getFacetDefinitionWriter(GeometryOutput out)
Get a configuredTextFacetDefinitionWriterfor writing output.- Overrides:
getFacetDefinitionWriterin classAbstractTextBoundaryWriteHandler3D- Parameters:
out- output stream to write to- Returns:
- a new, configured text format writer
-
-