b3dAddTriangle

Adds triangle to surface using three vertex indices, defines renderable face. Takes mesh (surface-based mesh entity), surface (surface handle, 0-based), v0/v1/v2 (vertex indices from b3dAddVertex calls). Returns nothing.

3D Graphics

Parameters & Returns

Parameters

mesh Int
surface Int
v0 Int
v1 Int
v2 Int

Returns

Void

Quick Summary

Adds triangle to surface using three vertex indices, defines renderable face. Takes mesh (surface-based mesh entity), surface (surface handle, 0-based), v0/v1/v2 (vertex indices from b3dAddVertex calls). Returns nothing.

Technical Exegesis...

Adds triangle to surface using three vertex indices, defines renderable face. Takes mesh (surface-based mesh entity), surface (surface handle, 0-based), v0/v1/v2 (vertex indices from b3dAddVertex calls). Returns nothing. Validates mesh exists, type is ENTITY_MESH, surface-based, and surface index valid. Validates each vertex index in range [0, vertices.size()). Appends v0, v1, v2 to surface->indices array (3 consecutive indices = 1 triangle). Sets mesh->needsGPUUpload=true.

Example

Example.bam
; No example implemented yet