public class AIExportDataBlob
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
ExportSceneToBlob 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 for aiExportDataBlob::name for more information.
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.
struct aiExportDataBlob {
size_t size;
void * data;
struct aiString name;
struct aiExportDataBlob * next;
}| Modifier and Type | Class and Description |
|---|---|
static class |
AIExportDataBlob.Buffer
An array of
AIExportDataBlob structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
DATA
The struct member offsets.
|
static int |
NAME
The struct member offsets.
|
static int |
NEXT
The struct member offsets.
|
static int |
SIZE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
AIExportDataBlob(java.nio.ByteBuffer container)
Creates a
AIExportDataBlob instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static AIExportDataBlob |
calloc()
Returns a new
AIExportDataBlob instance allocated with memCalloc. |
static AIExportDataBlob.Buffer |
calloc(int capacity)
Returns a new
AIExportDataBlob.Buffer instance allocated with memCalloc. |
static AIExportDataBlob |
callocStack()
Returns a new
AIExportDataBlob instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static AIExportDataBlob.Buffer |
callocStack(int capacity)
Returns a new
AIExportDataBlob.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static AIExportDataBlob.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
AIExportDataBlob.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static AIExportDataBlob |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
AIExportDataBlob instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static AIExportDataBlob |
create()
Returns a new
AIExportDataBlob instance allocated with BufferUtils. |
static AIExportDataBlob.Buffer |
create(int capacity)
Returns a new
AIExportDataBlob.Buffer instance allocated with BufferUtils. |
static AIExportDataBlob |
create(long address)
Returns a new
AIExportDataBlob instance for the specified memory address. |
static AIExportDataBlob.Buffer |
create(long address,
int capacity)
Create a
AIExportDataBlob.Buffer instance at the specified memory. |
static AIExportDataBlob |
createSafe(long address)
|
static AIExportDataBlob.Buffer |
createSafe(long address,
int capacity)
|
java.nio.ByteBuffer |
data()
Returns a
ByteBuffer view of the data pointed to by the data field. |
AIExportDataBlob |
data(java.nio.ByteBuffer value)
Sets the address of the specified
ByteBuffer to the data field. |
static AIExportDataBlob |
malloc()
Returns a new
AIExportDataBlob instance allocated with memAlloc. |
static AIExportDataBlob.Buffer |
malloc(int capacity)
Returns a new
AIExportDataBlob.Buffer instance allocated with memAlloc. |
static AIExportDataBlob |
mallocStack()
Returns a new
AIExportDataBlob instance allocated on the thread-local MemoryStack. |
static AIExportDataBlob.Buffer |
mallocStack(int capacity)
Returns a new
AIExportDataBlob.Buffer instance allocated on the thread-local MemoryStack. |
static AIExportDataBlob.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
AIExportDataBlob.Buffer instance allocated on the specified MemoryStack. |
static AIExportDataBlob |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
AIExportDataBlob instance allocated on the specified MemoryStack. |
AIString |
name()
Returns a
AIString view of the name field. |
AIExportDataBlob |
name(AIString value)
Copies the specified
AIString to the name field. |
AIExportDataBlob |
name(java.util.function.Consumer<AIString> consumer)
Passes the
name field to the specified Consumer. |
static java.nio.ByteBuffer |
ndata(long struct)
Unsafe version of
data. |
static void |
ndata(long struct,
java.nio.ByteBuffer value)
Unsafe version of
data. |
AIExportDataBlob |
next()
Returns a
AIExportDataBlob view of the struct pointed to by the next field. |
AIExportDataBlob |
next(AIExportDataBlob value)
Sets the address of the specified
AIExportDataBlob to the next field. |
static AIString |
nname(long struct)
Unsafe version of
name(). |
static void |
nname(long struct,
AIString value)
Unsafe version of
name. |
static AIExportDataBlob |
nnext(long struct)
Unsafe version of
next(). |
static void |
nnext(long struct,
AIExportDataBlob value)
Unsafe version of
next. |
static long |
nsize(long struct)
Unsafe version of
size(). |
static void |
nsize(long struct,
long value)
Sets the specified value to the
size field of the specified struct. |
AIExportDataBlob |
set(AIExportDataBlob src)
Copies the specified struct data to this struct.
|
AIExportDataBlob |
set(java.nio.ByteBuffer data,
AIString name,
AIExportDataBlob next)
Initializes this struct with the specified values.
|
long |
size()
Returns the value of the
size field. |
int |
sizeof() |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int SIZE
public static final int DATA
public static final int NAME
public static final int NEXT
public AIExportDataBlob(java.nio.ByteBuffer container)
AIExportDataBlob 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic long size()
size field.public java.nio.ByteBuffer data()
ByteBuffer view of the data pointed to by the data field.@Nullable public AIExportDataBlob next()
AIExportDataBlob view of the struct pointed to by the next field.public AIExportDataBlob data(java.nio.ByteBuffer value)
ByteBuffer to the data field.public AIExportDataBlob name(AIString value)
AIString to the name field.public AIExportDataBlob name(java.util.function.Consumer<AIString> consumer)
name field to the specified Consumer.public AIExportDataBlob next(@Nullable AIExportDataBlob value)
AIExportDataBlob to the next field.public AIExportDataBlob set(java.nio.ByteBuffer data, AIString name, @Nullable AIExportDataBlob next)
public AIExportDataBlob set(AIExportDataBlob src)
src - the source structpublic static AIExportDataBlob malloc()
AIExportDataBlob instance allocated with memAlloc. The instance must be explicitly freed.public static AIExportDataBlob calloc()
AIExportDataBlob instance allocated with memCalloc. The instance must be explicitly freed.public static AIExportDataBlob create()
AIExportDataBlob instance allocated with BufferUtils.public static AIExportDataBlob create(long address)
AIExportDataBlob instance for the specified memory address.@Nullable public static AIExportDataBlob createSafe(long address)
public static AIExportDataBlob.Buffer malloc(int capacity)
AIExportDataBlob.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static AIExportDataBlob.Buffer calloc(int capacity)
AIExportDataBlob.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static AIExportDataBlob.Buffer create(int capacity)
AIExportDataBlob.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static AIExportDataBlob.Buffer create(long address, int capacity)
AIExportDataBlob.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static AIExportDataBlob.Buffer createSafe(long address, int capacity)
public static AIExportDataBlob mallocStack()
AIExportDataBlob instance allocated on the thread-local MemoryStack.public static AIExportDataBlob callocStack()
AIExportDataBlob instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static AIExportDataBlob mallocStack(org.lwjgl.system.MemoryStack stack)
AIExportDataBlob instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static AIExportDataBlob callocStack(org.lwjgl.system.MemoryStack stack)
AIExportDataBlob instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static AIExportDataBlob.Buffer mallocStack(int capacity)
AIExportDataBlob.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static AIExportDataBlob.Buffer callocStack(int capacity)
AIExportDataBlob.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static AIExportDataBlob.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
AIExportDataBlob.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static AIExportDataBlob.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
AIExportDataBlob.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static long nsize(long struct)
size().public static java.nio.ByteBuffer ndata(long struct)
data.@Nullable public static AIExportDataBlob nnext(long struct)
next().public static void nsize(long struct,
long value)
size field of the specified struct.public static void ndata(long struct,
java.nio.ByteBuffer value)
data.public static void nnext(long struct,
@Nullable
AIExportDataBlob value)
next.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.