Package org.lwjgl.util.tinyexr
Class DeepImage
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.tinyexr.DeepImage
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class DeepImage extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Member documentation
image
– image[channels][scanlines][samples]offset_table
– offset_table[scanline][offsets]
Layout
struct DeepImage { char const ** channel_names; float *** image; int ** offset_table; int num_channels; int width; int height; char[4]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DeepImage.Buffer
An array ofDeepImage
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
CHANNEL_NAMES
HEIGHT
IMAGE
NUM_CHANNELS
OFFSET_TABLEThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
WIDTH
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description DeepImage(java.nio.ByteBuffer container)
Creates aDeepImage
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 DeepImage
calloc()
Returns a newDeepImage
instance allocated withmemCalloc
.static DeepImage.Buffer
calloc(int capacity)
Returns a newDeepImage.Buffer
instance allocated withmemCalloc
.static DeepImage
callocStack()
Returns a newDeepImage
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static DeepImage.Buffer
callocStack(int capacity)
Returns a newDeepImage.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static DeepImage.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newDeepImage.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static DeepImage
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newDeepImage
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.org.lwjgl.PointerBuffer
channel_names()
Returns aPointerBuffer
view of the data pointed to by thechannel_names
field.DeepImage
channel_names(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to thechannel_names
field.static DeepImage
create()
Returns a newDeepImage
instance allocated withBufferUtils
.static DeepImage.Buffer
create(int capacity)
Returns a newDeepImage.Buffer
instance allocated withBufferUtils
.static DeepImage
create(long address)
Returns a newDeepImage
instance for the specified memory address.static DeepImage.Buffer
create(long address, int capacity)
Create aDeepImage.Buffer
instance at the specified memory.static DeepImage
createSafe(long address)
static DeepImage.Buffer
createSafe(long address, int capacity)
int
height()
Returns the value of theheight
field.DeepImage
height(int value)
Sets the specified value to theheight
field.org.lwjgl.PointerBuffer
image()
Returns aPointerBuffer
view of the data pointed to by theimage
field.DeepImage
image(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to theimage
field.static DeepImage
malloc()
Returns a newDeepImage
instance allocated withmemAlloc
.static DeepImage.Buffer
malloc(int capacity)
Returns a newDeepImage.Buffer
instance allocated withmemAlloc
.static DeepImage
mallocStack()
Returns a newDeepImage
instance allocated on the thread-localMemoryStack
.static DeepImage.Buffer
mallocStack(int capacity)
Returns a newDeepImage.Buffer
instance allocated on the thread-localMemoryStack
.static DeepImage.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newDeepImage.Buffer
instance allocated on the specifiedMemoryStack
.static DeepImage
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newDeepImage
instance allocated on the specifiedMemoryStack
.static org.lwjgl.PointerBuffer
nchannel_names(long struct)
Unsafe version ofchannel_names
.static void
nchannel_names(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofchannel_names
.static int
nheight(long struct)
Unsafe version ofheight()
.static void
nheight(long struct, int value)
Unsafe version ofheight
.static org.lwjgl.PointerBuffer
nimage(long struct)
Unsafe version ofimage
.static void
nimage(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofimage
.static int
nnum_channels(long struct)
Unsafe version ofnum_channels()
.static void
nnum_channels(long struct, int value)
Sets the specified value to thenum_channels
field of the specifiedstruct
.static org.lwjgl.PointerBuffer
noffset_table(long struct, int capacity)
Unsafe version ofoffset_table
.static void
noffset_table(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofoffset_table
.int
num_channels()
Returns the value of thenum_channels
field.DeepImage
num_channels(int value)
Sets the specified value to thenum_channels
field.static int
nwidth(long struct)
Unsafe version ofwidth()
.static void
nwidth(long struct, int value)
Unsafe version ofwidth
.org.lwjgl.PointerBuffer
offset_table(int capacity)
Returns aPointerBuffer
view of the data pointed to by theoffset_table
field.DeepImage
offset_table(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to theoffset_table
field.DeepImage
set(org.lwjgl.PointerBuffer channel_names, org.lwjgl.PointerBuffer image, org.lwjgl.PointerBuffer offset_table, int num_channels, int width, int height)
Initializes this struct with the specified values.DeepImage
set(DeepImage src)
Copies the specified struct data to this struct.int
sizeof()
static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.int
width()
Returns the value of thewidth
field.DeepImage
width(int value)
Sets the specified value to thewidth
field.
-
-
-
Constructor Detail
-
DeepImage
public DeepImage(java.nio.ByteBuffer container)
Creates aDeepImage
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
-
channel_names
public org.lwjgl.PointerBuffer channel_names()
Returns aPointerBuffer
view of the data pointed to by thechannel_names
field.
-
image
public org.lwjgl.PointerBuffer image()
Returns aPointerBuffer
view of the data pointed to by theimage
field.
-
offset_table
public org.lwjgl.PointerBuffer offset_table(int capacity)
Returns aPointerBuffer
view of the data pointed to by theoffset_table
field.- Parameters:
capacity
- the number of elements in the returned buffer
-
num_channels
public int num_channels()
Returns the value of thenum_channels
field.
-
width
public int width()
Returns the value of thewidth
field.
-
height
public int height()
Returns the value of theheight
field.
-
channel_names
public DeepImage channel_names(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to thechannel_names
field.
-
image
public DeepImage image(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to theimage
field.
-
offset_table
public DeepImage offset_table(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to theoffset_table
field.
-
num_channels
public DeepImage num_channels(int value)
Sets the specified value to thenum_channels
field.
-
width
public DeepImage width(int value)
Sets the specified value to thewidth
field.
-
height
public DeepImage height(int value)
Sets the specified value to theheight
field.
-
set
public DeepImage set(org.lwjgl.PointerBuffer channel_names, org.lwjgl.PointerBuffer image, org.lwjgl.PointerBuffer offset_table, int num_channels, int width, int height)
Initializes this struct with the specified values.
-
set
public DeepImage set(DeepImage src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static DeepImage malloc()
Returns a newDeepImage
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static DeepImage calloc()
Returns a newDeepImage
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static DeepImage create()
Returns a newDeepImage
instance allocated withBufferUtils
.
-
create
public static DeepImage create(long address)
Returns a newDeepImage
instance for the specified memory address.
-
createSafe
@Nullable public static DeepImage createSafe(long address)
-
malloc
public static DeepImage.Buffer malloc(int capacity)
Returns a newDeepImage.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static DeepImage.Buffer calloc(int capacity)
Returns a newDeepImage.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static DeepImage.Buffer create(int capacity)
Returns a newDeepImage.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static DeepImage.Buffer create(long address, int capacity)
Create aDeepImage.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static DeepImage.Buffer createSafe(long address, int capacity)
-
mallocStack
public static DeepImage mallocStack()
Returns a newDeepImage
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static DeepImage callocStack()
Returns a newDeepImage
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static DeepImage mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newDeepImage
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static DeepImage callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newDeepImage
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static DeepImage.Buffer mallocStack(int capacity)
Returns a newDeepImage.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static DeepImage.Buffer callocStack(int capacity)
Returns a newDeepImage.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static DeepImage.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newDeepImage.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static DeepImage.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newDeepImage.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nchannel_names
public static org.lwjgl.PointerBuffer nchannel_names(long struct)
Unsafe version ofchannel_names
.
-
nimage
public static org.lwjgl.PointerBuffer nimage(long struct)
Unsafe version ofimage
.
-
noffset_table
public static org.lwjgl.PointerBuffer noffset_table(long struct, int capacity)
Unsafe version ofoffset_table
.
-
nnum_channels
public static int nnum_channels(long struct)
Unsafe version ofnum_channels()
.
-
nwidth
public static int nwidth(long struct)
Unsafe version ofwidth()
.
-
nheight
public static int nheight(long struct)
Unsafe version ofheight()
.
-
nchannel_names
public static void nchannel_names(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofchannel_names
.
-
nimage
public static void nimage(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofimage
.
-
noffset_table
public static void noffset_table(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofoffset_table
.
-
nnum_channels
public static void nnum_channels(long struct, int value)
Sets the specified value to thenum_channels
field of the specifiedstruct
.
-
nwidth
public static void nwidth(long struct, int value)
Unsafe version ofwidth
.
-
nheight
public static void nheight(long struct, int value)
Unsafe version ofheight
.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-