Class AIQuaternion

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

    public class AIQuaternion
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Represents a quaternion in a 4D vector.

    Member documentation

    • w – The w component
    • x – The x component
    • y – The y component
    • z – The z component

    Layout

    
     struct aiQuaternion {
         float w;
         float x;
         float y;
         float z;
     }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  AIQuaternion.Buffer
      An array of AIQuaternion structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.Pointer.Default
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALIGNOF
      The struct alignment in bytes.
      static int SIZEOF
      The struct size in bytes.
      static int W
      X
      Y
      Z
      The struct member offsets.
      • Fields inherited from interface org.lwjgl.system.Pointer

        BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
    • Constructor Summary

      Constructors 
      Constructor Description
      AIQuaternion​(java.nio.ByteBuffer container)
      Creates a AIQuaternion instance at the current position of the specified ByteBuffer container.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static AIQuaternion calloc()
      Returns a new AIQuaternion instance allocated with memCalloc.
      static AIQuaternion.Buffer calloc​(int capacity)
      Returns a new AIQuaternion.Buffer instance allocated with memCalloc.
      static AIQuaternion callocStack()
      Returns a new AIQuaternion instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      static AIQuaternion.Buffer callocStack​(int capacity)
      Returns a new AIQuaternion.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      static AIQuaternion.Buffer callocStack​(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new AIQuaternion.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      static AIQuaternion callocStack​(org.lwjgl.system.MemoryStack stack)
      Returns a new AIQuaternion instance allocated on the specified MemoryStack and initializes all its bits to zero.
      static AIQuaternion create()
      Returns a new AIQuaternion instance allocated with BufferUtils.
      static AIQuaternion.Buffer create​(int capacity)
      Returns a new AIQuaternion.Buffer instance allocated with BufferUtils.
      static AIQuaternion create​(long address)
      Returns a new AIQuaternion instance for the specified memory address.
      static AIQuaternion.Buffer create​(long address, int capacity)
      Create a AIQuaternion.Buffer instance at the specified memory.
      static AIQuaternion createSafe​(long address)
      Like create, but returns null if address is NULL.
      static AIQuaternion.Buffer createSafe​(long address, int capacity)
      Like create, but returns null if address is NULL.
      static AIQuaternion malloc()
      Returns a new AIQuaternion instance allocated with memAlloc.
      static AIQuaternion.Buffer malloc​(int capacity)
      Returns a new AIQuaternion.Buffer instance allocated with memAlloc.
      static AIQuaternion mallocStack()
      Returns a new AIQuaternion instance allocated on the thread-local MemoryStack.
      static AIQuaternion.Buffer mallocStack​(int capacity)
      Returns a new AIQuaternion.Buffer instance allocated on the thread-local MemoryStack.
      static AIQuaternion.Buffer mallocStack​(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new AIQuaternion.Buffer instance allocated on the specified MemoryStack.
      static AIQuaternion mallocStack​(org.lwjgl.system.MemoryStack stack)
      Returns a new AIQuaternion instance allocated on the specified MemoryStack.
      static float nw​(long struct)
      Unsafe version of w().
      static void nw​(long struct, float value)
      Unsafe version of w.
      static float nx​(long struct)
      Unsafe version of x().
      static void nx​(long struct, float value)
      Unsafe version of x.
      static float ny​(long struct)
      Unsafe version of y().
      static void ny​(long struct, float value)
      Unsafe version of y.
      static float nz​(long struct)
      Unsafe version of z().
      static void nz​(long struct, float value)
      Unsafe version of z.
      AIQuaternion set​(float w, float x, float y, float z)
      Initializes this struct with the specified values.
      AIQuaternion set​(AIQuaternion src)
      Copies the specified struct data to this struct.
      int sizeof()  
      float w()
      Returns the value of the w field.
      AIQuaternion w​(float value)
      Sets the specified value to the w field.
      float x()
      Returns the value of the x field.
      AIQuaternion x​(float value)
      Sets the specified value to the x field.
      float y()
      Returns the value of the y field.
      AIQuaternion y​(float value)
      Sets the specified value to the y field.
      float z()
      Returns the value of the z field.
      AIQuaternion z​(float value)
      Sets the specified value to the z field.
      • Methods inherited from interface org.lwjgl.system.NativeResource

        close, free
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from class org.lwjgl.system.Pointer.Default

        address, equals, hashCode, toString
      • Methods inherited from class org.lwjgl.system.Struct

        clear, free, isNull
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • W, X, Y, Z

        The struct member offsets.
    • Constructor Detail

      • AIQuaternion

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

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

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

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

        public float z()
        Returns the value of the z field.
      • w

        public AIQuaternion w​(float value)
        Sets the specified value to the w field.
      • x

        public AIQuaternion x​(float value)
        Sets the specified value to the x field.
      • y

        public AIQuaternion y​(float value)
        Sets the specified value to the y field.
      • z

        public AIQuaternion z​(float value)
        Sets the specified value to the z field.
      • set

        public AIQuaternion set​(float w,
                                float x,
                                float y,
                                float z)
        Initializes this struct with the specified values.
      • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public static AIQuaternion.Buffer mallocStack​(int capacity)
        Returns a new AIQuaternion.Buffer instance allocated on the thread-local MemoryStack.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static AIQuaternion.Buffer callocStack​(int capacity)
        Returns a new AIQuaternion.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

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

        public static AIQuaternion.Buffer callocStack​(int capacity,
                                                      org.lwjgl.system.MemoryStack stack)
        Returns a new AIQuaternion.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
      • nw

        public static float nw​(long struct)
        Unsafe version of w().
      • nx

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

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

        public static float nz​(long struct)
        Unsafe version of z().
      • nw

        public static void nw​(long struct,
                              float value)
        Unsafe version of w.
      • nx

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

        public static void ny​(long struct,
                              float value)
        Unsafe version of y.
      • nz

        public static void nz​(long struct,
                              float value)
        Unsafe version of z.