Class ParSLViewport

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

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

    Layout

    
     struct parsl_viewport {
         float left;
         float top;
         float right;
         float bottom;
     }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ParSLViewport.Buffer
      An array of ParSLViewport structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.Pointer.Default
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALIGNOF
      The struct alignment in bytes.
      static int BOTTOM
      LEFT
      RIGHT
      The struct member offsets.
      static int SIZEOF
      The struct size in bytes.
      static int TOP
      The struct member offsets.
      • Fields inherited from interface org.lwjgl.system.Pointer

        BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
    • Constructor Summary

      Constructors 
      Constructor Description
      ParSLViewport​(java.nio.ByteBuffer container)
      Creates a ParSLViewport instance at the current position of the specified ByteBuffer container.
    • 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()
        Specified by:
        sizeof in class org.lwjgl.system.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()
        Returns a new ParSLViewport instance allocated with BufferUtils.
      • 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.
      • malloc

        public static ParSLViewport.Buffer malloc​(int capacity)
        Returns a new ParSLViewport.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • calloc

        public static ParSLViewport.Buffer calloc​(int capacity)
        Returns a new ParSLViewport.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • 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​(org.lwjgl.system.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​(org.lwjgl.system.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
      • mallocStack

        public static ParSLViewport.Buffer mallocStack​(int capacity)
        Returns a new ParSLViewport.Buffer instance allocated on the thread-local MemoryStack.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static ParSLViewport.Buffer callocStack​(int capacity)
        Returns a new ParSLViewport.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

        public static ParSLViewport.Buffer mallocStack​(int capacity,
                                                       org.lwjgl.system.MemoryStack stack)
        Returns a new ParSLViewport.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

        public static ParSLViewport.Buffer callocStack​(int capacity,
                                                       org.lwjgl.system.MemoryStack stack)
        Returns a new ParSLViewport.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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.