Cache of materials via their local ID

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.

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

Accessors

Methods

  • 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 geometry ID.

    Parameters

    • geometryLocalID: number

      The local ID of the geometry to get the associated material for.

    Returns undefined | [CanonicalMaterial, number]

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

  • 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.