Package org.lwjgl.util.par
Class ParSLConfig
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.par.ParSLConfig
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class ParSLConfig extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Immutable configuration for a streamlines context.Member documentation
flags
– one or more of:FLAG_WIREFRAME
FLAG_ANNOTATIONS
FLAG_SPINE_LENGTHS
FLAG_RANDOM_OFFSETS
FLAG_CURVE_GUIPARSL_FLAG_DES
u_mode
– one of:ParStreamlines.PAR_U_MODE_NORMALIZED_DISTANCE
ParStreamlines.PAR_U_MODE_DISTANCE
ParStreamlines.PAR_U_MODE_SEGMENT_INDEX
ParStreamlines.PAR_U_MODE_SEGMENT_FRACTION
Layout
struct parsl_config { float thickness; uint32_t flags; int u_mode; float curves_max_flatness; float streamlines_seed_spacing;
parsl_viewport
streamlines_seed_viewport; float miter_limit; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ParSLConfig.Buffer
An array ofParSLConfig
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
CURVES_MAX_FLATNESS
FLAGS
MITER_LIMITThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STREAMLINES_SEED_SPACING
STREAMLINES_SEED_VIEWPORT
THICKNESS
U_MODEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description ParSLConfig(java.nio.ByteBuffer container)
Creates aParSLConfig
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParSLConfig
calloc()
Returns a newParSLConfig
instance allocated withmemCalloc
.static ParSLConfig.Buffer
calloc(int capacity)
Returns a newParSLConfig.Buffer
instance allocated withmemCalloc
.static ParSLConfig
callocStack()
Returns a newParSLConfig
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ParSLConfig.Buffer
callocStack(int capacity)
Returns a newParSLConfig.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ParSLConfig.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newParSLConfig.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ParSLConfig
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newParSLConfig
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ParSLConfig
create()
Returns a newParSLConfig
instance allocated withBufferUtils
.static ParSLConfig.Buffer
create(int capacity)
Returns a newParSLConfig.Buffer
instance allocated withBufferUtils
.static ParSLConfig
create(long address)
Returns a newParSLConfig
instance for the specified memory address.static ParSLConfig.Buffer
create(long address, int capacity)
Create aParSLConfig.Buffer
instance at the specified memory.static ParSLConfig
createSafe(long address)
static ParSLConfig.Buffer
createSafe(long address, int capacity)
float
curves_max_flatness()
Returns the value of thecurves_max_flatness
field.ParSLConfig
curves_max_flatness(float value)
Sets the specified value to thecurves_max_flatness
field.int
flags()
Returns the value of theflags
field.ParSLConfig
flags(int value)
Sets the specified value to theflags
field.static ParSLConfig
malloc()
Returns a newParSLConfig
instance allocated withmemAlloc
.static ParSLConfig.Buffer
malloc(int capacity)
Returns a newParSLConfig.Buffer
instance allocated withmemAlloc
.static ParSLConfig
mallocStack()
Returns a newParSLConfig
instance allocated on the thread-localMemoryStack
.static ParSLConfig.Buffer
mallocStack(int capacity)
Returns a newParSLConfig.Buffer
instance allocated on the thread-localMemoryStack
.static ParSLConfig.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newParSLConfig.Buffer
instance allocated on the specifiedMemoryStack
.static ParSLConfig
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newParSLConfig
instance allocated on the specifiedMemoryStack
.float
miter_limit()
Returns the value of themiter_limit
field.ParSLConfig
miter_limit(float value)
Sets the specified value to themiter_limit
field.static float
ncurves_max_flatness(long struct)
Unsafe version ofcurves_max_flatness()
.static void
ncurves_max_flatness(long struct, float value)
Unsafe version ofcurves_max_flatness
.static int
nflags(long struct)
Unsafe version offlags()
.static void
nflags(long struct, int value)
Unsafe version offlags
.static float
nmiter_limit(long struct)
Unsafe version ofmiter_limit()
.static void
nmiter_limit(long struct, float value)
Unsafe version ofmiter_limit
.static float
nstreamlines_seed_spacing(long struct)
Unsafe version ofstreamlines_seed_spacing()
.static void
nstreamlines_seed_spacing(long struct, float value)
Unsafe version ofstreamlines_seed_spacing
.static ParSLViewport
nstreamlines_seed_viewport(long struct)
Unsafe version ofstreamlines_seed_viewport()
.static void
nstreamlines_seed_viewport(long struct, ParSLViewport value)
Unsafe version ofstreamlines_seed_viewport
.static float
nthickness(long struct)
Unsafe version ofthickness()
.static void
nthickness(long struct, float value)
Unsafe version ofthickness
.static int
nu_mode(long struct)
Unsafe version ofu_mode()
.static void
nu_mode(long struct, int value)
Unsafe version ofu_mode
.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.ParSLConfig
set(ParSLConfig src)
Copies the specified struct data to this struct.int
sizeof()
float
streamlines_seed_spacing()
Returns the value of thestreamlines_seed_spacing
field.ParSLConfig
streamlines_seed_spacing(float value)
Sets the specified value to thestreamlines_seed_spacing
field.ParSLViewport
streamlines_seed_viewport()
Returns aParSLViewport
view of thestreamlines_seed_viewport
field.ParSLConfig
streamlines_seed_viewport(java.util.function.Consumer<ParSLViewport> consumer)
Passes thestreamlines_seed_viewport
field to the specifiedConsumer
.ParSLConfig
streamlines_seed_viewport(ParSLViewport value)
Copies the specifiedParSLViewport
to thestreamlines_seed_viewport
field.float
thickness()
Returns the value of thethickness
field.ParSLConfig
thickness(float value)
Sets the specified value to thethickness
field.int
u_mode()
Returns the value of theu_mode
field.ParSLConfig
u_mode(int value)
Sets the specified value to theu_mode
field.
-
-
-
Constructor Detail
-
ParSLConfig
public ParSLConfig(java.nio.ByteBuffer container)
Creates aParSLConfig
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
thickness
public float thickness()
Returns the value of thethickness
field.
-
flags
public int flags()
Returns the value of theflags
field.
-
u_mode
public int u_mode()
Returns the value of theu_mode
field.
-
curves_max_flatness
public float curves_max_flatness()
Returns the value of thecurves_max_flatness
field.
-
streamlines_seed_spacing
public float streamlines_seed_spacing()
Returns the value of thestreamlines_seed_spacing
field.
-
streamlines_seed_viewport
public ParSLViewport streamlines_seed_viewport()
Returns aParSLViewport
view of thestreamlines_seed_viewport
field.
-
miter_limit
public float miter_limit()
Returns the value of themiter_limit
field.
-
thickness
public ParSLConfig thickness(float value)
Sets the specified value to thethickness
field.
-
flags
public ParSLConfig flags(int value)
Sets the specified value to theflags
field.
-
u_mode
public ParSLConfig u_mode(int value)
Sets the specified value to theu_mode
field.
-
curves_max_flatness
public ParSLConfig curves_max_flatness(float value)
Sets the specified value to thecurves_max_flatness
field.
-
streamlines_seed_spacing
public ParSLConfig streamlines_seed_spacing(float value)
Sets the specified value to thestreamlines_seed_spacing
field.
-
streamlines_seed_viewport
public ParSLConfig streamlines_seed_viewport(ParSLViewport value)
Copies the specifiedParSLViewport
to thestreamlines_seed_viewport
field.
-
streamlines_seed_viewport
public ParSLConfig streamlines_seed_viewport(java.util.function.Consumer<ParSLViewport> consumer)
Passes thestreamlines_seed_viewport
field to the specifiedConsumer
.
-
miter_limit
public ParSLConfig miter_limit(float value)
Sets the specified value to themiter_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 newParSLConfig
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static ParSLConfig calloc()
Returns a newParSLConfig
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static ParSLConfig create()
Returns a newParSLConfig
instance allocated withBufferUtils
.
-
create
public static ParSLConfig create(long address)
Returns a newParSLConfig
instance for the specified memory address.
-
createSafe
@Nullable public static ParSLConfig createSafe(long address)
-
malloc
public static ParSLConfig.Buffer malloc(int capacity)
Returns a newParSLConfig.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static ParSLConfig.Buffer calloc(int capacity)
Returns a newParSLConfig.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static ParSLConfig.Buffer create(int capacity)
Returns a newParSLConfig.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static ParSLConfig.Buffer create(long address, int capacity)
Create aParSLConfig.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static ParSLConfig.Buffer createSafe(long address, int capacity)
-
mallocStack
public static ParSLConfig mallocStack()
Returns a newParSLConfig
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static ParSLConfig callocStack()
Returns a newParSLConfig
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static ParSLConfig mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newParSLConfig
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static ParSLConfig callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newParSLConfig
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static ParSLConfig.Buffer mallocStack(int capacity)
Returns a newParSLConfig.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static ParSLConfig.Buffer callocStack(int capacity)
Returns a newParSLConfig.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static ParSLConfig.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newParSLConfig.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static ParSLConfig.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newParSLConfig.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nthickness
public static float nthickness(long struct)
Unsafe version ofthickness()
.
-
nflags
public static int nflags(long struct)
Unsafe version offlags()
.
-
nu_mode
public static int nu_mode(long struct)
Unsafe version ofu_mode()
.
-
ncurves_max_flatness
public static float ncurves_max_flatness(long struct)
Unsafe version ofcurves_max_flatness()
.
-
nstreamlines_seed_spacing
public static float nstreamlines_seed_spacing(long struct)
Unsafe version ofstreamlines_seed_spacing()
.
-
nstreamlines_seed_viewport
public static ParSLViewport nstreamlines_seed_viewport(long struct)
Unsafe version ofstreamlines_seed_viewport()
.
-
nmiter_limit
public static float nmiter_limit(long struct)
Unsafe version ofmiter_limit()
.
-
nthickness
public static void nthickness(long struct, float value)
Unsafe version ofthickness
.
-
nflags
public static void nflags(long struct, int value)
Unsafe version offlags
.
-
nu_mode
public static void nu_mode(long struct, int value)
Unsafe version ofu_mode
.
-
ncurves_max_flatness
public static void ncurves_max_flatness(long struct, float value)
Unsafe version ofcurves_max_flatness
.
-
nstreamlines_seed_spacing
public static void nstreamlines_seed_spacing(long struct, float value)
Unsafe version ofstreamlines_seed_spacing
.
-
nstreamlines_seed_viewport
public static void nstreamlines_seed_viewport(long struct, ParSLViewport value)
Unsafe version ofstreamlines_seed_viewport
.
-
nmiter_limit
public static void nmiter_limit(long struct, float value)
Unsafe version ofmiter_limit
.
-
-