Enum GeometryFormat3D
- java.lang.Object
-
- java.lang.Enum<GeometryFormat3D>
-
- org.apache.commons.geometry.io.euclidean.threed.GeometryFormat3D
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<GeometryFormat3D>
,GeometryFormat
public enum GeometryFormat3D extends java.lang.Enum<GeometryFormat3D> implements GeometryFormat
Enum containing 3D geometry formats supported internally by Apache Commons Geometry.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CSV
Value representing a simple, non-standard CSV geometry format that defines triangular facets one per line by listing the facet vertex coordinates in order, separated by commas.OBJ
Value representing the OBJ file format.STL
Value representing the STL file format in both the text (i.e.TXT
Value representing a simple, non-standard text geometry format that defines facets one per line by listing the coordinates of the facet vertices in order, separated by non-numeric characters (e.g.
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>
fileExtensions
List of file extensions associated with the format.
-
Constructor Summary
Constructors Modifier Constructor Description private
GeometryFormat3D(java.lang.String fileExt)
Construct a new instance with the given file extension.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDefaultFileExtension()
Get the default file extension used by the format.java.util.List<java.lang.String>
getFileExtensions()
Get all file extensions associated with the format, including thedefault
.java.lang.String
getFormatName()
Get the format name.static GeometryFormat3D
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static GeometryFormat3D[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OBJ
public static final GeometryFormat3D OBJ
Value representing the OBJ file format.- See Also:
- Wavefront .obj file
-
STL
public static final GeometryFormat3D STL
Value representing the STL file format in both the text (i.e. "ASCII") and binary forms.- See Also:
- STL
-
TXT
public static final GeometryFormat3D TXT
Value representing a simple, non-standard text geometry format that defines facets one per line by listing the coordinates of the facet vertices in order, separated by non-numeric characters (e.g. whitespace, commas, semicolons, etc). Each line follows the patternp1x p1y p1z p2x p2y p2z p3x p3y p3z ...
where the p1 elements contain the coordinates of the first facet vertex, p2 those of the second, and so on. Facets may have 3 or more vertices and do not need to all have the same number of vertices.
This format is non-standard and no guarantees are made regarding its compatibility with other systems. It is intended primarily to provide a convenient, human-readable format for data input and analysis.
-
CSV
public static final GeometryFormat3D CSV
Value representing a simple, non-standard CSV geometry format that defines triangular facets one per line by listing the facet vertex coordinates in order, separated by commas. This format is a subset of theTXT
format with commas as separators and facets written as triangles (to ensure that all rows have the same number of columns).This format is non-standard and no guarantees are made regarding its compatibility with other systems. It is intended primarily to provide a convenient, human-readable format for data input and analysis.
-
-
Method Detail
-
values
public static GeometryFormat3D[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (GeometryFormat3D c : GeometryFormat3D.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GeometryFormat3D valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getFormatName
public java.lang.String getFormatName()
Get the format name.- Specified by:
getFormatName
in interfaceGeometryFormat
- Returns:
- format name
-
getDefaultFileExtension
public java.lang.String getDefaultFileExtension()
Get the default file extension used by the format.- Specified by:
getDefaultFileExtension
in interfaceGeometryFormat
- Returns:
- default file extension
-
getFileExtensions
public java.util.List<java.lang.String> getFileExtensions()
Get all file extensions associated with the format, including thedefault
.- Specified by:
getFileExtensions
in interfaceGeometryFormat
- Returns:
- all file extensions associated with the format
-
-