Skip to content

Conversation

sankhesh
Copy link
Collaborator

This change adds a model transform matrix to allow camera-level model transformations.

Context

Results

Without any model transformation, the GlyphMapper example looks like:

image

With the following model transform matrix:

const transform = vtkTransform.newInstance();
transform.scale(1, 2, 1);
renderer.getActiveCamera().setModelTransformMatrix(transform.getMatrix());
image

Adding some rotation:

transform.rotateZ(35);
image

Changes

  • Documentation and TypeScript definitions were updated to match those changes

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Testing

  • This change adds or fixes unit tests
  • Tested environment:
    • vtk.js:
    • OS:
    • Browser:

The new model transform matrix can be used for transformations like scale, shear, rotations and
translations.
Also fixed the definition for setViewMatrix.
@sankhesh sankhesh requested review from finetjul and jadh4v August 15, 2025 23:42
Copy link
Member

@finetjul finetjul left a comment

Choose a reason for hiding this comment

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

LGTM

@floryst floryst added this pull request to the merge queue Aug 20, 2025
Merged via the queue into Kitware:master with commit d84d6e8 Aug 20, 2025
2 checks passed
Copy link

🎉 This PR is included in version 34.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released Automated label label Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Automated label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants