MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / get_projection_matrix

Method get_projection_matrix

mbench/render.py:39–46  ·  view source on GitHub ↗
(self, width=None, height=None)

Source from the content-addressed store, hash-verified

37 self.translation = translation
38
39 def get_projection_matrix(self, width=None, height=None):
40 P = np.eye(4)
41 P[0, 0] = self.scale[0]
42 P[1, 1] = self.scale[1]
43 P[0, 3] = self.translation[0] * self.scale[0]
44 P[1, 3] = -self.translation[1] * self.scale[1]
45 P[2, 2] = -1
46 return P
47
48def render(motions, outdir='test_vis', device_id=0, name=None, render_video=False):
49 frames, njoints, nfeats = motions.shape

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected