Class AIMeshMorphAnim

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class AIMeshMorphAnim
    extends Struct
    implements NativeResource
    Describes a morphing animation of a given mesh.

    Member documentation

    • mName – Name of the mesh to be animated. An empty string is not allowed, animated meshes need to be named (not necessarily uniquely, the name can basically serve as wildcard to select a group of meshes with similar animation setup).
    • mNumKeys – Size of the mKeys array. Must be 1, at least.
    • mKeys – Key frames of the animation. May not be NULL.

    Layout

    
     struct aiMeshMorphAnim {
         struct aiString mName;
         unsigned int mNumKeys;
         struct aiMeshMorphKey * mKeys;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • MNAME, MNUMKEYS, MKEYS

        The struct member offsets.
    • Constructor Detail

      • AIMeshMorphAnim

        public AIMeshMorphAnim​(java.nio.ByteBuffer container)
        Creates a AIMeshMorphAnim 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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • mNumKeys

        public int mNumKeys()
        Returns the value of the mNumKeys field.
      • mName

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

        public AIMeshMorphAnim set​(AIMeshMorphAnim src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

        public static AIMeshMorphAnim malloc()
        Returns a new AIMeshMorphAnim instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

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

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

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

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

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

        public static AIMeshMorphAnim mallocStack()
        Returns a new AIMeshMorphAnim instance allocated on the thread-local MemoryStack.
      • callocStack

        public static AIMeshMorphAnim callocStack()
        Returns a new AIMeshMorphAnim instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static AIMeshMorphAnim mallocStack​(MemoryStack stack)
        Returns a new AIMeshMorphAnim instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static AIMeshMorphAnim callocStack​(MemoryStack stack)
        Returns a new AIMeshMorphAnim instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • nmName

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

        public static int nmNumKeys​(long struct)
        Unsafe version of mNumKeys().
      • nmName

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

        public static void nmNumKeys​(long struct,
                                     int value)
        Sets the specified value to the mNumKeys field of the specified struct.
      • validate

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

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array