[yt-svn] commit/yt: ngoldbaum: Merged in jisuoqing/yt (pull request #1746)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Sep 21 11:49:44 PDT 2015
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/61a5f08c0ef1/
Changeset: 61a5f08c0ef1
Branch: yt
User: ngoldbaum
Date: 2015-09-21 18:49:33+00:00
Summary: Merged in jisuoqing/yt (pull request #1746)
[BUGFIX] parameter "disparity" for stereo-type lenses can now be passed in
Affected #: 1 file
diff -r 767fa44cb5642b05fcc67711f6a23d4e7255a441 -r 61a5f08c0ef1e364c11f8b4ee36c3751e5796a34 yt/visualization/volume_rendering/lens.py
--- a/yt/visualization/volume_rendering/lens.py
+++ b/yt/visualization/volume_rendering/lens.py
@@ -263,6 +263,7 @@
def __init__(self):
super(StereoPerspectiveLens, self).__init__()
self.expand_factor = 1.5
+ self.disparity = None
def new_image(self, camera):
self.current_image = ImageArray(
@@ -279,7 +280,8 @@
# self.front_center += self.expand_factor*dl
# self.back_center -= dl
- self.disparity = camera.width[0] / 2.e3
+ if self.disparity is None:
+ self.disparity = camera.width[0] / 2.e3
if render_source.zbuffer is not None:
image = render_source.zbuffer.rgba
@@ -635,7 +637,7 @@
super(StereoSphericalLens, self).__init__()
self.radius = 1.0
self.center = None
- self.disparity = 0.
+ self.disparity = None
self.rotation_matrix = np.eye(3)
def setup_box_properties(self, camera):
@@ -644,7 +646,8 @@
self.set_viewpoint(camera)
def _get_sampler_params(self, camera, render_source):
- self.disparity = camera.width[0] / 1000.
+ if self.disparity is None:
+ self.disparity = camera.width[0] / 1000.
single_resolution_x = np.floor(camera.resolution[0])/2
px = np.linspace(-np.pi, np.pi, single_resolution_x, endpoint=True)[:,None]
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