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.Layout
struct aiFile {aiFileReadProcReadProc();aiFileWriteProcWriteProc();aiFileTellProcTellProc();aiFileTellProcFileSizeProc();aiFileSeekSeekProc();aiFileFlushProcFlushProc(); aiUserDataUserData(); }
-
-
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 Deprecated 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 AIFile.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIFile.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIFilecalloc(org.lwjgl.system.MemoryStack stack)Returns a newAIFileinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIFilecallocStack()Deprecated.static AIFile.BuffercallocStack(int capacity)Deprecated.static AIFile.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static AIFilecallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()Callback to retrieve the size of the file, in bytesAIFileFileSizeProc(AIFileTellProcI value)Sets the specified value to theFileSizeProc()field.AIFileFlushProcFlushProc()Callback to flush the file contentsAIFileFlushProc(AIFileFlushProcI value)Sets the specified value to theFlushProc()field.static AIFilemalloc()Returns a newAIFileinstance allocated withmemAlloc.static AIFile.Buffermalloc(int capacity)Returns a newAIFile.Bufferinstance allocated withmemAlloc.static AIFile.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIFile.Bufferinstance allocated on the specifiedMemoryStack.static AIFilemalloc(org.lwjgl.system.MemoryStack stack)Returns a newAIFileinstance allocated on the specifiedMemoryStack.static AIFilemallocStack()Deprecated.static AIFile.BuffermallocStack(int capacity)Deprecated.static AIFile.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static AIFilemallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()Callback to read from a fileAIFileReadProc(AIFileReadProcI value)Sets the specified value to theReadProc()field.AIFileSeekSeekProc()Callback to set the current position of the file cursor (fseek())AIFileSeekProc(AIFileSeekI value)Sets the specified value to theSeekProc()field.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()Callback to retrieve the current position of the file cursor (ftell())AIFileTellProc(AIFileTellProcI value)Sets the specified value to theTellProc()field.longUserData()User-defined, opaque dataAIFileUserData(long value)Sets the specified value to theUserData()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.AIFileWriteProcWriteProc()Callback to write to a fileAIFileWriteProc(AIFileWriteProcI value)Sets the specified value to theWriteProc()field.
-
-
-
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()
Callback to read from a file
-
WriteProc
public AIFileWriteProc WriteProc()
Callback to write to a file
-
TellProc
public AIFileTellProc TellProc()
Callback to retrieve the current position of the file cursor (ftell())
-
FileSizeProc
public AIFileTellProc FileSizeProc()
Callback to retrieve the size of the file, in bytes
-
SeekProc
public AIFileSeek SeekProc()
Callback to set the current position of the file cursor (fseek())
-
FlushProc
public AIFileFlushProc FlushProc()
Callback to flush the file contents
-
UserData
public long UserData()
User-defined, opaque data
-
ReadProc
public AIFile ReadProc(AIFileReadProcI value)
Sets the specified value to theReadProc()field.
-
WriteProc
public AIFile WriteProc(AIFileWriteProcI value)
Sets the specified value to theWriteProc()field.
-
TellProc
public AIFile TellProc(AIFileTellProcI value)
Sets the specified value to theTellProc()field.
-
FileSizeProc
public AIFile FileSizeProc(AIFileTellProcI value)
Sets the specified value to theFileSizeProc()field.
-
SeekProc
public AIFile SeekProc(AIFileSeekI value)
Sets the specified value to theSeekProc()field.
-
FlushProc
public AIFile FlushProc(AIFileFlushProcI value)
Sets the specified value to theFlushProc()field.
-
UserData
public AIFile UserData(long value)
Sets the specified value to theUserData()field.
-
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
@Deprecated public static AIFile mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static AIFile callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static AIFile mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static AIFile callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static AIFile.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static AIFile.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static AIFile.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static AIFile.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static AIFile malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIFileinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static AIFile calloc(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
-
malloc
public static AIFile.Buffer malloc(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
-
calloc
public static AIFile.Buffer calloc(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
-
-