File

src/managers/ui-manager/phoenix-ui.ts

Description

Common interface for implement Phoenix UI menu.

Index

Methods

Methods

addCollection
addCollection(eventDataType: string, collectionName: string, cuts?: Cut[], collectionColor?: Color)

Add collection folder and its configurable options to the event data type (tracks, hits etc.) folder.

Parameters :
Name Type Optional Description
eventDataType string No

Name of the event data type.

collectionName string No

Name of the collection to be added in the type of event data (tracks, hits etc.).

cuts Cut[] Yes

Cuts to the collection of event data that are to be made configurable to filter event data.

collectionColor Color Yes

Default color of the collection.

Returns : void
addEventDataFolder
addEventDataFolder()

Add event data folder with functions for event data toggles like show/hide and depthTest.

Returns : void
addEventDataTypeFolder
addEventDataTypeFolder(typeName: string)

Add folder for event data type like tracks or hits to the menu.

Parameters :
Name Type Optional Description
typeName string No

Name of the type of event data.

Returns : void
addGeometry
addGeometry(object: Object3D, menuSubfolder?: string)

Add geometry to the menu's geometry folder and set up its configurable options.

Parameters :
Name Type Optional Description
object Object3D No

Object to add to the UI menu.

menuSubfolder string Yes

Subfolder in the menu to add the geometry to. Example Folder > Subfolder.

Returns : void
addGeometryFolder
addGeometryFolder()

Add geometry (detector geometry) folder to the menu.

Returns : void
addLabel
addLabel(labelId: string, onRemoveLabel: () => void)

Add folder for configuration of label.

Parameters :
Name Type Optional Description
labelId string No

Unique ID of the label.

onRemoveLabel function No

Function called when label is removed.

Returns : void
addLabelsFolder
addLabelsFolder(configFunctions: any)

Add labels folder to the menu.

Parameters :
Name Type Optional Description
configFunctions any No

Functions to attach to the labels folder configuration.

Returns : void
clear
clear()

Clear the menu by removing all folders.

Returns : void
getEventDataTypeFolder
getEventDataTypeFolder(typeName: string)

Get the folder of the event data type.

Parameters :
Name Type Optional Description
typeName string No

Name of the event data type.

Returns : T

Folder of the event data type.

removeLabel
removeLabel(labelId: string, labelFolderReference?: T)

Remove label from the menu and scene if it exists.

Parameters :
Name Type Optional Description
labelId string No

A unique label ID string.

labelFolderReference T Yes

Reference to the label folder.

Returns : void
import { Color, Object3D } from 'three';
import { Cut } from '../../lib/models/cut.model';

/**
 * Common interface for implement Phoenix UI menu.
 */
export interface PhoenixUI<T> {
  /**
   * Clear the menu by removing all folders.
   */
  clear(): void;

  /**
   * Add geometry (detector geometry) folder to the menu.
   */
  addGeometryFolder(): void;

  /**
   * Add geometry to the menu's geometry folder and set up its configurable options.
   * @param object Object to add to the UI menu.
   * @param menuSubfolder Subfolder in the menu to add the geometry to. Example `Folder > Subfolder`.
   */
  addGeometry(object: Object3D, menuSubfolder?: string): void;

  /**
   * Add event data folder with functions for event data toggles like show/hide and depthTest.
   */
  addEventDataFolder(): void;

  /**
   * Add folder for event data type like tracks or hits to the menu.
   * @param typeName Name of the type of event data.
   */
  addEventDataTypeFolder(typeName: string): void;

  /**
   * Add collection folder and its configurable options to the event data type (tracks, hits etc.) folder.
   * @param eventDataType Name of the event data type.
   * @param collectionName Name of the collection to be added in the type of event data (tracks, hits etc.).
   * @param cuts Cuts to the collection of event data that are to be made configurable to filter event data.
   * @param collectionColor Default color of the collection.
   */
  addCollection(
    eventDataType: string,
    collectionName: string,
    cuts?: Cut[],
    collectionColor?: Color,
  ): void;

  /**
   * Add labels folder to the menu.
   * @param configFunctions Functions to attach to the labels folder configuration.
   */
  addLabelsFolder(configFunctions: any): void;

  /**
   * Add folder for configuration of label.
   * @param labelId Unique ID of the label.
   * @param onRemoveLabel Function called when label is removed.
   */
  addLabel(labelId: string, onRemoveLabel: () => void): void;

  /**
   * Remove label from the menu and scene if it exists.
   * @param labelId A unique label ID string.
   * @param labelFolderReference Reference to the label folder.
   */
  removeLabel(labelId: string, labelFolderReference?: T): void;

  /**
   * Get the folder of the event data type.
   * @param typeName Name of the event data type.
   * @returns Folder of the event data type.
   */
  getEventDataTypeFolder(typeName: string): T;
}

results matching ""

    No results matching ""