[EXPERIMENTAL] Remove ThreeDScene
and rewrite Camera
internals
#4059
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.
ThreeDScene
and moved many of its methods intoCamera
. For example,ThreeDScene.begin_ambient_camera_rotation()
becomesCamera.begin_ambient_rotation()
andThreeDScene.begin_3dillusion_camera_rotation()
becomesCamera.begin_precession()
.ThreeDScene
were changed toScene
.Camera
was rewritten to work directly with._theta
,._phi
and._gamma
angles rather than using an.orientation
quaternion which is constantly converted to a SciPyRotation
and then to a matrix, Euler angles or another quaternion.._theta
angle forCamera
is-TAU/4
instead of0
, which is more representative of its initial orientation. When increasing._phi
a bit, theCamera
is positioned over the negative Y axis, which corresponds totheta=-TAU/4
, nottheta=0
.Camera
now directly uses.focal_distance
instead of.focal_dist_to_height
. This was needed in order to correctly implement zooming.Camera
can be properly zoomed in and out. Previously, it couldn't. Scaling theCamera
used to only cause a difference in the focal distance.Reviewer Checklist