import { GeometryObject } from "../../dependencies/conway-geom/index.js"; import { CanonicalMaterial } from "./canonical_material.js"; import { IIndexSetCursor } from "./i_index_set_cursor.js"; import { Model } from "./model.js"; import { ReadonlyUint32Array } from "./readonly_typed_array.js"; import { TriangleElementMap } from "./triangle_element_map.js"; /** * A packed mesh that has all the materials, primitives and * the mapping back to model elements. * * This can be considered the reified version of CanonicalGeometry. */ export declare class PackedMesh { readonly model: ModelType; readonly materials: ReadonlyArray; readonly primitives: ReadonlyArray<[ GeometryObject, number | undefined ]>; readonly triangleElementMaps: ReadonlyArray; readonly elementPrimitiveIndex: ReadonlyMap; /** * Construct a packed mesh. * * @param model The model this mesh came from. * @param materials The materials array for the packed mesh (referenced * by index by primitives) * @param primitives The primitives for this mesh (the mesh fragments * by material), with the material index being the second item of the tuple. * @param triangleElementMaps Triangle element maps (one per primitive, * in the same order, to map elements to primitives) * @param elementPrimitiveIndex Element primitive index, maps * element local ids to the correct primitive. */ constructor(model: ModelType, materials: ReadonlyArray, primitives: ReadonlyArray<[ GeometryObject, number | undefined ]>, triangleElementMaps: ReadonlyArray, elementPrimitiveIndex: ReadonlyMap); /** * Get triangles from a cursor. * * @param cursor The cursor to extract triangles for * @yields {[number, number, ReadonlyUint32Array]} Returns a tuple containing * the local ID of the element, the primitive index, and the triangles. * * Note - there may be multiple batches of triangles from the same element, * because the triangles maybe in different primitives. */ triangles(cursor: IIndexSetCursor): IterableIterator<[ number, number, ReadonlyUint32Array ]>; } //# sourceMappingURL=packed_mesh.d.ts.map