Repository navigation
fix(Camera): fix setDirectionOfProjection on a new camera - #3759
Merged
Merged
Conversation
finetjul
reviewed
Nov 16, 2026
daker
force-pushed
the
fix-camera
branch
2 times, most recently
from
November 16, 2026 16:03
824b502 to
ca65cc5
Compare
setDirectionOfProjection changed the direction, the focal point and the view plane normal, but did not call modified(). Objects that monitor the camera MTime continued to use the old view. The setter now calls modified() and returns true when the direction changes. It returns false when the direction is the same. The default values have no distance. On a new camera, the setter calculated the focal point with an undefined distance, and the focal point became NaN. If the initial values have no distance, the constructor now calculates it from the position and the focal point. The direction of projection and the view plane normal keep their initial values. Fixes Kitware#3744 Fixes Kitware#3746
|
🎉 This PR is included in version 38.0.12 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
setDirectionOfProjection changed the direction, the focal point and the view plane normal, but did not call modified(). Objects that monitor the camera MTime continued to use the old view. The setter now calls modified() and returns true when the direction changes. It returns false when the direction is the same.
The default values have no distance. On a new camera, the setter calculated the focal point with an undefined distance, and the focal point became NaN. If the initial values have no distance, the constructor now calculates it from the position and the focal point. The direction of projection and the view plane normal keep their initial values.
Fixes #3744
Fixes #3746
Results
Changes
PR Checklist