Class SMFSupportedSizes


  • public final class SMFSupportedSizes
    extends java.lang.Object
    The supported sizes in bits of each type.
    • Method Detail

      • isIntegerUnsignedSupported

        public static boolean isIntegerUnsignedSupported​(int bits)
        Parameters:
        bits - The size in bits
        Returns:
        true if an unsigned integer type with the given size is supported
      • checkIntegerUnsignedSupported

        public static int checkIntegerUnsignedSupported​(java.lang.String type,
                                                        int bits)
                                                 throws java.lang.UnsupportedOperationException
        Check if an unsigned integer type with the given size is supported.
        Parameters:
        type - The name of the type (such as "triangle indices")
        bits - The size in bits
        Returns:
        bits
        Throws:
        java.lang.UnsupportedOperationException - If the size is not supported
      • isIntegerSignedSupported

        public static boolean isIntegerSignedSupported​(int bits)
        Parameters:
        bits - The size in bits
        Returns:
        true if a signed integer type with the given size is supported
      • checkIntegerSignedSupported

        public static int checkIntegerSignedSupported​(java.lang.String type,
                                                      int bits)
                                               throws java.lang.UnsupportedOperationException
        Check if a signed integer type with the given size is supported.
        Parameters:
        type - The name of the type (such as "triangle indices")
        bits - The size in bits
        Returns:
        bits
        Throws:
        java.lang.UnsupportedOperationException - If the size is not supported
      • isFloatSupported

        public static boolean isFloatSupported​(int bits)
        Parameters:
        bits - The size in bits
        Returns:
        true if a floating point type with the given size is supported
      • checkFloatSupported

        public static int checkFloatSupported​(java.lang.String type,
                                              int bits)
                                       throws java.lang.UnsupportedOperationException
        Check if a floating point type with the given size is supported.
        Parameters:
        type - The name of the type (such as "triangle indices")
        bits - The size in bits
        Returns:
        bits
        Throws:
        java.lang.UnsupportedOperationException - If the size is not supported