Class ParSLConfig

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ParSLConfig extends Struct<ParSLConfig> implements NativeResource

 struct parsl_config {
     float thickness;
     uint32_t flags;
     int u_mode;
     float curves_max_flatness;
     float streamlines_seed_spacing;
     {@link ParSLViewport parsl_viewport} streamlines_seed_viewport;
     float miter_limit;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • THICKNESS

      public static final int THICKNESS
      The struct member offsets.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • U_MODE

      public static final int U_MODE
      The struct member offsets.
    • CURVES_MAX_FLATNESS

      public static final int CURVES_MAX_FLATNESS
      The struct member offsets.
    • STREAMLINES_SEED_SPACING

      public static final int STREAMLINES_SEED_SPACING
      The struct member offsets.
    • STREAMLINES_SEED_VIEWPORT

      public static final int STREAMLINES_SEED_VIEWPORT
      The struct member offsets.
    • MITER_LIMIT

      public static final int MITER_LIMIT
      The struct member offsets.
  • Constructor Details

    • ParSLConfig

      public ParSLConfig(ByteBuffer container)
      Creates a ParSLConfig 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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<ParSLConfig>
    • thickness

      public float thickness()
      Returns:
      the value of the thickness field.
    • flags

      public int flags()
      Returns:
      the value of the flags field.
    • u_mode

      public int u_mode()
      Returns:
      the value of the u_mode field.
    • curves_max_flatness

      public float curves_max_flatness()
      Returns:
      the value of the curves_max_flatness field.
    • streamlines_seed_spacing

      public float streamlines_seed_spacing()
      Returns:
      the value of the streamlines_seed_spacing field.
    • streamlines_seed_viewport

      public ParSLViewport streamlines_seed_viewport()
      Returns:
      a ParSLViewport view of the streamlines_seed_viewport field.
    • miter_limit

      public float miter_limit()
      Returns:
      the value of the miter_limit field.
    • thickness

      public ParSLConfig thickness(float value)
      Sets the specified value to the thickness field.
    • flags

      public ParSLConfig flags(int value)
      Sets the specified value to the flags field.
    • u_mode

      public ParSLConfig u_mode(int value)
      Sets the specified value to the u_mode field.
    • curves_max_flatness

      public ParSLConfig curves_max_flatness(float value)
      Sets the specified value to the curves_max_flatness field.
    • streamlines_seed_spacing

      public ParSLConfig streamlines_seed_spacing(float value)
      Sets the specified value to the streamlines_seed_spacing field.
    • streamlines_seed_viewport

      public ParSLConfig streamlines_seed_viewport(ParSLViewport value)
      Copies the specified ParSLViewport to the streamlines_seed_viewport field.
    • streamlines_seed_viewport

      public ParSLConfig streamlines_seed_viewport(Consumer<ParSLViewport> consumer)
      Passes the streamlines_seed_viewport field to the specified Consumer.
    • miter_limit

      public ParSLConfig miter_limit(float value)
      Sets the specified value to the miter_limit field.
    • set

      public ParSLConfig set(float thickness, int flags, int u_mode, float curves_max_flatness, float streamlines_seed_spacing, ParSLViewport streamlines_seed_viewport, float miter_limit)
      Initializes this struct with the specified values.
    • set

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

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

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

      public static ParSLConfig create()
      Returns a new ParSLConfig instance allocated with BufferUtils.
    • create

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

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

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

      public static ParSLConfig.Buffer calloc(int capacity)
      Returns a new ParSLConfig.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static ParSLConfig.Buffer create(int capacity)
      Returns a new ParSLConfig.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

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

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

      @Deprecated public static ParSLConfig mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static ParSLConfig callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static ParSLConfig mallocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static ParSLConfig callocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static ParSLConfig.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static ParSLConfig.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static ParSLConfig.Buffer mallocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static ParSLConfig.Buffer callocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static ParSLConfig malloc(MemoryStack stack)
      Returns a new ParSLConfig instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

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

      public static ParSLConfig.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new ParSLConfig.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static ParSLConfig.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new ParSLConfig.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nthickness

      public static float nthickness(long struct)
      Unsafe version of thickness().
    • nflags

      public static int nflags(long struct)
      Unsafe version of flags().
    • nu_mode

      public static int nu_mode(long struct)
      Unsafe version of u_mode().
    • ncurves_max_flatness

      public static float ncurves_max_flatness(long struct)
      Unsafe version of curves_max_flatness().
    • nstreamlines_seed_spacing

      public static float nstreamlines_seed_spacing(long struct)
      Unsafe version of streamlines_seed_spacing().
    • nstreamlines_seed_viewport

      public static ParSLViewport nstreamlines_seed_viewport(long struct)
      Unsafe version of streamlines_seed_viewport().
    • nmiter_limit

      public static float nmiter_limit(long struct)
      Unsafe version of miter_limit().
    • nthickness

      public static void nthickness(long struct, float value)
      Unsafe version of thickness.
    • nflags

      public static void nflags(long struct, int value)
      Unsafe version of flags.
    • nu_mode

      public static void nu_mode(long struct, int value)
      Unsafe version of u_mode.
    • ncurves_max_flatness

      public static void ncurves_max_flatness(long struct, float value)
      Unsafe version of curves_max_flatness.
    • nstreamlines_seed_spacing

      public static void nstreamlines_seed_spacing(long struct, float value)
      Unsafe version of streamlines_seed_spacing.
    • nstreamlines_seed_viewport

      public static void nstreamlines_seed_viewport(long struct, ParSLViewport value)
      Unsafe version of streamlines_seed_viewport.
    • nmiter_limit

      public static void nmiter_limit(long struct, float value)
      Unsafe version of miter_limit.