-
-
Notifications
You must be signed in to change notification settings - Fork 400
Glyphmapper incorrect shift scale bug #3374
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
base: master
Are you sure you want to change the base?
Conversation
sankhesh
left a comment
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.
LGTM
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.
Pull request overview
This PR fixes a bug in Glyph3DMapper where the shift-scale transformation was being incorrectly applied to glyph transformation matrices. The fix consolidates the shift-scale matrix calculation into a single source function and uses proper matrix multiplication instead of component-wise operations.
Key Changes:
- Replaced incorrect component-wise shift-scale application with proper matrix multiplication in
Glyph3DMapper - Refactored
computeInverseShiftAndScaleMatrixinto a shared helper function - Fixed GUI controller reference in ResliceCursorWidget example to use lil-gui API
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
Sources/Rendering/OpenGL/Glyph3DMapper/index.js |
Removed incorrect applyShiftScaleToMat function and replaced with proper matrix multiplication using computeInverseShiftAndScaleMatrix helper |
Sources/Rendering/OpenGL/CellArrayBufferObject/helpers.js |
Added computeInverseShiftAndScaleMatrix as an exported helper function with necessary gl-matrix imports |
Sources/Rendering/OpenGL/CellArrayBufferObject/index.js |
Refactored to import computeInverseShiftAndScaleMatrix from helpers module, removing duplicate implementation |
Sources/Widgets/Widgets3D/ResliceCursorWidget/example/index.js |
Updated GUI controller reference to store and use lil-gui controller object instead of DOM element |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
finetjul
left a comment
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.
LGTM
It would have been good to explain in git commit message why the transform was previously incorrect.
Context
The transformation matrices of each glyph should undergo the same shift-scale transform as the input points array of the
Glyph3DMapper. However, this transform was being incorrectly calculated inGlyph3DMapper. This issue was fixed by ensuring that there is a single source (function) for the calculation of the shift-scale matrix (or its inversion).Results
The glyphs are now again visible in the

ResliceCursorWidgetexample.Changes
PR and Code Checklist
npm run reformatto have correctly formatted codeTesting