Enum GeometryFormat3D

    • 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 the default.
      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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

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

      • 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 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:
        TextFacetDefinitionReader, TextFacetDefinitionWriter
      • 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:
        TextFacetDefinitionWriter.csvFormat(java.io.Writer)
    • Field Detail

      • fileExtensions

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

      • GeometryFormat3D

        private GeometryFormat3D​(java.lang.String fileExt)
        Construct a new instance with the given file extension.
        Parameters:
        fileExt - file extension
    • 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 name
        java.lang.NullPointerException - if the argument is null
      • getFormatName

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

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

        public java.util.List<java.lang.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