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.NativeResource
Actually, 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 {
aiFileReadProc
ReadProc()
;aiFileWriteProc
WriteProc()
;aiFileTellProc
TellProc()
;aiFileTellProc
FileSizeProc()
;aiFileSeek
SeekProc()
;aiFileFlushProc
FlushProc()
; aiUserDataUserData()
; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AIFile.Buffer
An array ofAIFile
structs.
-
Constructor Summary
Constructors Constructor Description AIFile(java.nio.ByteBuffer container)
Creates aAIFile
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AIFile
calloc()
Returns a newAIFile
instance allocated withmemCalloc
.static AIFile.Buffer
calloc(int capacity)
Returns a newAIFile.Buffer
instance allocated withmemCalloc
.static AIFile.Buffer
calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIFile.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIFile
calloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIFile
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIFile
callocStack()
Deprecated.static AIFile.Buffer
callocStack(int capacity)
Deprecated.static AIFile.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AIFile
callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.static AIFile
create()
Returns a newAIFile
instance allocated withBufferUtils
.static AIFile.Buffer
create(int capacity)
Returns a newAIFile.Buffer
instance allocated withBufferUtils
.static AIFile
create(long address)
Returns a newAIFile
instance for the specified memory address.static AIFile.Buffer
create(long address, int capacity)
Create aAIFile.Buffer
instance at the specified memory.static AIFile
createSafe(long address)
static AIFile.Buffer
createSafe(long address, int capacity)
AIFileTellProc
FileSizeProc()
Callback to retrieve the size of the file, in bytesAIFile
FileSizeProc(AIFileTellProcI value)
Sets the specified value to theFileSizeProc()
field.AIFileFlushProc
FlushProc()
Callback to flush the file contentsAIFile
FlushProc(AIFileFlushProcI value)
Sets the specified value to theFlushProc()
field.static AIFile
malloc()
Returns a newAIFile
instance allocated withmemAlloc
.static AIFile.Buffer
malloc(int capacity)
Returns a newAIFile.Buffer
instance allocated withmemAlloc
.static AIFile.Buffer
malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIFile.Buffer
instance allocated on the specifiedMemoryStack
.static AIFile
malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIFile
instance allocated on the specifiedMemoryStack
.static AIFile
mallocStack()
Deprecated.static AIFile.Buffer
mallocStack(int capacity)
Deprecated.static AIFile.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AIFile
mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.static AIFileTellProc
nFileSizeProc(long struct)
Unsafe version ofFileSizeProc()
.static void
nFileSizeProc(long struct, AIFileTellProcI value)
Unsafe version ofFileSizeProc
.static AIFileFlushProc
nFlushProc(long struct)
Unsafe version ofFlushProc()
.static void
nFlushProc(long struct, AIFileFlushProcI value)
Unsafe version ofFlushProc
.static AIFileReadProc
nReadProc(long struct)
Unsafe version ofReadProc()
.static void
nReadProc(long struct, AIFileReadProcI value)
Unsafe version ofReadProc
.static AIFileSeek
nSeekProc(long struct)
Unsafe version ofSeekProc()
.static void
nSeekProc(long struct, AIFileSeekI value)
Unsafe version ofSeekProc
.static AIFileTellProc
nTellProc(long struct)
Unsafe version ofTellProc()
.static void
nTellProc(long struct, AIFileTellProcI value)
Unsafe version ofTellProc
.static long
nUserData(long struct)
Unsafe version ofUserData()
.static void
nUserData(long struct, long value)
Unsafe version ofUserData
.static AIFileWriteProc
nWriteProc(long struct)
Unsafe version ofWriteProc()
.static void
nWriteProc(long struct, AIFileWriteProcI value)
Unsafe version ofWriteProc
.AIFileReadProc
ReadProc()
Callback to read from a fileAIFile
ReadProc(AIFileReadProcI value)
Sets the specified value to theReadProc()
field.AIFileSeek
SeekProc()
Callback to set the current position of the file cursor (fseek())AIFile
SeekProc(AIFileSeekI value)
Sets the specified value to theSeekProc()
field.AIFile
set(AIFile src)
Copies the specified struct data to this struct.AIFile
set(AIFileReadProcI ReadProc, AIFileWriteProcI WriteProc, AIFileTellProcI TellProc, AIFileTellProcI FileSizeProc, AIFileSeekI SeekProc, AIFileFlushProcI FlushProc, long UserData)
Initializes this struct with the specified values.int
sizeof()
AIFileTellProc
TellProc()
Callback to retrieve the current position of the file cursor (ftell())AIFile
TellProc(AIFileTellProcI value)
Sets the specified value to theTellProc()
field.long
UserData()
User-defined, opaque dataAIFile
UserData(long value)
Sets the specified value to theUserData()
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.AIFileWriteProc
WriteProc()
Callback to write to a fileAIFile
WriteProc(AIFileWriteProcI value)
Sets the specified value to theWriteProc()
field.
-
-
-
Constructor Detail
-
AIFile
public AIFile(java.nio.ByteBuffer container)
Creates aAIFile
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
-
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 newAIFile
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static AIFile calloc()
Returns a newAIFile
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static AIFile create()
Returns a newAIFile
instance allocated withBufferUtils
.
-
create
public static AIFile create(long address)
Returns a newAIFile
instance for the specified memory address.
-
createSafe
@Nullable public static AIFile createSafe(long address)
-
malloc
public static AIFile.Buffer malloc(int capacity)
Returns a newAIFile.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static AIFile.Buffer calloc(int capacity)
Returns a newAIFile.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static AIFile.Buffer create(int capacity)
Returns a newAIFile.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static AIFile.Buffer create(long address, int capacity)
Create aAIFile.Buffer
instance 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 newAIFile
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static AIFile calloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIFile
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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
-
-