-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Voxel picking #11828
Voxel picking #11828
Conversation
Keep voxel data in memory for picking
Add Scene._pickVoxelCoordinate to report voxel tile and sample numbers
Voxel pick api
Many of the properties of the However, rather than documenting them separately, I think it would be a similar level of effort to rework the struct to be consistent with the already-documented Either way, I think it may be out of scope for this PR. I opened #11832 to discuss further. |
I added a local Sandcastle for testing. This should be ready for final review. |
@@ -4145,6 +4151,57 @@ Scene.prototype.pick = function (windowPosition, width, height) { | |||
return this._picking.pick(this, windowPosition, width, height); | |||
}; | |||
|
|||
/** | |||
* Returns a VoxelCell for the voxel sample rendered at a particular window coordinate, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this, as well as the VoxelCell
class, should be marked as "experimental" like the other voxel classes.
@@ -4145,6 +4151,57 @@ Scene.prototype.pick = function (windowPosition, width, height) { | |||
return this._picking.pick(this, windowPosition, width, height); | |||
}; | |||
|
|||
/** | |||
* Returns a VoxelCell for the voxel sample rendered at a particular window coordinate, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Returns a VoxelCell for the voxel sample rendered at a particular window coordinate, | |
* Returns a {@link VoxelCell} for the voxel sample rendered at a particular window coordinate, |
@jjhembd Should the Sandcastle example you have in your comment be added as a developer Sandcastle? |
@jjhembd I'm seeing some flickering when picking. Any idea what may be causing it? 2024-02-16.09-34-15.mp4 |
Thanks for the feedback @ggetz. I addressed everything except the flickering. |
@jjhembd Sure, OK to open as a separate issue, though sometime soon we'll need to understand how often it arises in order to prioritize. |
See #11841 for the flickering issue |
Thanks @jjhembd! |
Description
This PR implements picking of individual cells from a
VoxelPrimitive
.The new method
Scene.pickVoxel
returns an instance of the new classVoxelCell
. TheVoxelCell
instance exposes getters that report information about the voxel rendered at the cursor position.See the previous staging PRs:
Issue number and link
Testing plan
Author checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change