Mesh

Immutable collection of surfaces forming a solid or supersolid mesh

A Solidean Mesh represents geometry in a broader sense. A Mesh consists of a collection of surfaces and some metadata. Usually, a mesh is a solid mesh, the enclosing boundary of a solid volume. However, meshes can also be configured to allow for self-intersections and nested components, resulting in the more general class of supersolid meshes. Any combination of supersolid meshes has well-defined Boolean results. Other configurations allow processing of meshes with small and even large holes in a best-effort fashion.

Note:
Individual surfaces are usually not closed or solid. Only all surfaces together form a closed mesh.

Signature

// Immutable collection of surfaces forming a solid or supersolid mesh
class Mesh:
    // no public member

// constructors
class Context:
    fun createMesh(builder: MeshBuilder) -> Mesh
    fun createMeshFromSurfaceBuilder(builder: SurfaceBuilder) -> Mesh
    fun createMeshFromTrianglesF32(triangles: [triangle3], arithmetic: ExactArithmetic, meshType: MeshType, lifetime: Lifetime) -> Mesh
    fun createMeshFromTrianglesF32WithID(triangles: [triangle3], arithmetic: ExactArithmetic, surfaceID: uint32_t, meshType: MeshType, lifetime: Lifetime) -> Mesh
    fun createMeshFromIndexedTrianglesF32(positions: [pos3], triangles: [idxtri], arithmetic: ExactArithmetic, meshType: MeshType, lifetime: Lifetime) -> Mesh
    fun createMeshFromIndexedTrianglesF32WithID(positions: [pos3], triangles: [idxtri], arithmetic: ExactArithmetic, surfaceID: uint32_t, meshType: MeshType, lifetime: Lifetime) -> Mesh

Constructors

NameDescription
createMeshConstructs a mesh from a mesh builder definition
createMeshFromSurfaceBuilderConstructs a mesh directly from a surface builder using defaults
createMeshFromTrianglesF32Constructs a mesh from a float32 triangle soup with exact arithmetic
createMeshFromTrianglesF32WithIDConstructs a mesh from a float32 triangle soup with primitive tracking IDs
createMeshFromIndexedTrianglesF32Constructs a mesh from indexed float32 triangles with exact arithmetic
createMeshFromIndexedTrianglesF32WithIDConstructs a mesh from indexed float32 triangles with primitive tracking IDs