Skip to content

Add a per-collection line width control for tracks #1071

Open

Description

@NopeCharon

Follow-up to #666 (making track styling configurable).

Per-track thickness can already be set from the event data through the linewidth property, but there is no way to change it from the UI once an event is loaded. For example, in ATLAS you may want to make a muon collection stand out more without editing the event file.

Proposal

Add a "Line width scale" slider to the Draw Options of every track collection (Phoenix menu and dat.GUI). The slider multiplies the thickness of every track in that collection; the per-track linewidth from the event data is kept as the base value, so tracks that were configured to be thicker stay proportionally thicker. The tube geometries are rebuilt in place, and the scale is respected when tracks are extended to a radius, since that also rebuilds the geometries.

While working on this I also noticed that the track tube is not found by SceneManager.extendCollectionTracks (it looks for a mesh whose name is not Track, but the tube is named Track in PhoenixObjects.getTrack), so extended tracks currently only update the line and not the tube. The same lookup is needed here, so I will fix it as part of this change.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions