Class AIMesh

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class AIMesh extends Struct<AIMesh> implements NativeResource

 struct aiMesh {
     unsigned int mPrimitiveTypes;
     unsigned int mNumVertices;
     unsigned int mNumFaces;
     {@link AIVector3D struct aiVector3D} * mVertices;
     {@link AIVector3D struct aiVector3D} * mNormals;
     {@link AIVector3D struct aiVector3D} * mTangents;
     {@link AIVector3D struct aiVector3D} * mBitangents;
     {@link AIColor4D struct aiColor4D} * mColors[AI_MAX_NUMBER_OF_COLOR_SETS];
     {@link AIVector3D struct aiVector3D} * mTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS];
     unsigned int mNumUVComponents[AI_MAX_NUMBER_OF_TEXTURECOORDS];
     {@link AIFace struct aiFace} * mFaces;
     unsigned int mNumBones;
     {@link AIBone struct aiBone} ** mBones;
     unsigned int mMaterialIndex;
     {@link AIString struct aiString} mName;
     unsigned int mNumAnimMeshes;
     {@link AIAnimMesh struct aiAnimMesh} ** mAnimMeshes;
     aiMorphingMethod mMethod;
     {@link AIAABB struct aiAABB} mAABB;
     {@link AIString struct aiString} ** mTextureCoordsNames;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int MPRIMITIVETYPES
      The struct member offsets.
    • MNUMVERTICES

      public static final int MNUMVERTICES
      The struct member offsets.
    • MNUMFACES

      public static final int MNUMFACES
      The struct member offsets.
    • MVERTICES

      public static final int MVERTICES
      The struct member offsets.
    • MNORMALS

      public static final int MNORMALS
      The struct member offsets.
    • MTANGENTS

      public static final int MTANGENTS
      The struct member offsets.
    • MBITANGENTS

      public static final int MBITANGENTS
      The struct member offsets.
    • MCOLORS

      public static final int MCOLORS
      The struct member offsets.
    • MTEXTURECOORDS

      public static final int MTEXTURECOORDS
      The struct member offsets.
    • MNUMUVCOMPONENTS

      public static final int MNUMUVCOMPONENTS
      The struct member offsets.
    • MFACES

      public static final int MFACES
      The struct member offsets.
    • MNUMBONES

      public static final int MNUMBONES
      The struct member offsets.
    • MBONES

      public static final int MBONES
      The struct member offsets.
    • MMATERIALINDEX

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

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

      public static final int MNUMANIMMESHES
      The struct member offsets.
    • MANIMMESHES

      public static final int MANIMMESHES
      The struct member offsets.
    • MMETHOD

      public static final int MMETHOD
      The struct member offsets.
    • MAABB

      public static final int MAABB
      The struct member offsets.
    • MTEXTURECOORDSNAMES

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

    • AIMesh

      public AIMesh(ByteBuffer container)
      Creates a AIMesh 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<AIMesh>
    • mPrimitiveTypes

      public int mPrimitiveTypes()
      Returns:
      the value of the mPrimitiveTypes field.
    • mNumVertices

      public int mNumVertices()
      Returns:
      the value of the mNumVertices field.
    • mNumFaces

      public int mNumFaces()
      Returns:
      the value of the mNumFaces field.
    • mVertices

      public AIVector3D.Buffer mVertices()
      Returns:
      a AIVector3D.Buffer view of the struct array pointed to by the mVertices field.
    • mNormals

      public @Nullable AIVector3D.Buffer mNormals()
      Returns:
      a AIVector3D.Buffer view of the struct array pointed to by the mNormals field.
    • mTangents

      public @Nullable AIVector3D.Buffer mTangents()
      Returns:
      a AIVector3D.Buffer view of the struct array pointed to by the mTangents field.
    • mBitangents

      public @Nullable AIVector3D.Buffer mBitangents()
      Returns:
      a AIVector3D.Buffer view of the struct array pointed to by the mBitangents field.
    • mColors

      public PointerBuffer mColors()
      Returns:
      a PointerBuffer view of the mColors field.
    • mColors

      public @Nullable AIColor4D.Buffer mColors(int index)
      Returns:
      a AIColor4D view of the pointer at the specified index of the mColors field.
    • mTextureCoords

      public PointerBuffer mTextureCoords()
      Returns:
      a PointerBuffer view of the mTextureCoords field.
    • mTextureCoords

      public @Nullable AIVector3D.Buffer mTextureCoords(int index)
      Returns:
      a AIVector3D view of the pointer at the specified index of the mTextureCoords field.
    • mNumUVComponents

      public IntBuffer mNumUVComponents()
      Returns:
      a IntBuffer view of the mNumUVComponents field.
    • mNumUVComponents

      public int mNumUVComponents(int index)
      Returns:
      the value at the specified index of the mNumUVComponents field.
    • mFaces

      public AIFace.Buffer mFaces()
      Returns:
      a AIFace.Buffer view of the struct array pointed to by the mFaces field.
    • mNumBones

      public int mNumBones()
      Returns:
      the value of the mNumBones field.
    • mBones

      public @Nullable PointerBuffer mBones()
      Returns:
      a PointerBuffer view of the data pointed to by the mBones field.
    • mMaterialIndex

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

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

      public int mNumAnimMeshes()
      Returns:
      the value of the mNumAnimMeshes field.
    • mAnimMeshes

      public @Nullable PointerBuffer mAnimMeshes()
      Returns:
      a PointerBuffer view of the data pointed to by the mAnimMeshes field.
    • mMethod

      public int mMethod()
      Returns:
      the value of the mMethod field.
    • mAABB

      public AIAABB mAABB()
      Returns:
      a AIAABB view of the mAABB field.
    • mTextureCoordsNames

      public @Nullable PointerBuffer mTextureCoordsNames()
      Returns:
      a PointerBuffer view of the data pointed to by the mTextureCoordsNames field.
    • mPrimitiveTypes

      public AIMesh mPrimitiveTypes(int value)
      Sets the specified value to the mPrimitiveTypes field.
    • mNumVertices

      public AIMesh mNumVertices(int value)
      Sets the specified value to the mNumVertices field.
    • mVertices

      public AIMesh mVertices(AIVector3D.Buffer value)
      Sets the address of the specified AIVector3D.Buffer to the mVertices field.
    • mNormals

      public AIMesh mNormals(@Nullable AIVector3D.Buffer value)
      Sets the address of the specified AIVector3D.Buffer to the mNormals field.
    • mTangents

      public AIMesh mTangents(@Nullable AIVector3D.Buffer value)
      Sets the address of the specified AIVector3D.Buffer to the mTangents field.
    • mBitangents

      public AIMesh mBitangents(@Nullable AIVector3D.Buffer value)
      Sets the address of the specified AIVector3D.Buffer to the mBitangents field.
    • mColors

      public AIMesh mColors(PointerBuffer value)
      Copies the specified PointerBuffer to the mColors field.
    • mColors

      public AIMesh mColors(int index, @Nullable AIColor4D.Buffer value)
      Copies the address of the specified AIColor4D.Buffer at the specified index of the mColors field.
    • mColors

      public AIMesh mColors(int index, Consumer<@Nullable AIColor4D.Buffer> consumer)
      Passes the element at index of the mColors field to the specified Consumer.
    • mTextureCoords

      public AIMesh mTextureCoords(PointerBuffer value)
      Copies the specified PointerBuffer to the mTextureCoords field.
    • mTextureCoords

      public AIMesh mTextureCoords(int index, @Nullable AIVector3D.Buffer value)
      Copies the address of the specified AIVector3D.Buffer at the specified index of the mTextureCoords field.
    • mTextureCoords

      public AIMesh mTextureCoords(int index, Consumer<@Nullable AIVector3D.Buffer> consumer)
      Passes the element at index of the mTextureCoords field to the specified Consumer.
    • mNumUVComponents

      public AIMesh mNumUVComponents(IntBuffer value)
      Copies the specified IntBuffer to the mNumUVComponents field.
    • mNumUVComponents

      public AIMesh mNumUVComponents(int index, int value)
      Sets the specified value at the specified index of the mNumUVComponents field.
    • mFaces

      public AIMesh mFaces(AIFace.Buffer value)
      Sets the address of the specified AIFace.Buffer to the mFaces field.
    • mBones

      public AIMesh mBones(@Nullable PointerBuffer value)
      Sets the address of the specified PointerBuffer to the mBones field.
    • mMaterialIndex

      public AIMesh mMaterialIndex(int value)
      Sets the specified value to the mMaterialIndex field.
    • mName

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

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

      public AIMesh mAnimMeshes(@Nullable PointerBuffer value)
      Sets the address of the specified PointerBuffer to the mAnimMeshes field.
    • mMethod

      public AIMesh mMethod(int value)
      Sets the specified value to the mMethod field.
    • mAABB

      public AIMesh mAABB(AIAABB value)
      Copies the specified AIAABB to the mAABB field.
    • mAABB

      public AIMesh mAABB(Consumer<AIAABB> consumer)
      Passes the mAABB field to the specified Consumer.
    • mTextureCoordsNames

      public AIMesh mTextureCoordsNames(@Nullable PointerBuffer value)
      Sets the address of the specified PointerBuffer to the mTextureCoordsNames field.
    • set

      public AIMesh set(int mPrimitiveTypes, int mNumVertices, AIVector3D.Buffer mVertices, @Nullable AIVector3D.Buffer mNormals, @Nullable AIVector3D.Buffer mTangents, @Nullable AIVector3D.Buffer mBitangents, PointerBuffer mColors, PointerBuffer mTextureCoords, IntBuffer mNumUVComponents, AIFace.Buffer mFaces, @Nullable PointerBuffer mBones, int mMaterialIndex, AIString mName, @Nullable PointerBuffer mAnimMeshes, int mMethod, AIAABB mAABB, @Nullable PointerBuffer mTextureCoordsNames)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static AIMesh.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new AIMesh.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
    • nmPrimitiveTypes

      public static int nmPrimitiveTypes(long struct)
      Unsafe version of mPrimitiveTypes().
    • nmNumVertices

      public static int nmNumVertices(long struct)
      Unsafe version of mNumVertices().
    • nmNumFaces

      public static int nmNumFaces(long struct)
      Unsafe version of mNumFaces().
    • nmVertices

      public static AIVector3D.Buffer nmVertices(long struct)
      Unsafe version of mVertices().
    • nmNormals

      public static @Nullable AIVector3D.Buffer nmNormals(long struct)
      Unsafe version of mNormals().
    • nmTangents

      public static @Nullable AIVector3D.Buffer nmTangents(long struct)
      Unsafe version of mTangents().
    • nmBitangents

      public static @Nullable AIVector3D.Buffer nmBitangents(long struct)
      Unsafe version of mBitangents().
    • nmColors

      public static PointerBuffer nmColors(long struct)
      Unsafe version of mColors().
    • nmColors

      public static @Nullable AIColor4D.Buffer nmColors(long struct, int index)
      Unsafe version of mColors.
    • nmTextureCoords

      public static PointerBuffer nmTextureCoords(long struct)
      Unsafe version of mTextureCoords().
    • nmTextureCoords

      public static @Nullable AIVector3D.Buffer nmTextureCoords(long struct, int index)
      Unsafe version of mTextureCoords.
    • nmNumUVComponents

      public static IntBuffer nmNumUVComponents(long struct)
      Unsafe version of mNumUVComponents().
    • nmNumUVComponents

      public static int nmNumUVComponents(long struct, int index)
      Unsafe version of mNumUVComponents.
    • nmFaces

      public static AIFace.Buffer nmFaces(long struct)
      Unsafe version of mFaces().
    • nmNumBones

      public static int nmNumBones(long struct)
      Unsafe version of mNumBones().
    • nmBones

      public static @Nullable PointerBuffer nmBones(long struct)
      Unsafe version of mBones.
    • nmMaterialIndex

      public static int nmMaterialIndex(long struct)
      Unsafe version of mMaterialIndex().
    • nmName

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

      public static int nmNumAnimMeshes(long struct)
      Unsafe version of mNumAnimMeshes().
    • nmAnimMeshes

      public static @Nullable PointerBuffer nmAnimMeshes(long struct)
      Unsafe version of mAnimMeshes.
    • nmMethod

      public static int nmMethod(long struct)
      Unsafe version of mMethod().
    • nmAABB

      public static AIAABB nmAABB(long struct)
      Unsafe version of mAABB().
    • nmTextureCoordsNames

      public static @Nullable PointerBuffer nmTextureCoordsNames(long struct)
      Unsafe version of mTextureCoordsNames.
    • nmPrimitiveTypes

      public static void nmPrimitiveTypes(long struct, int value)
      Unsafe version of mPrimitiveTypes.
    • nmNumVertices

      public static void nmNumVertices(long struct, int value)
      Sets the specified value to the mNumVertices field of the specified struct.
    • nmNumFaces

      public static void nmNumFaces(long struct, int value)
      Sets the specified value to the mNumFaces field of the specified struct.
    • nmVertices

      public static void nmVertices(long struct, AIVector3D.Buffer value)
      Unsafe version of mVertices.
    • nmNormals

      public static void nmNormals(long struct, @Nullable AIVector3D.Buffer value)
      Unsafe version of mNormals.
    • nmTangents

      public static void nmTangents(long struct, @Nullable AIVector3D.Buffer value)
      Unsafe version of mTangents.
    • nmBitangents

      public static void nmBitangents(long struct, @Nullable AIVector3D.Buffer value)
      Unsafe version of mBitangents.
    • nmColors

      public static void nmColors(long struct, PointerBuffer value)
      Unsafe version of mColors.
    • nmColors

      public static void nmColors(long struct, int index, @Nullable AIColor4D.Buffer value)
      Unsafe version of mColors.
    • nmTextureCoords

      public static void nmTextureCoords(long struct, PointerBuffer value)
      Unsafe version of mTextureCoords.
    • nmTextureCoords

      public static void nmTextureCoords(long struct, int index, @Nullable AIVector3D.Buffer value)
      Unsafe version of mTextureCoords.
    • nmNumUVComponents

      public static void nmNumUVComponents(long struct, IntBuffer value)
      Unsafe version of mNumUVComponents.
    • nmNumUVComponents

      public static void nmNumUVComponents(long struct, int index, int value)
      Unsafe version of mNumUVComponents.
    • nmFaces

      public static void nmFaces(long struct, AIFace.Buffer value)
      Unsafe version of mFaces.
    • nmNumBones

      public static void nmNumBones(long struct, int value)
      Sets the specified value to the mNumBones field of the specified struct.
    • nmBones

      public static void nmBones(long struct, @Nullable PointerBuffer value)
      Unsafe version of mBones.
    • nmMaterialIndex

      public static void nmMaterialIndex(long struct, int value)
      Unsafe version of mMaterialIndex.
    • nmName

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

      public static void nmNumAnimMeshes(long struct, int value)
      Sets the specified value to the mNumAnimMeshes field of the specified struct.
    • nmAnimMeshes

      public static void nmAnimMeshes(long struct, @Nullable PointerBuffer value)
      Unsafe version of mAnimMeshes.
    • nmMethod

      public static void nmMethod(long struct, int value)
      Unsafe version of mMethod.
    • nmAABB

      public static void nmAABB(long struct, AIAABB value)
      Unsafe version of mAABB.
    • nmTextureCoordsNames

      public static void nmTextureCoordsNames(long struct, @Nullable PointerBuffer value)
      Unsafe version of mTextureCoordsNames.
    • validate

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