Skip to content

Add pick layer to SoPickStyle for ordered on-top picking#623

Open
kadet1090 wants to merge 1 commit into
coin3d:masterfrom
kadet1090:add-pick-layer
Open

Add pick layer to SoPickStyle for ordered on-top picking#623
kadet1090 wants to merge 1 commit into
coin3d:masterfrom
kadet1090:add-pick-layer

Conversation

@kadet1090

Copy link
Copy Markdown

This will let picked points be ordered across the scene graph independent of depth. SoPickStyle gains a layer field (default 0), carried through traversal by the new SoPickLayerElement. SoRayPickAction sorts picked points by layer (descending) and then by distance (ascending), so a higher layer always picks in front while true depth order is preserved within a layer.

The existing *_ON_TOP styles are unchanged: they ignore the layer and still sort frontmost. This replaces the previous behaviour where on-top picks collapsed their distance to 0 as the only way to bias picking to the front.

Fixes: #546

This will let picked points be ordered across the scene graph independent
of depth. SoPickStyle gains a `layer` field (default 0), carried through
traversal by the new SoPickLayerElement. SoRayPickAction sorts picked
points by layer (descending) and then by distance (ascending), so a higher
layer always picks in front while true depth order is preserved within a
layer.

The existing *_ON_TOP styles are unchanged: they ignore the layer and still
sort frontmost. This replaces the previous behaviour where on-top picks
collapsed their distance to 0 as the only way to bias picking to the front.
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.

Rendering and picking nodes on top with correct depth support

1 participant