Class AIMeshMorphKey

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

    public class AIMeshMorphKey
    extends Struct
    implements NativeResource
    Binds a morph anim mesh to a specific point in time.

    Member documentation

    • mTime – the time of this key
    • mValues – the values at the time of this key
    • mWeights – the weights at the time of this key
    • mNumValuesAndWeights – the number of values and weights

    Layout

    
     struct aiMeshMorphKey {
         double mTime;
         unsigned int * mValues;
         double * mWeights;
         unsigned int mNumValuesAndWeights;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • MTIME, MVALUES, MWEIGHTS, MNUMVALUESANDWEIGHTS

        The struct member offsets.
    • Constructor Detail

      • AIMeshMorphKey

        public AIMeshMorphKey​(java.nio.ByteBuffer container)
        Creates a AIMeshMorphKey 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
      • mTime

        public double mTime()
        Returns the value of the mTime field.
      • mValues

        public java.nio.IntBuffer mValues()
        Returns a IntBuffer view of the data pointed to by the mValues field.
      • mWeights

        public java.nio.DoubleBuffer mWeights()
        Returns a DoubleBuffer view of the data pointed to by the mWeights field.
      • mNumValuesAndWeights

        public int mNumValuesAndWeights()
        Returns the value of the mNumValuesAndWeights field.
      • mTime

        public AIMeshMorphKey mTime​(double value)
        Sets the specified value to the mTime field.
      • mValues

        public AIMeshMorphKey mValues​(java.nio.IntBuffer value)
        Sets the address of the specified IntBuffer to the mValues field.
      • mWeights

        public AIMeshMorphKey mWeights​(java.nio.DoubleBuffer value)
        Sets the address of the specified DoubleBuffer to the mWeights field.
      • mNumValuesAndWeights

        public AIMeshMorphKey mNumValuesAndWeights​(int value)
        Sets the specified value to the mNumValuesAndWeights field.
      • set

        public AIMeshMorphKey set​(double mTime,
                                  java.nio.IntBuffer mValues,
                                  java.nio.DoubleBuffer mWeights,
                                  int mNumValuesAndWeights)
        Initializes this struct with the specified values.
      • set

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

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

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

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

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

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

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

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

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

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

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

        public static double nmTime​(long struct)
        Unsafe version of mTime().
      • nmValues

        public static java.nio.IntBuffer nmValues​(long struct)
        Unsafe version of mValues.
      • nmWeights

        public static java.nio.DoubleBuffer nmWeights​(long struct)
        Unsafe version of mWeights.
      • nmNumValuesAndWeights

        public static int nmNumValuesAndWeights​(long struct)
        Unsafe version of mNumValuesAndWeights().
      • nmTime

        public static void nmTime​(long struct,
                                  double value)
        Unsafe version of mTime.
      • nmValues

        public static void nmValues​(long struct,
                                    java.nio.IntBuffer value)
        Unsafe version of mValues.
      • nmWeights

        public static void nmWeights​(long struct,
                                     java.nio.DoubleBuffer value)
        Unsafe version of mWeights.
      • nmNumValuesAndWeights

        public static void nmNumValuesAndWeights​(long struct,
                                                 int value)
        Sets the specified value to the mNumValuesAndWeights 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