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

PCLVisualizer: make coordinate system actor unpickable #5719

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

themightyoarfish
Copy link
Contributor

When adding a coordinate system to the visualizer, it tends to capture f key events. The user wants to fly to the point under the cursor, but gets teleported to the coordinate axes instead for some reason. Usually I have to switch to point-based rendering (p) to get this to stop.

I think it would make sense to make all annotations (text, lines, etc.) also unpickable.

@themightyoarfish themightyoarfish changed the title make coordinate system unpickable PCLVisualizer: make coordinate system actor unpickable May 24, 2023
@larshg
Copy link
Contributor

larshg commented May 24, 2023

Can you make a video to show what happens?
I can't seem to reproduce it. But the point that is under the cursor gets moved to the center of screen, which seems unintuitive to me.
I can't reproduce directly that it turns towards the coordinatesystem.

@larshg
Copy link
Contributor

larshg commented May 24, 2023

On the below image, it "hits" the coordinate system points, no matter if in surface or point rendering mode, rather then actual points, which is "far" behind the coordinatesystem.

Anyways, I would probably opt for a parameter, to set whether the actor should be pickable or not, rather than forcing either.

image

@themightyoarfish
Copy link
Contributor Author

pclviewer.webm

I tried capturing the problem here. I hover over a point, and press f repeatedly to fly to it. Left is with my changes – i eventually arrive. Right is current state – the coordinate actor attracts the view and I converge to it instead of my target.

Here it looks rather benign, but I often have cases where i even move the axes out of the viewport, and they still capture my focus and turn around the view completely.

@larshg
Copy link
Contributor

larshg commented May 24, 2023

Yeah, so same experience that I have. That you try to target points behind the coordinate actor, but its "in the way".

@themightyoarfish
Copy link
Contributor Author

Visually, it isn't so I would consider this unexpected behaviour, but I don't know how the point picking works exactly.

@themightyoarfish
Copy link
Contributor Author

this happens also at times when you fly to a point far away from the axes by the way. i used something close in the example for no reason.

@themightyoarfish
Copy link
Contributor Author

If I were to add a parameter, can the unpickable case be the default?

@themightyoarfish
Copy link
Contributor Author

I think this does not only apply to the coordinate system, but also other shapes. I often use spheres and lines and they likewise disable f behaviour. It seems to me that either we have to add the pickable parameter for each add*() function, or we just make them unpickable by default.

@themightyoarfish
Copy link
Contributor Author

@larshg Could you share your opinions on the previous few comments? Then I could move this forward.

@larshg
Copy link
Contributor

larshg commented Oct 30, 2023

Yeah, I think I would opt for the paramter for each add* method. I would keep it pickable as it is today as default though.

Alternatively we add a getCoordinateActorMap. Then you can use that one and getShapeActorMap and iterate through those and set them all to unpickable.

Another approach could be to add a getActor/Prop (string id), which then returned the actor / Prop type, where you could set pickable?

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

Successfully merging this pull request may close these issues.

None yet

2 participants