Contents

makeMeshPart(resource:indexOffset:indexCount:primitive:windingOrder:bounds:)

Creates a mesh part that selects a contiguous range of indices from a mesh resource.

Declaration

func makeMeshPart(resource: LowLevelMeshResource, indexOffset: Int, indexCount: Int, primitive: MTLPrimitiveType, windingOrder: MTLWinding, bounds: BoundingSphereBox) throws -> LowLevelMeshPart

Parameters

  • resource:

    The mesh resource whose index and vertex buffers this part draws from.

  • indexOffset:

    The byte offset of the first index within the index buffer.

  • indexCount:

    The number of indices to use for this part.

  • primitive:

    The geometric primitive type to use when rendering.

  • windingOrder:

    The winding order that identifies front-facing polygons.

  • bounds:

    The model-space bounding volume for this part.

Return Value

A newly created LowLevelMeshPart.

Discussion

See Also

Creating meshes