Class AIVector2D

  • All Implemented Interfaces:
    Pointer

    public class AIVector2D
    extends Struct

    Layout

    
     struct aiVector2D {
         float x;
         float y;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • X, Y

        The struct member offsets.
    • Constructor Detail

      • AIVector2D

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

        public float x()
        Returns the value of the x field.
      • y

        public float y()
        Returns the value of the y field.
      • create

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

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

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

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

        public static float nx​(long struct)
        Unsafe version of x().
      • ny

        public static float ny​(long struct)
        Unsafe version of y().