MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _get_camera_loc

Method _get_camera_loc

lib/mpl_toolkits/mplot3d/axes3d.py:1669–1682  ·  view source on GitHub ↗

Returns the current camera location in transformed coordinates.

(self)

Source from the content-addressed store, hash-verified

1667 return coords
1668
1669 def _get_camera_loc(self):
1670 """
1671 Returns the current camera location in transformed coordinates.
1672 """
1673 cx, cy, cz, dx, dy, dz = self._get_w_centers_ranges()
1674 c = np.array([cx, cy, cz])
1675 r = np.array([dx, dy, dz])
1676
1677 if self._focal_length == np.inf: # orthographic projection
1678 focal_length = 1e9 # large enough to be effectively infinite
1679 else: # perspective projection
1680 focal_length = self._focal_length
1681 eye = c + self._view_w * self._dist * r / self._box_aspect * focal_length
1682 return eye
1683
1684 def _calc_coord(self, xv, yv, renderer=None):
1685 """

Callers 1

_calc_coordMethod · 0.95

Calls 1

_get_w_centers_rangesMethod · 0.95

Tested by

no test coverage detected