hiprtTriangleMeshPrimitive

Triangle mesh primitive.

Triangle mesh primitive is represented as an indexed vertex array. Vertex and index arrays are defined using device pointers and strides. Each vertex has to have 3 components: (x, y, z) coordinates. Indices are organized into triples (i0, i1, i2) - one for each triangle.

Name

Type

Description

vertices

hiprtDevicePtr

Device pointer to vertex data.

vertexCount

uint32_t

Number of vertices in vertex array.

vertexStride

uint32_t

Stride in bytes between two vertices.

triangleIndices

hiprtDevicePtr

Device pointer to index data.

triangleCount

uint32_t

Number of trinagles in index array.

triangleStride

uint32_t

Stride in bytes between two triangles.