Skip to main content

Module append

Module append 

Source
Expand description

Appending copied geometry to a mesh.

append_mesh copies a position/triangle soup into a transaction and reports the new ids. Positions arrive in the target mesh’s local frame; any world-frame transform is the caller’s job. Only positions and triangles cross over: source channels take defaults, derived channels (like normals) are recomputed by the scene. Triangle indices are bounds checked; anything else about the soup is the caller’s responsibility.

UVs are the exception: a default would misalign them, so a target with UVs gets the source’s from append_mesh_with_uvs, or loses its own.

Structs§

AppendReport
Outcome of append_mesh.
AppendSource
Geometry to append, indexed from zero.

Functions§

append_mesh
Copies source into tx, returning the new vertex ids in source order.
append_mesh_with_uvs
append_mesh with the source’s UVs: 2 values per source position, or None for a source without them. When both sides have UVs the result does too; otherwise it has none and AppendReport::uvs_dropped is set.