Function createMeshesFromCsg2
-
createMeshesFromCsg2(
engine: EngineContext,
solid: Csg2Solid,
materials: readonly Material[],
name?: string,
): Mesh[]Parameters
- engine: EngineContext
- solid: Csg2Solid
- materials: readonly Material[]
Materials indexed by the material slots assigned during construction.
- name: string = "csg2"
Base name; each sub-mesh is suffixed with its slot index.
Returns Mesh[]
One mesh per distinct material slot, each assigned its corresponding material.
Triangulates a Csg2Solid into one mesh per material slot.