Class ParSLSpineList

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class ParSLSpineList
    extends Struct
    implements NativeResource
    Client-owned list of line strips that will be tessellated.

    Layout

    
     struct parsl_spine_list {
         uint32_t num_vertices;
         uint16_t num_spines;
         parsl_position * vertices;
         uint16_t * spine_lengths;
         bool closed;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • NUM_VERTICES, NUM_SPINES, VERTICES, SPINE_LENGTHS, CLOSED

        The struct member offsets.
    • Constructor Detail

      • ParSLSpineList

        public ParSLSpineList​(java.nio.ByteBuffer container)
        Creates a ParSLSpineList instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • num_vertices

        public int num_vertices()
        Returns the value of the num_vertices field.
      • num_spines

        public short num_spines()
        Returns the value of the num_spines field.
      • spine_lengths

        public java.nio.ShortBuffer spine_lengths()
        Returns a ShortBuffer view of the data pointed to by the spine_lengths field.
      • closed

        public boolean closed()
        Returns the value of the closed field.
      • spine_lengths

        public ParSLSpineList spine_lengths​(java.nio.ShortBuffer value)
        Sets the address of the specified ShortBuffer to the spine_lengths field.
      • closed

        public ParSLSpineList closed​(boolean value)
        Sets the specified value to the closed field.
      • set

        public ParSLSpineList set​(ParSLPosition.Buffer vertices,
                                  java.nio.ShortBuffer spine_lengths,
                                  boolean closed)
        Initializes this struct with the specified values.
      • set

        public ParSLSpineList set​(ParSLSpineList src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

        public static ParSLSpineList malloc()
        Returns a new ParSLSpineList instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static ParSLSpineList calloc()
        Returns a new ParSLSpineList instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static ParSLSpineList create​(long address)
        Returns a new ParSLSpineList instance for the specified memory address.
      • createSafe

        @Nullable
        public static ParSLSpineList createSafe​(long address)
        Like create, but returns null if address is NULL.
      • create

        public static ParSLSpineList.Buffer create​(long address,
                                                   int capacity)
        Create a ParSLSpineList.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static ParSLSpineList.Buffer createSafe​(long address,
                                                       int capacity)
        Like create, but returns null if address is NULL.
      • mallocStack

        public static ParSLSpineList mallocStack()
        Returns a new ParSLSpineList instance allocated on the thread-local MemoryStack.
      • callocStack

        public static ParSLSpineList callocStack()
        Returns a new ParSLSpineList instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static ParSLSpineList mallocStack​(MemoryStack stack)
        Returns a new ParSLSpineList instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static ParSLSpineList callocStack​(MemoryStack stack)
        Returns a new ParSLSpineList instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • nnum_vertices

        public static int nnum_vertices​(long struct)
        Unsafe version of num_vertices().
      • nnum_spines

        public static short nnum_spines​(long struct)
        Unsafe version of num_spines().
      • nspine_lengths

        public static java.nio.ShortBuffer nspine_lengths​(long struct)
        Unsafe version of spine_lengths.
      • nclosed

        public static boolean nclosed​(long struct)
        Unsafe version of closed().
      • nnum_vertices

        public static void nnum_vertices​(long struct,
                                         int value)
        Sets the specified value to the num_vertices field of the specified struct.
      • nnum_spines

        public static void nnum_spines​(long struct,
                                       short value)
        Sets the specified value to the num_spines field of the specified struct.
      • nspine_lengths

        public static void nspine_lengths​(long struct,
                                          java.nio.ShortBuffer value)
        Unsafe version of spine_lengths.
      • nclosed

        public static void nclosed​(long struct,
                                   boolean value)
        Unsafe version of closed.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate
      • validate

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array