Class AINode
- All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer
struct aiNode {
struct aiString mName;
struct aiMatrix4x4 mTransformation;
struct aiNode * mParent;
unsigned int mNumChildren;
struct aiNode ** mChildren;
unsigned int mNumMeshes;
unsigned int * mMeshes;
struct aiMetadata * mMetadata;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Struct
Struct.StructValidationNested classes/interfaces inherited from interface Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionAINode(ByteBuffer container) Creates aAINodeinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic AINodecalloc()Returns a newAINodeinstance allocated withmemCalloc.static AINode.Buffercalloc(int capacity) Returns a newAINode.Bufferinstance allocated withmemCalloc.static AINode.Buffercalloc(int capacity, MemoryStack stack) Returns a newAINode.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AINodecalloc(MemoryStack stack) Returns a newAINodeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AINodecreate()Returns a newAINodeinstance allocated withBufferUtils.static AINode.Buffercreate(int capacity) Returns a newAINode.Bufferinstance allocated withBufferUtils.static AINodecreate(long address) Returns a newAINodeinstance for the specified memory address.static AINode.Buffercreate(long address, int capacity) Create aAINode.Bufferinstance at the specified memory.static @Nullable AINodecreateSafe(long address) static @Nullable AINode.BuffercreateSafe(long address, int capacity) static AINodemalloc()Returns a newAINodeinstance allocated withmemAlloc.static AINode.Buffermalloc(int capacity) Returns a newAINode.Bufferinstance allocated withmemAlloc.static AINode.Buffermalloc(int capacity, MemoryStack stack) Returns a newAINode.Bufferinstance allocated on the specifiedMemoryStack.static AINodemalloc(MemoryStack stack) Returns a newAINodeinstance allocated on the specifiedMemoryStack.@Nullable PointerBuffermChildren(@Nullable PointerBuffer value) Sets the address of the specifiedPointerBufferto themChildrenfield.@Nullable IntBuffermMeshes()Sets the address of the specifiedIntBufferto themMeshesfield.@Nullable AIMetaDatamMetadata(@Nullable AIMetaData value) Sets the address of the specifiedAIMetaDatato themMetadatafield.mName()Passes themNamefield to the specifiedConsumer.Copies the specifiedAIStringto themNamefield.intint@Nullable AINodemParent()Sets the address of the specifiedAINodeto themParentfield.mTransformation(Consumer<AIMatrix4x4> consumer) Passes themTransformationfield to the specifiedConsumer.mTransformation(AIMatrix4x4 value) Copies the specifiedAIMatrix4x4to themTransformationfield.static @Nullable PointerBuffernmChildren(long struct) Unsafe version ofmChildren.static voidnmChildren(long struct, @Nullable PointerBuffer value) Unsafe version ofmChildren.static @Nullable IntBuffernmMeshes(long struct) Unsafe version ofmMeshes.static voidUnsafe version ofmMeshes.static @Nullable AIMetaDatanmMetadata(long struct) Unsafe version ofmMetadata().static voidnmMetadata(long struct, @Nullable AIMetaData value) Unsafe version ofmMetadata.static AIStringnmName(long struct) Unsafe version ofmName().static voidUnsafe version ofmName.static intnmNumChildren(long struct) Unsafe version ofmNumChildren().static voidnmNumChildren(long struct, int value) Sets the specified value to themNumChildrenfield of the specifiedstruct.static intnmNumMeshes(long struct) Unsafe version ofmNumMeshes().static voidnmNumMeshes(long struct, int value) Sets the specified value to themNumMeshesfield of the specifiedstruct.static @Nullable AINodenmParent(long struct) Unsafe version ofmParent().static voidUnsafe version ofmParent.static AIMatrix4x4nmTransformation(long struct) Unsafe version ofmTransformation().static voidnmTransformation(long struct, AIMatrix4x4 value) Unsafe version ofmTransformation.Copies the specified struct data to this struct.set(AIString mName, AIMatrix4x4 mTransformation, @Nullable AINode mParent, @Nullable PointerBuffer mChildren, @Nullable IntBuffer mMeshes, @Nullable AIMetaData mMetadata) Initializes this struct with the specified values.intsizeof()Returnssizeof(struct).static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
MNAME
public static final int MNAMEThe struct member offsets. -
MTRANSFORMATION
public static final int MTRANSFORMATIONThe struct member offsets. -
MPARENT
public static final int MPARENTThe struct member offsets. -
MNUMCHILDREN
public static final int MNUMCHILDRENThe struct member offsets. -
MCHILDREN
public static final int MCHILDRENThe struct member offsets. -
MNUMMESHES
public static final int MNUMMESHESThe struct member offsets. -
MMESHES
public static final int MMESHESThe struct member offsets. -
MMETADATA
public static final int MMETADATAThe struct member offsets.
-
-
Constructor Details
-
AINode
Creates aAINodeinstance 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 Details
-
sizeof
-
mName
- Returns:
- a
AIStringview of themNamefield.
-
mTransformation
- Returns:
- a
AIMatrix4x4view of themTransformationfield.
-
mParent
- Returns:
- a
AINodeview of the struct pointed to by themParentfield.
-
mNumChildren
- Returns:
- the value of the
mNumChildrenfield.
-
mChildren
- Returns:
- a
PointerBufferview of the data pointed to by themChildrenfield.
-
mNumMeshes
- Returns:
- the value of the
mNumMeshesfield.
-
mMeshes
- Returns:
- a
IntBufferview of the data pointed to by themMeshesfield.
-
mMetadata
- Returns:
- a
AIMetaDataview of the struct pointed to by themMetadatafield.
-
mName
Copies the specifiedAIStringto themNamefield. -
mName
-
mTransformation
Copies the specifiedAIMatrix4x4to themTransformationfield. -
mTransformation
Passes themTransformationfield to the specifiedConsumer. -
mParent
Sets the address of the specifiedAINodeto themParentfield. -
mChildren
Sets the address of the specifiedPointerBufferto themChildrenfield. -
mMeshes
Sets the address of the specifiedIntBufferto themMeshesfield. -
mMetadata
Sets the address of the specifiedAIMetaDatato themMetadatafield. -
set
public AINode set(AIString mName, AIMatrix4x4 mTransformation, @Nullable AINode mParent, @Nullable PointerBuffer mChildren, @Nullable IntBuffer mMeshes, @Nullable AIMetaData mMetadata) Initializes this struct with the specified values. -
set
-
malloc
-
calloc
-
create
Returns a newAINodeinstance allocated withBufferUtils. -
create
Returns a newAINodeinstance for the specified memory address. -
createSafe
-
malloc
Returns a newAINode.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newAINode.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newAINode.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aAINode.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newAINodeinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newAINodeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newAINode.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newAINode.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nmName
-
nmTransformation
Unsafe version ofmTransformation(). -
nmParent
-
nmNumChildren
public static int nmNumChildren(long struct) Unsafe version ofmNumChildren(). -
nmChildren
Unsafe version ofmChildren. -
nmNumMeshes
public static int nmNumMeshes(long struct) Unsafe version ofmNumMeshes(). -
nmMeshes
-
nmMetadata
Unsafe version ofmMetadata(). -
nmName
-
nmTransformation
Unsafe version ofmTransformation. -
nmParent
-
nmNumChildren
public static void nmNumChildren(long struct, int value) Sets the specified value to themNumChildrenfield of the specifiedstruct. -
nmChildren
Unsafe version ofmChildren. -
nmNumMeshes
public static void nmNumMeshes(long struct, int value) Sets the specified value to themNumMeshesfield of the specifiedstruct. -
nmMeshes
-
nmMetadata
Unsafe version ofmMetadata. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-