@twinfinity/core
    Preparing search index...

    Class GpuSelectables

    Methods and properties related to gpu picking. Basically "given a rendered pixel what object does that pixel represent".

    Implements

    Index

    Constructors

    Properties

    debugOptions: GpuPickDebugOptions = ...
    meshes: Map<string, Mesh> = ...

    BabylonJS meshes containing the merged IFC product meshes.

    defaultGpuPickTextureSize: 16

    Methods

    • Attach a babylonJs Mesh so it becomes available for gpu picking. That means that it may be returned in a pick operation.

      Parameters

      Returns number

      Number of remaning meshes it is possible to attach.

    • Returns void

    • Detach a babylonJs Mesh or Icon, that was previously attached using attach from gpu picking.

      Parameters

      Returns boolean

      true if detach was succesful.

    • Get unique "pick" id of mesh or icon. It is only valid as long as the item has been registered with attach. It will be 0 if not attached.

      Parameters

      • meshOrIcon: Mesh | Icon

        mesh or icon to get id for.

      Returns number

      0 if not attached, otherwise unique "pick" id.

    • Performs an intersection test in the world (finds objects below a specific screen coordinate or that intersect a ray).

      Parameters

      Returns PickResult

      Intersection information.

    • Performs an intersection test in the world (find objects below a specific camera or screen coordinate, or that intersect a ray).

      Parameters

      • picker: TargetCamera
      • OptionaltextureSizePow2: number

        texture size (defaults to 16x16) used when rendering the world during pick operation.

      • OptionaldoIntersectionTestOnGeometry: boolean

        true to perform exact intersection on intersected object (exact coordinate etc). This is computationally expensive.

      • OptionalsaveRenderedGpuPickingSceneTexture: boolean

        true to save the rendering texture of the pick operation. Mostly useful for debugging.

      Returns PickResult