Package de.javagl.ply

Enum PlyType

  • All Implemented Interfaces:
    Serializable, Comparable<PlyType>

    public enum PlyType
    extends Enum<PlyType>
    An enumeration of types that may appear in PLY data. All types have aliases in PLY. For example, the type UCHAR is identical to UINT8 The standard enum valueOf(String) function can only resolve one specific representation of these types. Therefore, this enum offers a valueFor(String) method that resolves both representations to one enum value.
    • Enum Constant Detail

      • UCHAR

        public static final PlyType UCHAR
        An 8-bit unsigned char (byte)
      • CHAR

        public static final PlyType CHAR
        An 8-bit signed char (byte)
      • USHORT

        public static final PlyType USHORT
        A 16-bit unsigned short
      • SHORT

        public static final PlyType SHORT
        A 16-bit signed short
      • UINT

        public static final PlyType UINT
        A 32-bit unsigned int
      • INT

        public static final PlyType INT
        A 32-bit signed short
      • FLOAT

        public static final PlyType FLOAT
        A 32-bit floating point type
      • DOUBLE

        public static final PlyType DOUBLE
        A 64-bit floating point type
    • Method Detail

      • values

        public static PlyType[] 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 (PlyType c : PlyType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PlyType 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
      • valueFor

        public static PlyType valueFor​(String s)
        Returns the type that corresponds to the given string. In contrast to valueOf(String), this will accept all representations of types in PLY, including aliases.
        Parameters:
        s - The string
        Returns:
        The type
        Throws:
        IllegalArgumentException - If the given string does not represent a valid type