Package icyllis.arc3d.engine

# Interface Mesh

All Known Implementing Classes:
  `CircularRRectOp`, `MeshDrawOp`, `RectOp`, `RoundRectOp`

public interface Mesh
The interface used to receive geometry buffers from `MeshDrawTarget` for mesh-drawing operations.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default int`
  `getIndexCount()`
  Returns the number of indices to draw in the mesh.
  `default int`
  `getInstanceCount()`
  Returns the number of instances to draw in the batch.
  `default int`
  `getInstanceSize()`
  Returns the size of an instance if enabled in the array.
  `default int`
  `getVertexCount()`
  Returns the number of vertices to draw in the batch.
  `default int`
  `getVertexSize()`
  Returns the size of a vertex if enabled in the array.
  `default void`
  `setIndexBuffer(@RawPtr Buffer buffer, int baseIndex, int actualIndexCount)`
  The callback method for `MeshDrawTarget.makeIndexSpace(Mesh)` results.
  `default void`
  `setInstanceBuffer(@RawPtr Buffer buffer, int baseInstance, int actualInstanceCount)`
  The callback method for `MeshDrawTarget.makeInstanceSpace(Mesh)` results.
  `default void`
  `setVertexBuffer(@RawPtr Buffer buffer, int baseVertex, int actualVertexCount)`
  The callback method for `MeshDrawTarget.makeVertexSpace(Mesh)` results.

- ## Method Details

  - ### getVertexSize

    default int getVertexSize()
    Returns the size of a vertex if enabled in the array.

  - ### getVertexCount

    default int getVertexCount()
    Returns the number of vertices to draw in the batch.

  - ### setVertexBuffer

    default void setVertexBuffer(@RawPtr @RawPtr Buffer buffer, int baseVertex, int actualVertexCount)
    The callback method for `MeshDrawTarget.makeVertexSpace(Mesh)` results. The given GPU buffer will be kept by `GpuBufferPool` and moved to command buffer when the frame ends.
    Parameters:
      `buffer` - the raw ptr to the vertex buffer that will hold the vertices
      `baseVertex` - the offset into buffer of the first vertex, in units of the size of a vertex from layout param
      `actualVertexCount` - the actual number of vertices allocated

  - ### getInstanceSize

    default int getInstanceSize()
    Returns the size of an instance if enabled in the array.

  - ### getInstanceCount

    default int getInstanceCount()
    Returns the number of instances to draw in the batch.

  - ### setInstanceBuffer

    default void setInstanceBuffer(@RawPtr @RawPtr Buffer buffer, int baseInstance, int actualInstanceCount)
    The callback method for `MeshDrawTarget.makeInstanceSpace(Mesh)` results. The given GPU buffer will be kept by `GpuBufferPool` and moved to command buffer when the frame ends.
    Parameters:
      `buffer` - the raw ptr to the instance buffer that will hold the instances
      `baseInstance` - the offset into buffer of the first instance, in units of the size of an instance from layout param
      `actualInstanceCount` - the actual number of instances allocated

  - ### getIndexCount

    default int getIndexCount()
    Returns the number of indices to draw in the mesh.

  - ### setIndexBuffer

    default void setIndexBuffer(@RawPtr @RawPtr Buffer buffer, int baseIndex, int actualIndexCount)
    The callback method for `MeshDrawTarget.makeIndexSpace(Mesh)` results. The given GPU buffer will be kept by `GpuBufferPool` and moved to command buffer when the frame ends.
    Parameters:
      `buffer` - the raw ptr to the index buffer that will hold the indices
      `baseIndex` - the offset into buffer of the first index, in units of the size of an index from layout param
      `actualIndexCount` - the actual number of indices allocated