MCPcopy Index your code
hub / github.com/ICE27182/Python-3D-renderer / set_position

Method set_position

pyrender.py:294–303  ·  view source on GitHub ↗
(self, x, y, z)

Source from the content-addressed store, hash-verified

292
293
294 def set_position(self, x, y, z):
295 for index in range(len(self.v)):
296 self.v[index][0] -= self.center[0]
297 self.v[index][1] -= self.center[1]
298 self.v[index][2] -= self.center[2]
299 self.center = [x, y, z]
300 for index in range(len(self.v)):
301 self.v[index][0] += self.center[0]
302 self.v[index][1] += self.center[1]
303 self.v[index][2] += self.center[2]
304
305
306 def rotate(self, axis, degree):

Callers 2

pymain.pyFile · 0.80
prefinal.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected