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.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 {
aiFileReadProc
ReadProc;aiFileWriteProc
WriteProc;aiFileTellProc
TellProc;aiFileTellProc
FileSizeProc;aiFileSeek
SeekProc;aiFileFlushProc
FlushProc; aiUserData UserData; }
-
-
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 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
callocStack()
Returns a newAIFile
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIFile.Buffer
callocStack(int capacity)
Returns a newAIFile.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIFile.Buffer
callocStack(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
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIFile
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.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()
Returns the value of theFileSizeProc
field.AIFile
FileSizeProc(AIFileTellProcI value)
Sets the specified value to theFileSizeProc
field.AIFileFlushProc
FlushProc()
Returns the value of theFlushProc
field.AIFile
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
mallocStack()
Returns a newAIFile
instance allocated on the thread-localMemoryStack
.static AIFile.Buffer
mallocStack(int capacity)
Returns a newAIFile.Buffer
instance allocated on the thread-localMemoryStack
.static AIFile.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIFile.Buffer
instance allocated on the specifiedMemoryStack
.static AIFile
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIFile
instance allocated on the specifiedMemoryStack
.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()
Returns the value of theReadProc
field.AIFile
ReadProc(AIFileReadProcI value)
Sets the specified value to theReadProc
field.AIFileSeek
SeekProc()
Returns the value of theSeekProc
field.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()
Returns the value of theTellProc
field.AIFile
TellProc(AIFileTellProcI value)
Sets the specified value to theTellProc
field.long
UserData()
Returns the value of theUserData
field.AIFile
UserData(long value)
Sets the specified value to theUserData
field.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.AIFileWriteProc
WriteProc()
Returns the value of theWriteProc
field.AIFile
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()
Returns the value of theReadProc
field.
-
WriteProc
public AIFileWriteProc WriteProc()
Returns the value of theWriteProc
field.
-
TellProc
public AIFileTellProc TellProc()
Returns the value of theTellProc
field.
-
FileSizeProc
public AIFileTellProc FileSizeProc()
Returns the value of theFileSizeProc
field.
-
SeekProc
public AIFileSeek SeekProc()
Returns the value of theSeekProc
field.
-
FlushProc
public AIFileFlushProc FlushProc()
Returns the value of theFlushProc
field.
-
UserData
public long UserData()
Returns the value of theUserData
field.
-
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
public static AIFile mallocStack()
Returns a newAIFile
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static AIFile callocStack()
Returns a newAIFile
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static AIFile mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIFile
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static AIFile callocStack(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
-
mallocStack
public static AIFile.Buffer mallocStack(int capacity)
Returns a newAIFile.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static AIFile.Buffer callocStack(int capacity)
Returns a newAIFile.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.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
-
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
-
-