Package org.lwjgl.assimp
Class AINode
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.assimp.AINode
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
public class AINode extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
A node in the imported hierarchy.Each node has name, a parent node (except for the root node), a transformation relative to its parent and possibly several child nodes. Simple file formats don't support hierarchical structures - for these formats the imported scene does consist of only a single root node without children.
Member documentation
mName
– The name of the node.mTransformation
– The transformation relative to the node's parent.mParent
– Parent node.NULL
if this node is the root node.mNumChildren
– The number of child nodes of this node.mChildren
– The child nodes of this node.NULL
ifmNumChildren
is 0.mNumMeshes
– The number of meshes of this node.mMeshes
– The meshes of this node. Each entry is an index into the mesh list of the aiScene.mMetadata
– Metadata associated with this node orNULL
if there is no metadata.
Layout
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 Classes Modifier and Type Class and Description static class
AINode.Buffer
An array ofAINode
structs.
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static AINode
calloc()
Returns a newAINode
instance allocated withmemCalloc
.static AINode.Buffer
calloc(int capacity)
Returns a newAINode.Buffer
instance allocated withmemCalloc
.static AINode
callocStack()
Returns a newAINode
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AINode.Buffer
callocStack(int capacity)
Returns a newAINode.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AINode.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAINode.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AINode
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAINode
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AINode
create()
Returns a newAINode
instance allocated withBufferUtils
.static AINode.Buffer
create(int capacity)
Returns a newAINode.Buffer
instance allocated withBufferUtils
.static AINode
create(long address)
Returns a newAINode
instance for the specified memory address.static AINode.Buffer
create(long address, int capacity)
Create aAINode.Buffer
instance at the specified memory.static AINode
createSafe(long address)
static AINode.Buffer
createSafe(long address, int capacity)
static AINode
malloc()
Returns a newAINode
instance allocated withmemAlloc
.static AINode.Buffer
malloc(int capacity)
Returns a newAINode.Buffer
instance allocated withmemAlloc
.static AINode
mallocStack()
Returns a newAINode
instance allocated on the thread-localMemoryStack
.static AINode.Buffer
mallocStack(int capacity)
Returns a newAINode.Buffer
instance allocated on the thread-localMemoryStack
.static AINode.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAINode.Buffer
instance allocated on the specifiedMemoryStack
.static AINode
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAINode
instance allocated on the specifiedMemoryStack
.org.lwjgl.PointerBuffer
mChildren()
Returns aPointerBuffer
view of the data pointed to by themChildren
field.AINode
mChildren(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themChildren
field.java.nio.IntBuffer
mMeshes()
Returns aIntBuffer
view of the data pointed to by themMeshes
field.AINode
mMeshes(java.nio.IntBuffer value)
Sets the address of the specifiedIntBuffer
to themMeshes
field.AIMetaData
mMetadata()
Returns aAIMetaData
view of the struct pointed to by themMetadata
field.AINode
mMetadata(AIMetaData value)
Sets the address of the specifiedAIMetaData
to themMetadata
field.AIString
mName()
Returns aAIString
view of themName
field.AINode
mName(AIString value)
Copies the specifiedAIString
to themName
field.int
mNumChildren()
Returns the value of themNumChildren
field.int
mNumMeshes()
Returns the value of themNumMeshes
field.AINode
mParent()
Returns aAINode
view of the struct pointed to by themParent
field.AINode
mParent(AINode value)
Sets the address of the specifiedAINode
to themParent
field.AIMatrix4x4
mTransformation()
Returns aAIMatrix4x4
view of themTransformation
field.AINode
mTransformation(AIMatrix4x4 value)
Copies the specifiedAIMatrix4x4
to themTransformation
field.AINode
set(AINode src)
Copies the specified struct data to this struct.AINode
set(AIString mName, AIMatrix4x4 mTransformation, AINode mParent, org.lwjgl.PointerBuffer mChildren, java.nio.IntBuffer mMeshes, AIMetaData mMetadata)
Initializes this struct with the specified values.int
sizeof()
static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
CallsAINode.validate(long)
for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
AINode
public AINode(java.nio.ByteBuffer container)
Creates aAINode
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
-
mTransformation
public AIMatrix4x4 mTransformation()
Returns aAIMatrix4x4
view of themTransformation
field.
-
mParent
@Nullable public AINode mParent()
Returns aAINode
view of the struct pointed to by themParent
field.
-
mNumChildren
public int mNumChildren()
Returns the value of themNumChildren
field.
-
mChildren
@Nullable public org.lwjgl.PointerBuffer mChildren()
Returns aPointerBuffer
view of the data pointed to by themChildren
field.
-
mNumMeshes
public int mNumMeshes()
Returns the value of themNumMeshes
field.
-
mMeshes
@Nullable public java.nio.IntBuffer mMeshes()
Returns aIntBuffer
view of the data pointed to by themMeshes
field.
-
mMetadata
@Nullable public AIMetaData mMetadata()
Returns aAIMetaData
view of the struct pointed to by themMetadata
field.
-
mTransformation
public AINode mTransformation(AIMatrix4x4 value)
Copies the specifiedAIMatrix4x4
to themTransformation
field.
-
mParent
public AINode mParent(@Nullable AINode value)
Sets the address of the specifiedAINode
to themParent
field.
-
mChildren
public AINode mChildren(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themChildren
field.
-
mMeshes
public AINode mMeshes(@Nullable java.nio.IntBuffer value)
Sets the address of the specifiedIntBuffer
to themMeshes
field.
-
mMetadata
public AINode mMetadata(@Nullable AIMetaData value)
Sets the address of the specifiedAIMetaData
to themMetadata
field.
-
set
public AINode set(AIString mName, AIMatrix4x4 mTransformation, AINode mParent, org.lwjgl.PointerBuffer mChildren, java.nio.IntBuffer mMeshes, AIMetaData mMetadata)
Initializes this struct with the specified values.
-
set
public AINode set(AINode src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static AINode malloc()
Returns a newAINode
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static AINode calloc()
Returns a newAINode
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static AINode create(long address)
Returns a newAINode
instance for the specified memory address.
-
createSafe
@Nullable public static AINode createSafe(long address)
-
malloc
public static AINode.Buffer malloc(int capacity)
Returns a newAINode.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static AINode.Buffer calloc(int capacity)
Returns a newAINode.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static AINode.Buffer create(int capacity)
Returns a newAINode.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static AINode.Buffer create(long address, int capacity)
Create aAINode.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static AINode.Buffer createSafe(long address, int capacity)
-
mallocStack
public static AINode mallocStack()
Returns a newAINode
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static AINode callocStack()
Returns a newAINode
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static AINode mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAINode
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static AINode callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAINode
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static AINode.Buffer mallocStack(int capacity)
Returns a newAINode.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static AINode.Buffer callocStack(int capacity)
Returns a newAINode.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static AINode.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAINode.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static AINode.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAINode.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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)
CallsAINode.validate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-