MCPcopy Create free account
hub / github.com/ICE27182/Python-3D-renderer / rotate

Method rotate

pyrender.py:919–930  ·  view source on GitHub ↗

The values of yaw, pitch and roll here are relative, not absolute. So if you want to look left, you may set yaw as -30 and leave the other two as 0 The method will update self.rotation automatically, so don't worry about it

(self, yaw=0, pitch=0, roll=0)

Source from the content-addressed store, hash-verified

917
918
919 def rotate(self, yaw=0, pitch=0, roll=0):
920 """
921 The values of yaw, pitch and roll here are relative, not absolute.
922 So if you want to look left, you may set yaw as -30 and leave the
923 other two as 0
924 The method will update self.rotation automatically, so don't
925 worry about it
926 """
927 self.yaw += yaw
928 self.pitch += pitch
929 self.roll += roll
930 self.rotation = self.get_rotation_mat()
931
932
933

Callers

nothing calls this directly

Calls 1

get_rotation_matMethod · 0.95

Tested by

no test coverage detected