Skip to content
New issue

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

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

Already on GitHub? # to your account

add clip plane changes #230

Merged
merged 19 commits into from
Feb 4, 2025
Merged

add clip plane changes #230

merged 19 commits into from
Feb 4, 2025

Conversation

toloudis
Copy link
Contributor

@toloudis toloudis commented Nov 19, 2024

Resolves #228
Add user clipping plane functionality.

  • Add SceneClipPlane which represents a clipping plane in the scene.
  • Add functionality to volume rendering shaders to apply the clipping plane.
  • Add ClipPlaneTool which displays a grid shape to show where the user clip plane is positioned.
  • Make sure the plane can be rotated and translated into any position in 3d space.

Also adds some basic UI for enabling, showing/hiding, and manipulating the clip plane but the UI will be more or less completely redone. See #233

Note: gh-actions build is broken on windows but due to dependencies and not this code change.

Base automatically changed from feature/refactor-for-clip-plane to main November 22, 2024 23:20
@toloudis toloudis marked this pull request as ready for review January 18, 2025 02:30
@toloudis toloudis requested a review from a team as a code owner January 18, 2025 02:30
@toloudis toloudis requested review from meganrm and ShrimpCryptid and removed request for a team January 18, 2025 02:30
Copy link
Contributor

@ShrimpCryptid ShrimpCryptid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some non-blocking comments and questions!

Comment on lines +8 to +15
ClipPlaneTool(Plane plane, glm::vec3& pos)
: ManipulationTool(0)
, m_plane(plane)
, m_pos(pos)
{
// assumes pos is in plane! if not, there will be trouble.
// assert(glm::dot(m_plane.normal, m_pos) == m_plane.d);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to like, project m_pos onto the provided plane?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the pos data stored by the clip plane tool doesn't have to precisely match the m_plane anymore. At init, I forget why I commented this out (and it may just be because I needed an epsilon). I'll have to put the code back and see why.

uses: ilammy/msvc-dev-cmd@v1
- name: windows install deps
if: matrix.os == 'windows-latest'
if: matrix.os == 'windows-2019'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these changes related to the broken build?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@@ -111,7 +111,7 @@ jobs:
cpack -D CPACK_PACKAGE_FILE_NAME=${{ matrix.artifact }}
shell: cmd
- name: Upload windows artifact
if: matrix.os == 'windows-latest'
if: matrix.os == 'windows-2019'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not blocking but it seem like you could make this a variable you can reference instead of having to change this so many places

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this is noise you can ignore because it should stabilize once tensorstore is settled again. It's just me thrashing on it. This should not be changing this often.

Copy link

@meganrm meganrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a few comments

@toloudis toloudis merged commit 2d04cb9 into main Feb 4, 2025
7 of 8 checks passed
@toloudis toloudis deleted the feature/add-clip-plane branch February 4, 2025 00:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

user clip plane
3 participants