Class AINode

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • MNAME, MTRANSFORMATION, MPARENT, MNUMCHILDREN, MCHILDREN, MNUMMESHES, MMESHES, MMETADATA

        The struct member offsets.
    • Constructor Detail

      • AINode

        public AINode​(java.nio.ByteBuffer container)
        Creates a AINode instance at the current position of the specified ByteBuffer 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 class org.lwjgl.system.Struct
      • mName

        public AIString mName()
        The name of the node.

        The name might be empty (length of zero) but all nodes which need to be referenced by either bones or animations are named. Multiple nodes may have the same name, except for nodes which are referenced by bones (see AIBone and AIMesh::mBones). Their names must be unique.

        Cameras and lights reference a specific node by name - if there are multiple nodes with this name, they are assigned to each of them.

        There are no limitations with regard to the characters contained in the name string as it is usually taken directly from the source file.

        Implementations should be able to handle tokens such as whitespace, tabs, line feeds, quotation marks, ampersands etc.

        Sometimes assimp introduces new nodes not present in the source file into the hierarchy (usually out of necessity because sometimes the source hierarchy format is simply not compatible). Their names are surrounded by <> e.g. <DummyRootNode>.

      • mTransformation

        public AIMatrix4x4 mTransformation()
        The transformation relative to the node's parent.
      • mParent

        @Nullable
        public AINode mParent()
        Parent node. NULL if this node is the root node.
      • mNumChildren

        public int mNumChildren()
        The number of child nodes of this node.
      • mChildren

        @Nullable
        public org.lwjgl.PointerBuffer mChildren()
        The child nodes of this node. NULL if mNumChildren is 0.
      • mNumMeshes

        public int mNumMeshes()
        The number of meshes of this node.
      • mMeshes

        @Nullable
        public java.nio.IntBuffer mMeshes()
        The meshes of this node. Each entry is an index into the mesh list of the AIScene.
      • mMetadata

        @Nullable
        public AIMetaData mMetadata()
        Metadata associated with this node or NULL if there is no metadata.

        Whether any metadata is generated depends on the source file format. See the importer notes page for more information on every source file format. Importers that don't document any metadata don't write any.

      • mName

        public AINode mName​(java.util.function.Consumer<AIString> consumer)
        Passes the mName() field to the specified Consumer.
      • mChildren

        public AINode mChildren​(@Nullable
                                org.lwjgl.PointerBuffer value)
        Sets the address of the specified PointerBuffer to the mChildren() field.
      • mMeshes

        public AINode mMeshes​(@Nullable
                              java.nio.IntBuffer value)
        Sets the address of the specified IntBuffer to the mMeshes() field.
      • set

        public AINode set​(AIString mName,
                          AIMatrix4x4 mTransformation,
                          @Nullable
                          AINode mParent,
                          @Nullable
                          org.lwjgl.PointerBuffer mChildren,
                          @Nullable
                          java.nio.IntBuffer mMeshes,
                          @Nullable
                          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 new AINode instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static AINode calloc()
        Returns a new AINode instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static AINode create()
        Returns a new AINode instance allocated with BufferUtils.
      • create

        public static AINode create​(long address)
        Returns a new AINode instance for the specified memory address.
      • createSafe

        @Nullable
        public static AINode createSafe​(long address)
        Like create, but returns null if address is NULL.
      • malloc

        public static AINode.Buffer malloc​(int capacity)
        Returns a new AINode.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • calloc

        public static AINode.Buffer calloc​(int capacity)
        Returns a new AINode.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • create

        public static AINode.Buffer create​(int capacity)
        Returns a new AINode.Buffer instance allocated with BufferUtils.
        Parameters:
        capacity - the buffer capacity
      • create

        public static AINode.Buffer create​(long address,
                                           int capacity)
        Create a AINode.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static AINode.Buffer createSafe​(long address,
                                               int capacity)
        Like create, but returns null if address is NULL.
      • mallocStack

        @Deprecated
        public static AINode mallocStack()
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
      • callocStack

        @Deprecated
        public static AINode callocStack()
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
      • mallocStack

        @Deprecated
        public static AINode mallocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
      • callocStack

        @Deprecated
        public static AINode callocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
      • mallocStack

        @Deprecated
        public static AINode.Buffer mallocStack​(int capacity,
                                                org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
      • callocStack

        @Deprecated
        public static AINode.Buffer callocStack​(int capacity,
                                                org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
      • malloc

        public static AINode malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new AINode instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

        public static AINode calloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new AINode instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • malloc

        public static AINode.Buffer malloc​(int capacity,
                                           org.lwjgl.system.MemoryStack stack)
        Returns a new AINode.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

        public static AINode.Buffer calloc​(int capacity,
                                           org.lwjgl.system.MemoryStack stack)
        Returns a new AINode.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nmName

        public static AIString nmName​(long struct)
        Unsafe version of mName().
      • nmParent

        @Nullable
        public static AINode nmParent​(long struct)
        Unsafe version of mParent().
      • nmNumChildren

        public static int nmNumChildren​(long struct)
        Unsafe version of mNumChildren().
      • nmChildren

        @Nullable
        public static org.lwjgl.PointerBuffer nmChildren​(long struct)
        Unsafe version of mChildren.
      • nmNumMeshes

        public static int nmNumMeshes​(long struct)
        Unsafe version of mNumMeshes().
      • nmMeshes

        @Nullable
        public static java.nio.IntBuffer nmMeshes​(long struct)
        Unsafe version of mMeshes.
      • nmMetadata

        @Nullable
        public static AIMetaData nmMetadata​(long struct)
        Unsafe version of mMetadata().
      • nmName

        public static void nmName​(long struct,
                                  AIString value)
        Unsafe version of mName.
      • nmParent

        public static void nmParent​(long struct,
                                    @Nullable
                                    AINode value)
        Unsafe version of mParent.
      • nmNumChildren

        public static void nmNumChildren​(long struct,
                                         int value)
        Sets the specified value to the mNumChildren field of the specified struct.
      • nmChildren

        public static void nmChildren​(long struct,
                                      @Nullable
                                      org.lwjgl.PointerBuffer value)
        Unsafe version of mChildren.
      • nmNumMeshes

        public static void nmNumMeshes​(long struct,
                                       int value)
        Sets the specified value to the mNumMeshes field of the specified struct.
      • nmMeshes

        public static void nmMeshes​(long struct,
                                    @Nullable
                                    java.nio.IntBuffer value)
        Unsafe version of mMeshes.
      • nmMetadata

        public static void nmMetadata​(long struct,
                                      @Nullable
                                      AIMetaData value)
        Unsafe version of mMetadata.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate