Class ParSLViewport

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

    public class ParSLViewport
    extends Struct
    implements NativeResource
    Viewport for streamline seed placement.

    Layout

    
     struct parsl_viewport {
         float left;
         float top;
         float right;
         float bottom;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • LEFT, TOP, RIGHT, BOTTOM

        The struct member offsets.
    • Constructor Detail

      • ParSLViewport

        public ParSLViewport​(java.nio.ByteBuffer container)
        Creates a ParSLViewport 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
      • left

        public float left()
        Returns the value of the left field.
      • top

        public float top()
        Returns the value of the top field.
      • right

        public float right()
        Returns the value of the right field.
      • bottom

        public float bottom()
        Returns the value of the bottom field.
      • left

        public ParSLViewport left​(float value)
        Sets the specified value to the left field.
      • top

        public ParSLViewport top​(float value)
        Sets the specified value to the top field.
      • right

        public ParSLViewport right​(float value)
        Sets the specified value to the right field.
      • bottom

        public ParSLViewport bottom​(float value)
        Sets the specified value to the bottom field.
      • set

        public ParSLViewport set​(float left,
                                 float top,
                                 float right,
                                 float bottom)
        Initializes this struct with the specified values.
      • set

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

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

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

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

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

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

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

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

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

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

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

        public static float nleft​(long struct)
        Unsafe version of left().
      • ntop

        public static float ntop​(long struct)
        Unsafe version of top().
      • nright

        public static float nright​(long struct)
        Unsafe version of right().
      • nbottom

        public static float nbottom​(long struct)
        Unsafe version of bottom().
      • nleft

        public static void nleft​(long struct,
                                 float value)
        Unsafe version of left.
      • ntop

        public static void ntop​(long struct,
                                float value)
        Unsafe version of top.
      • nright

        public static void nright​(long struct,
                                  float value)
        Unsafe version of right.
      • nbottom

        public static void nbottom​(long struct,
                                   float value)
        Unsafe version of bottom.