Package org.lwjgl.assimp
Class AIExportDataBlob
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.assimp.AIExportDataBlob
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class AIExportDataBlob extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Describes a blob of exported scene data. UseExportSceneToBlob
to create a blob containing an exported scene. The memory referred by this structure is owned by Assimp. to free its resources. Don't try to free the memory on your side - it will crash for most build configurations due to conflicting heaps.Blobs can be nested - each blob may reference another blob, which may in turn reference another blob and so on. This is used when exporters write more than one output file for a given
AIScene
. See the remarks foraiExportDataBlob::name
for more information.Member documentation
size
– Size of the data in bytesdata
– The data.name
– Name of the blob. An empty string always indicates the first (and primary) blob, which contains the actual file data. Any other blobs are auxiliary files produced by exporters (i.e. material files). Existence of such files depends on the file format. Most formats don't split assets across multiple files.If used, blob names usually contain the file extension that should be used when writing the data to disc.
next
– Pointer to the next blob in the chain or NULL if there is none.
Layout
struct aiExportDataBlob { size_t size; void * data;
struct aiString
name;struct aiExportDataBlob
* next; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AIExportDataBlob.Buffer
An array ofAIExportDataBlob
structs.
-
Constructor Summary
Constructors Constructor Description AIExportDataBlob(java.nio.ByteBuffer container)
Creates aAIExportDataBlob
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 AIExportDataBlob
calloc()
Returns a newAIExportDataBlob
instance allocated withmemCalloc
.static AIExportDataBlob.Buffer
calloc(int capacity)
Returns a newAIExportDataBlob.Buffer
instance allocated withmemCalloc
.static AIExportDataBlob
callocStack()
Returns a newAIExportDataBlob
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIExportDataBlob.Buffer
callocStack(int capacity)
Returns a newAIExportDataBlob.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIExportDataBlob.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIExportDataBlob.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIExportDataBlob
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIExportDataBlob
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIExportDataBlob
create()
Returns a newAIExportDataBlob
instance allocated withBufferUtils
.static AIExportDataBlob.Buffer
create(int capacity)
Returns a newAIExportDataBlob.Buffer
instance allocated withBufferUtils
.static AIExportDataBlob
create(long address)
Returns a newAIExportDataBlob
instance for the specified memory address.static AIExportDataBlob.Buffer
create(long address, int capacity)
Create aAIExportDataBlob.Buffer
instance at the specified memory.static AIExportDataBlob
createSafe(long address)
static AIExportDataBlob.Buffer
createSafe(long address, int capacity)
java.nio.ByteBuffer
data()
Returns aByteBuffer
view of the data pointed to by thedata
field.AIExportDataBlob
data(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBuffer
to thedata
field.static AIExportDataBlob
malloc()
Returns a newAIExportDataBlob
instance allocated withmemAlloc
.static AIExportDataBlob.Buffer
malloc(int capacity)
Returns a newAIExportDataBlob.Buffer
instance allocated withmemAlloc
.static AIExportDataBlob
mallocStack()
Returns a newAIExportDataBlob
instance allocated on the thread-localMemoryStack
.static AIExportDataBlob.Buffer
mallocStack(int capacity)
Returns a newAIExportDataBlob.Buffer
instance allocated on the thread-localMemoryStack
.static AIExportDataBlob.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIExportDataBlob.Buffer
instance allocated on the specifiedMemoryStack
.static AIExportDataBlob
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIExportDataBlob
instance allocated on the specifiedMemoryStack
.AIString
name()
Returns aAIString
view of thename
field.AIExportDataBlob
name(java.util.function.Consumer<AIString> consumer)
Passes thename
field to the specifiedConsumer
.AIExportDataBlob
name(AIString value)
Copies the specifiedAIString
to thename
field.static java.nio.ByteBuffer
ndata(long struct)
Unsafe version ofdata
.static void
ndata(long struct, java.nio.ByteBuffer value)
Unsafe version ofdata
.AIExportDataBlob
next()
Returns aAIExportDataBlob
view of the struct pointed to by thenext
field.AIExportDataBlob
next(AIExportDataBlob value)
Sets the address of the specifiedAIExportDataBlob
to thenext
field.static AIString
nname(long struct)
Unsafe version ofname()
.static void
nname(long struct, AIString value)
Unsafe version ofname
.static AIExportDataBlob
nnext(long struct)
Unsafe version ofnext()
.static void
nnext(long struct, AIExportDataBlob value)
Unsafe version ofnext
.static long
nsize(long struct)
Unsafe version ofsize()
.static void
nsize(long struct, long value)
Sets the specified value to thesize
field of the specifiedstruct
.AIExportDataBlob
set(java.nio.ByteBuffer data, AIString name, AIExportDataBlob next)
Initializes this struct with the specified values.AIExportDataBlob
set(AIExportDataBlob src)
Copies the specified struct data to this struct.long
size()
Returns the value of thesize
field.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.
-
-
-
Constructor Detail
-
AIExportDataBlob
public AIExportDataBlob(java.nio.ByteBuffer container)
Creates aAIExportDataBlob
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
-
size
public long size()
Returns the value of thesize
field.
-
data
public java.nio.ByteBuffer data()
Returns aByteBuffer
view of the data pointed to by thedata
field.
-
next
@Nullable public AIExportDataBlob next()
Returns aAIExportDataBlob
view of the struct pointed to by thenext
field.
-
data
public AIExportDataBlob data(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBuffer
to thedata
field.
-
name
public AIExportDataBlob name(AIString value)
Copies the specifiedAIString
to thename
field.
-
name
public AIExportDataBlob name(java.util.function.Consumer<AIString> consumer)
Passes thename
field to the specifiedConsumer
.
-
next
public AIExportDataBlob next(@Nullable AIExportDataBlob value)
Sets the address of the specifiedAIExportDataBlob
to thenext
field.
-
set
public AIExportDataBlob set(java.nio.ByteBuffer data, AIString name, @Nullable AIExportDataBlob next)
Initializes this struct with the specified values.
-
set
public AIExportDataBlob set(AIExportDataBlob src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static AIExportDataBlob malloc()
Returns a newAIExportDataBlob
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static AIExportDataBlob calloc()
Returns a newAIExportDataBlob
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static AIExportDataBlob create()
Returns a newAIExportDataBlob
instance allocated withBufferUtils
.
-
create
public static AIExportDataBlob create(long address)
Returns a newAIExportDataBlob
instance for the specified memory address.
-
createSafe
@Nullable public static AIExportDataBlob createSafe(long address)
-
malloc
public static AIExportDataBlob.Buffer malloc(int capacity)
Returns a newAIExportDataBlob.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static AIExportDataBlob.Buffer calloc(int capacity)
Returns a newAIExportDataBlob.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static AIExportDataBlob.Buffer create(int capacity)
Returns a newAIExportDataBlob.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static AIExportDataBlob.Buffer create(long address, int capacity)
Create aAIExportDataBlob.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static AIExportDataBlob.Buffer createSafe(long address, int capacity)
-
mallocStack
public static AIExportDataBlob mallocStack()
Returns a newAIExportDataBlob
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static AIExportDataBlob callocStack()
Returns a newAIExportDataBlob
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static AIExportDataBlob mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIExportDataBlob
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static AIExportDataBlob callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIExportDataBlob
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static AIExportDataBlob.Buffer mallocStack(int capacity)
Returns a newAIExportDataBlob.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static AIExportDataBlob.Buffer callocStack(int capacity)
Returns a newAIExportDataBlob.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static AIExportDataBlob.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIExportDataBlob.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static AIExportDataBlob.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIExportDataBlob.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nsize
public static long nsize(long struct)
Unsafe version ofsize()
.
-
ndata
public static java.nio.ByteBuffer ndata(long struct)
Unsafe version ofdata
.
-
nnext
@Nullable public static AIExportDataBlob nnext(long struct)
Unsafe version ofnext()
.
-
nsize
public static void nsize(long struct, long value)
Sets the specified value to thesize
field of the specifiedstruct
.
-
ndata
public static void ndata(long struct, java.nio.ByteBuffer value)
Unsafe version ofdata
.
-
nnext
public static void nnext(long struct, @Nullable AIExportDataBlob value)
Unsafe version ofnext
.
-
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
-
-