Class AICamera

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class AICamera extends Struct<AICamera> implements NativeResource

 struct aiCamera {
     {@link AIString struct aiString} mName;
     {@link AIVector3D struct aiVector3D} mPosition;
     {@link AIVector3D struct aiVector3D} mUp;
     {@link AIVector3D struct aiVector3D} mLookAt;
     float mHorizontalFOV;
     float mClipPlaneNear;
     float mClipPlaneFar;
     float mAspect;
     float mOrthographicWidth;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • MNAME

      public static final int MNAME
      The struct member offsets.
    • MPOSITION

      public static final int MPOSITION
      The struct member offsets.
    • MUP

      public static final int MUP
      The struct member offsets.
    • MLOOKAT

      public static final int MLOOKAT
      The struct member offsets.
    • MHORIZONTALFOV

      public static final int MHORIZONTALFOV
      The struct member offsets.
    • MCLIPPLANENEAR

      public static final int MCLIPPLANENEAR
      The struct member offsets.
    • MCLIPPLANEFAR

      public static final int MCLIPPLANEFAR
      The struct member offsets.
    • MASPECT

      public static final int MASPECT
      The struct member offsets.
    • MORTHOGRAPHICWIDTH

      public static final int MORTHOGRAPHICWIDTH
      The struct member offsets.
  • Constructor Details

    • AICamera

      public AICamera(ByteBuffer container)
      Creates a AICamera 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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<AICamera>
    • mName

      public AIString mName()
      Returns:
      a AIString view of the mName field.
    • mPosition

      public AIVector3D mPosition()
      Returns:
      a AIVector3D view of the mPosition field.
    • mUp

      public AIVector3D mUp()
      Returns:
      a AIVector3D view of the mUp field.
    • mLookAt

      public AIVector3D mLookAt()
      Returns:
      a AIVector3D view of the mLookAt field.
    • mHorizontalFOV

      public float mHorizontalFOV()
      Returns:
      the value of the mHorizontalFOV field.
    • mClipPlaneNear

      public float mClipPlaneNear()
      Returns:
      the value of the mClipPlaneNear field.
    • mClipPlaneFar

      public float mClipPlaneFar()
      Returns:
      the value of the mClipPlaneFar field.
    • mAspect

      public float mAspect()
      Returns:
      the value of the mAspect field.
    • mOrthographicWidth

      public float mOrthographicWidth()
      Returns:
      the value of the mOrthographicWidth field.
    • mName

      public AICamera mName(AIString value)
      Copies the specified AIString to the mName field.
    • mName

      public AICamera mName(Consumer<AIString> consumer)
      Passes the mName field to the specified Consumer.
    • mPosition

      public AICamera mPosition(AIVector3D value)
      Copies the specified AIVector3D to the mPosition field.
    • mPosition

      public AICamera mPosition(Consumer<AIVector3D> consumer)
      Passes the mPosition field to the specified Consumer.
    • mUp

      public AICamera mUp(AIVector3D value)
      Copies the specified AIVector3D to the mUp field.
    • mUp

      public AICamera mUp(Consumer<AIVector3D> consumer)
      Passes the mUp field to the specified Consumer.
    • mLookAt

      public AICamera mLookAt(AIVector3D value)
      Copies the specified AIVector3D to the mLookAt field.
    • mLookAt

      public AICamera mLookAt(Consumer<AIVector3D> consumer)
      Passes the mLookAt field to the specified Consumer.
    • mHorizontalFOV

      public AICamera mHorizontalFOV(float value)
      Sets the specified value to the mHorizontalFOV field.
    • mClipPlaneNear

      public AICamera mClipPlaneNear(float value)
      Sets the specified value to the mClipPlaneNear field.
    • mClipPlaneFar

      public AICamera mClipPlaneFar(float value)
      Sets the specified value to the mClipPlaneFar field.
    • mAspect

      public AICamera mAspect(float value)
      Sets the specified value to the mAspect field.
    • mOrthographicWidth

      public AICamera mOrthographicWidth(float value)
      Sets the specified value to the mOrthographicWidth field.
    • set

      public AICamera set(AIString mName, AIVector3D mPosition, AIVector3D mUp, AIVector3D mLookAt, float mHorizontalFOV, float mClipPlaneNear, float mClipPlaneFar, float mAspect, float mOrthographicWidth)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static AICamera.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static AICamera.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static AICamera.Buffer mallocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static AICamera.Buffer callocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

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

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

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

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

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

      public static AIVector3D nmPosition(long struct)
      Unsafe version of mPosition().
    • nmUp

      public static AIVector3D nmUp(long struct)
      Unsafe version of mUp().
    • nmLookAt

      public static AIVector3D nmLookAt(long struct)
      Unsafe version of mLookAt().
    • nmHorizontalFOV

      public static float nmHorizontalFOV(long struct)
      Unsafe version of mHorizontalFOV().
    • nmClipPlaneNear

      public static float nmClipPlaneNear(long struct)
      Unsafe version of mClipPlaneNear().
    • nmClipPlaneFar

      public static float nmClipPlaneFar(long struct)
      Unsafe version of mClipPlaneFar().
    • nmAspect

      public static float nmAspect(long struct)
      Unsafe version of mAspect().
    • nmOrthographicWidth

      public static float nmOrthographicWidth(long struct)
      Unsafe version of mOrthographicWidth().
    • nmName

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

      public static void nmPosition(long struct, AIVector3D value)
      Unsafe version of mPosition.
    • nmUp

      public static void nmUp(long struct, AIVector3D value)
      Unsafe version of mUp.
    • nmLookAt

      public static void nmLookAt(long struct, AIVector3D value)
      Unsafe version of mLookAt.
    • nmHorizontalFOV

      public static void nmHorizontalFOV(long struct, float value)
      Unsafe version of mHorizontalFOV.
    • nmClipPlaneNear

      public static void nmClipPlaneNear(long struct, float value)
      Unsafe version of mClipPlaneNear.
    • nmClipPlaneFar

      public static void nmClipPlaneFar(long struct, float value)
      Unsafe version of mClipPlaneFar.
    • nmAspect

      public static void nmAspect(long struct, float value)
      Unsafe version of mAspect.
    • nmOrthographicWidth

      public static void nmOrthographicWidth(long struct, float value)
      Unsafe version of mOrthographicWidth.