[yt-svn] commit/yt: atmyers: Merged in jisuoqing/yt (pull request #2026)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Mar 9 09:35:28 PST 2016
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/ed7bdd893ca7/
Changeset: ed7bdd893ca7
Branch: yt
User: atmyers
Date: 2016-03-09 17:35:18+00:00
Summary: Merged in jisuoqing/yt (pull request #2026)
[bugfix] Fix incorrect opaque object scale/location due to image length-size auto-adjustment, fix #1181
Affected #: 1 file
diff -r 14b7d1b6b9060f8364cff88cc0f006a8c1a7e9e6 -r ed7bdd893ca7b317c12e02dbc915bb3840ba7320 yt/visualization/volume_rendering/lens.py
--- a/yt/visualization/volume_rendering/lens.py
+++ b/yt/visualization/volume_rendering/lens.py
@@ -91,10 +91,6 @@
super(PlaneParallelLens, self).__init__()
def _get_sampler_params(self, camera, render_source):
- # Enforce width[1] / width[0] = resolution[1] / resolution[0]
- camera.width[1] = camera.width[0] \
- * (camera.resolution[1] / camera.resolution[0])
-
if render_source.zbuffer is not None:
image = render_source.zbuffer.rgba
else:
@@ -235,6 +231,10 @@
def project_to_plane(self, camera, pos, res=None):
if res is None:
res = camera.resolution
+
+ # Enforce width[1] / width[0] = resolution[1] / resolution[0]
+ camera.width[1] = camera.width[0] * (res[1] /res[0])
+
sight_vector = pos - camera.position.d
pos1 = sight_vector
for i in range(0, sight_vector.shape[0]):
@@ -393,6 +393,11 @@
if res is None:
res = camera.resolution
+ # Enforce width[1] / width[0] = 2 * resolution[1] / resolution[0]
+ # For stereo-type lens, images for left and right eye are pasted together,
+ # so the resolution of single-eye image will be 50% of the whole one.
+ camera.width[1] = camera.width[0] * (2. * res[1] / res[0])
+
if self.disparity is None:
self.disparity = camera.width[0] / 2.e3
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list