SurfaceBuilder

Builder for defining immutable surfaces before use in a mesh

Surfaces are immutable. Their setup is completely defined by this builder object, which can be built up incrementally.

Signature

// Builder for defining immutable surfaces before use in a mesh
class SurfaceBuilder:
    fun allowSelfIntersections()
    fun trackID(surfaceID: uint32_t, primitiveStartID: uint32_t)
    fun trackIDRaw(rawStartID: uint64_t)
    fun trackPrimitiveIDs(primitiveIDs: [uint64_t], lifetime: Lifetime)

// constructors
class Context:
    fun createSurfaceBuilderFromTrianglesF32(triangles: [triangle3], arithmetic: ExactArithmetic, lifetime: Lifetime) -> SurfaceBuilder
    fun createSurfaceBuilderFromIndexedTrianglesF32(positions: [pos3], triangles: [idxtri], arithmetic: ExactArithmetic, lifetime: Lifetime) -> SurfaceBuilder

Constructors

NameDescription
createSurfaceBuilderFromTrianglesF32Defines a surface from a float32 triangle soup with exact arithmetic
createSurfaceBuilderFromIndexedTrianglesF32Defines a surface from indexed float32 triangles with exact arithmetic

Methods

NameTypeDescription
allowSelfIntersectionsMarks that this surface may contain self-intersections
trackIDEnables primitive tracking using a structured surface and primitive ID scheme
trackIDRawEnables primitive tracking using raw 62-bit IDs for each primitive
trackPrimitiveIDsEnables primitive tracking by providing explicit IDs for each primitive