Enum GeometryFormat3D

java.lang.Object
java.lang.Enum<GeometryFormat3D>
org.apache.commons.geometry.io.euclidean.threed.GeometryFormat3D
All Implemented Interfaces:
Serializable, Comparable<GeometryFormat3D>, java.lang.constant.Constable, GeometryFormat

public enum GeometryFormat3D extends Enum<GeometryFormat3D> implements GeometryFormat
Enum containing 3D geometry formats supported internally by Apache Commons Geometry.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    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.
    Value representing the OBJ file format.
    Value representing the STL file format in both the text (i.e.
    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 final List<String>
    List of file extensions associated with the format.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Construct a new instance with the given file extension.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the default file extension used by the format.
    Get all file extensions associated with the format, including the default.
    Get the format name.
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • OBJ

      public static final GeometryFormat3D OBJ
      Value representing the OBJ file format.
      See Also:
    • STL

      public static final GeometryFormat3D STL
      Value representing the STL file format in both the text (i.e. "ASCII") and binary forms.
      See Also:
    • 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 pattern

      p1x 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.

      See Also:
    • 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 the TXT 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.

      See Also:
  • Field Details

    • fileExtensions

      private final List<String> fileExtensions
      List of file extensions associated with the format. The first file extension listed is taken as the default.
  • Constructor Details

    • GeometryFormat3D

      private GeometryFormat3D(String fileExt)
      Construct a new instance with the given file extension.
      Parameters:
      fileExt - file extension
  • Method Details

    • values

      public static GeometryFormat3D[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static GeometryFormat3D valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getFormatName

      public String getFormatName()
      Get the format name.
      Specified by:
      getFormatName in interface GeometryFormat
      Returns:
      format name
    • getDefaultFileExtension

      public String getDefaultFileExtension()
      Get the default file extension used by the format.
      Specified by:
      getDefaultFileExtension in interface GeometryFormat
      Returns:
      default file extension
    • getFileExtensions

      public List<String> getFileExtensions()
      Get all file extensions associated with the format, including the default.
      Specified by:
      getFileExtensions in interface GeometryFormat
      Returns:
      all file extensions associated with the format