MCPcopy Create free account
hub / github.com/BerkeleyAutomation/meshrender / V

Method V

meshrender/camera.py:81–92  ·  view source on GitHub ↗

(4,4) float: A homogenous rigid transform matrix mapping world coordinates to camera coordinates. Equivalent to the OpenGL View matrix. Note that the OpenGL camera coordinate system has x to the right, y up, and z away from the scene towards the eye!

(self)

Source from the content-addressed store, hash-verified

79
80 @property
81 def V(self):
82 """(4,4) float: A homogenous rigid transform matrix mapping world coordinates
83 to camera coordinates. Equivalent to the OpenGL View matrix.
84
85 Note that the OpenGL camera coordinate system has x to the right, y up, and z away
86 from the scene towards the eye!
87 """
88 T_camera_world_GL = self.T_camera_world.matrix.copy()
89 T_camera_world_GL[:3,2] = -T_camera_world_GL[:3,2] # Reverse Z axis
90 T_camera_world_GL[:3,1] = -T_camera_world_GL[:3,1] # Reverse Y axis;
91 T_world_camera_GL = np.linalg.inv(T_camera_world_GL)
92 return T_world_camera_GL
93
94 @property
95 def P(self):

Callers

nothing calls this directly

Calls 1

copyMethod · 0.80

Tested by

no test coverage detected