Cache of materials via their local ID

Implements

Constructors

Properties

defaultMaterialLocalID: undefined | number

If there is a material for a whole element, this is used to add a default material to that item.

isVoid: boolean = false
materialDefinitionsMap: Map<number, number> = ...
model: default

The model this is from

relMaterialsMap: Map<number, number> = ...
styledItemMap: Map<number, number> = ...

Accessors

Methods

  • Add a material to the cache

    Parameters

    • localID: number

      The local ID of the source material object

    • material: CanonicalMaterial

      The canonical material version of the material to add

    Returns void

  • Map the current geometry to the current default material, if one is set.

    Parameters

    • geometryLocalID: number

      The geometry ID to add.

    Returns void

  • Assign a particular geometry to a particular material

    Parameters

    • geometryLocalID: number

      The geometry

    • materialLocalID: number

      The material

    Returns void

  • Get a material by its local ID.

    Parameters

    • geometryLocalID: number

      The local ID of the geometry to fetch

    Returns undefined | number

    A tuple containing the material and its id, or undefined if it is not found.

  • Get the OBJs for all the curves in the cache (lazily)

    Returns IterableIterator<[default<EntityTypesIfc>, string]>

    Curves with their matching OBJ as a string