Package org.lwjgl.assimp
Class AIFile
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.assimp.AIFile
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class AIFile extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceActually, it's a data structure to wrap a set of fXXXX (e.g fopen) replacement functions.The default implementation of the functions utilizes the fXXX functions from the CRT. However, you can supply a custom implementation to Assimp by delivering a custom
AIFileIO. Use this to enable reading from other sources, such as ZIP archives or memory locations.Member documentation
ReadProc– Callback to read from a fileWriteProc– Callback to write to a fileTellProc– Callback to retrieve the current position of the file cursor (ftell())FileSizeProc– Callback to retrieve the size of the file, in bytesSeekProc– Callback to set the current position of the file cursor (fseek())FlushProc– Callback to flush the file contentsUserData– User-defined, opaque data
Layout
struct aiFile {aiFileReadProcReadProc;aiFileWriteProcWriteProc;aiFileTellProcTellProc;aiFileTellProcFileSizeProc;aiFileSeekSeekProc;aiFileFlushProcFlushProc; aiUserData UserData; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAIFile.BufferAn array ofAIFilestructs.
-
Constructor Summary
Constructors Constructor Description AIFile(java.nio.ByteBuffer container)Creates aAIFileinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AIFilecalloc()Returns a newAIFileinstance allocated withmemCalloc.static AIFile.Buffercalloc(int capacity)Returns a newAIFile.Bufferinstance allocated withmemCalloc.static AIFilecallocStack()Returns a newAIFileinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static AIFile.BuffercallocStack(int capacity)Returns a newAIFile.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static AIFile.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIFile.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIFilecallocStack(org.lwjgl.system.MemoryStack stack)Returns a newAIFileinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIFilecreate()Returns a newAIFileinstance allocated withBufferUtils.static AIFile.Buffercreate(int capacity)Returns a newAIFile.Bufferinstance allocated withBufferUtils.static AIFilecreate(long address)Returns a newAIFileinstance for the specified memory address.static AIFile.Buffercreate(long address, int capacity)Create aAIFile.Bufferinstance at the specified memory.static AIFilecreateSafe(long address)static AIFile.BuffercreateSafe(long address, int capacity)AIFileTellProcFileSizeProc()Returns the value of theFileSizeProcfield.AIFileFileSizeProc(AIFileTellProcI value)Sets the specified value to theFileSizeProcfield.AIFileFlushProcFlushProc()Returns the value of theFlushProcfield.AIFileFlushProc(AIFileFlushProcI value)Sets the specified value to theFlushProcfield.static AIFilemalloc()Returns a newAIFileinstance allocated withmemAlloc.static AIFile.Buffermalloc(int capacity)Returns a newAIFile.Bufferinstance allocated withmemAlloc.static AIFilemallocStack()Returns a newAIFileinstance allocated on the thread-localMemoryStack.static AIFile.BuffermallocStack(int capacity)Returns a newAIFile.Bufferinstance allocated on the thread-localMemoryStack.static AIFile.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIFile.Bufferinstance allocated on the specifiedMemoryStack.static AIFilemallocStack(org.lwjgl.system.MemoryStack stack)Returns a newAIFileinstance allocated on the specifiedMemoryStack.static AIFileTellProcnFileSizeProc(long struct)Unsafe version ofFileSizeProc().static voidnFileSizeProc(long struct, AIFileTellProcI value)Unsafe version ofFileSizeProc.static AIFileFlushProcnFlushProc(long struct)Unsafe version ofFlushProc().static voidnFlushProc(long struct, AIFileFlushProcI value)Unsafe version ofFlushProc.static AIFileReadProcnReadProc(long struct)Unsafe version ofReadProc().static voidnReadProc(long struct, AIFileReadProcI value)Unsafe version ofReadProc.static AIFileSeeknSeekProc(long struct)Unsafe version ofSeekProc().static voidnSeekProc(long struct, AIFileSeekI value)Unsafe version ofSeekProc.static AIFileTellProcnTellProc(long struct)Unsafe version ofTellProc().static voidnTellProc(long struct, AIFileTellProcI value)Unsafe version ofTellProc.static longnUserData(long struct)Unsafe version ofUserData().static voidnUserData(long struct, long value)Unsafe version ofUserData.static AIFileWriteProcnWriteProc(long struct)Unsafe version ofWriteProc().static voidnWriteProc(long struct, AIFileWriteProcI value)Unsafe version ofWriteProc.AIFileReadProcReadProc()Returns the value of theReadProcfield.AIFileReadProc(AIFileReadProcI value)Sets the specified value to theReadProcfield.AIFileSeekSeekProc()Returns the value of theSeekProcfield.AIFileSeekProc(AIFileSeekI value)Sets the specified value to theSeekProcfield.AIFileset(AIFile src)Copies the specified struct data to this struct.AIFileset(AIFileReadProcI ReadProc, AIFileWriteProcI WriteProc, AIFileTellProcI TellProc, AIFileTellProcI FileSizeProc, AIFileSeekI SeekProc, AIFileFlushProcI FlushProc, long UserData)Initializes this struct with the specified values.intsizeof()AIFileTellProcTellProc()Returns the value of theTellProcfield.AIFileTellProc(AIFileTellProcI value)Sets the specified value to theTellProcfield.longUserData()Returns the value of theUserDatafield.AIFileUserData(long value)Sets the specified value to theUserDatafield.static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.AIFileWriteProcWriteProc()Returns the value of theWriteProcfield.AIFileWriteProc(AIFileWriteProcI value)Sets the specified value to theWriteProcfield.
-
-
-
Constructor Detail
-
AIFile
public AIFile(java.nio.ByteBuffer container)
Creates aAIFileinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
ReadProc
public AIFileReadProc ReadProc()
Returns the value of theReadProcfield.
-
WriteProc
public AIFileWriteProc WriteProc()
Returns the value of theWriteProcfield.
-
TellProc
public AIFileTellProc TellProc()
Returns the value of theTellProcfield.
-
FileSizeProc
public AIFileTellProc FileSizeProc()
Returns the value of theFileSizeProcfield.
-
SeekProc
public AIFileSeek SeekProc()
Returns the value of theSeekProcfield.
-
FlushProc
public AIFileFlushProc FlushProc()
Returns the value of theFlushProcfield.
-
UserData
public long UserData()
Returns the value of theUserDatafield.
-
ReadProc
public AIFile ReadProc(AIFileReadProcI value)
Sets the specified value to theReadProcfield.
-
WriteProc
public AIFile WriteProc(AIFileWriteProcI value)
Sets the specified value to theWriteProcfield.
-
TellProc
public AIFile TellProc(AIFileTellProcI value)
Sets the specified value to theTellProcfield.
-
FileSizeProc
public AIFile FileSizeProc(AIFileTellProcI value)
Sets the specified value to theFileSizeProcfield.
-
SeekProc
public AIFile SeekProc(AIFileSeekI value)
Sets the specified value to theSeekProcfield.
-
FlushProc
public AIFile FlushProc(AIFileFlushProcI value)
Sets the specified value to theFlushProcfield.
-
UserData
public AIFile UserData(long value)
Sets the specified value to theUserDatafield.
-
set
public AIFile set(AIFileReadProcI ReadProc, AIFileWriteProcI WriteProc, AIFileTellProcI TellProc, AIFileTellProcI FileSizeProc, AIFileSeekI SeekProc, AIFileFlushProcI FlushProc, long UserData)
Initializes this struct with the specified values.
-
set
public AIFile set(AIFile src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static AIFile malloc()
Returns a newAIFileinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static AIFile calloc()
Returns a newAIFileinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static AIFile create()
Returns a newAIFileinstance allocated withBufferUtils.
-
create
public static AIFile create(long address)
Returns a newAIFileinstance for the specified memory address.
-
createSafe
@Nullable public static AIFile createSafe(long address)
-
malloc
public static AIFile.Buffer malloc(int capacity)
Returns a newAIFile.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static AIFile.Buffer calloc(int capacity)
Returns a newAIFile.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static AIFile.Buffer create(int capacity)
Returns a newAIFile.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static AIFile.Buffer create(long address, int capacity)
Create aAIFile.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static AIFile.Buffer createSafe(long address, int capacity)
-
mallocStack
public static AIFile mallocStack()
Returns a newAIFileinstance allocated on the thread-localMemoryStack.
-
callocStack
public static AIFile callocStack()
Returns a newAIFileinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static AIFile mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIFileinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static AIFile callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIFileinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static AIFile.Buffer mallocStack(int capacity)
Returns a newAIFile.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static AIFile.Buffer callocStack(int capacity)
Returns a newAIFile.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static AIFile.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIFile.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static AIFile.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIFile.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nReadProc
public static AIFileReadProc nReadProc(long struct)
Unsafe version ofReadProc().
-
nWriteProc
public static AIFileWriteProc nWriteProc(long struct)
Unsafe version ofWriteProc().
-
nTellProc
public static AIFileTellProc nTellProc(long struct)
Unsafe version ofTellProc().
-
nFileSizeProc
public static AIFileTellProc nFileSizeProc(long struct)
Unsafe version ofFileSizeProc().
-
nSeekProc
public static AIFileSeek nSeekProc(long struct)
Unsafe version ofSeekProc().
-
nFlushProc
public static AIFileFlushProc nFlushProc(long struct)
Unsafe version ofFlushProc().
-
nUserData
public static long nUserData(long struct)
Unsafe version ofUserData().
-
nReadProc
public static void nReadProc(long struct, AIFileReadProcI value)Unsafe version ofReadProc.
-
nWriteProc
public static void nWriteProc(long struct, AIFileWriteProcI value)Unsafe version ofWriteProc.
-
nTellProc
public static void nTellProc(long struct, AIFileTellProcI value)Unsafe version ofTellProc.
-
nFileSizeProc
public static void nFileSizeProc(long struct, AIFileTellProcI value)Unsafe version ofFileSizeProc.
-
nSeekProc
public static void nSeekProc(long struct, AIFileSeekI value)Unsafe version ofSeekProc.
-
nFlushProc
public static void nFlushProc(long struct, AIFileFlushProcI value)Unsafe version ofFlushProc.
-
nUserData
public static void nUserData(long struct, long value)Unsafe version ofUserData.
-
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
-
-