Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect collections information and 3D view #93

Closed
EdwardMoyse opened this issue Jun 5, 2020 · 7 comments · Fixed by #98
Closed

Connect collections information and 3D view #93

EdwardMoyse opened this issue Jun 5, 2020 · 7 comments · Fixed by #98
Assignees
Labels
enhancement New feature or request

Comments

@EdwardMoyse
Copy link
Collaborator

If you click on a cluster, track etc, and the collections view is open, that object should be highlighted there. And vice versa.

It would also be great to have an option (in the collections panel?) to zoom to that object.

@EdwardMoyse EdwardMoyse added the enhancement New feature or request label Jun 5, 2020
@9inpachi 9inpachi self-assigned this Jun 9, 2020
@9inpachi
Copy link
Collaborator

9inpachi commented Jun 9, 2020

I don't think we have a unique identifier for each event item (cluster, track etc). We need something like that in the userData to identify a certain event item so we can pick it up from the collections info.

@9inpachi
Copy link
Collaborator

9inpachi commented Jun 9, 2020

Was finally able to make it work, only for tracks for now (could make it work with the other objects the same way). Since I mentioned we needed some kind of ID to identify the event object by, for now, I am attaching it to the tracks manually like this:
PhoenixObjects::getTrack(trackParams: any): Object3D

const splineObject = new THREE.Line(geometry, material);
splineObject.userData = trackParams;
* splineObject.userData.item_id = Math.floor(Math.random() * 100).toString() + Date.now();
splineObject.name = 'Track';

I think something like this is safe enough for us.

Have a look:
wip-collections-track-selection

WDYT @EdwardMoyse @emiliocortina ?

@EdwardMoyse
Copy link
Collaborator Author

Making a unique id like this should be fine I think - elsewhere we have used the index of the object (e.g. track) in its collection, but perhaps this isn't so convenient here?

It looks very nice! Would it work both ways? i.e. if I clicked on a track in the collection list, would it be highlighted in 3D?

@9inpachi
Copy link
Collaborator

9inpachi commented Jun 9, 2020

Making a unique id like this should be fine I think - elsewhere we have used the index of the object (e.g. track) in its collection, but perhaps this isn't so convenient here?

Do you mean the uuid by index? If so, then yes. It might be more convenient. I was testing things with the current implementation.

It looks very nice! Would it work both ways? i.e. if I clicked on a track in the collection list, would it be highlighted in 3D?

I haven't done that yet. But making it work the other way around will be much simpler, however I am not sure how we can highlight the tracks since that doesn't work right now (because of the Line geometry. I will look into how we can move the camera to the object for now so we have something to start with.

@EdwardMoyse
Copy link
Collaborator Author

Do you mean the uuid by index? If so, then yes. It might be more convenient. I was testing things with the current implementation.

Yes. This shoudl be generally safe I think - in fact, this is what we do in ATLAS with our general reconstruction software ... links between objects are ("Collection name" : index )

Of course you're right that highlighting tracks is a general issue - I guess we could change the colour of that track? But it would be best to fix it properly.

@9inpachi
Copy link
Collaborator

Moving the camera to look at an object but it doesn't work for tracks and hits. So I was wondering if we should switch to outlines? Or its also possible to keep both the "Go to" and "Highlight" option from the collection panel.

wip-collections-twoway-selection

@9inpachi
Copy link
Collaborator

Hi,

I forgot to give an update on this. I added the option to highlight.

wip-collections-w-highlight

The "Look at object" option doesn't work for tracks and hits. I will look into what I can do about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants