Skip to content

Commit

Permalink
chore: removing redundant set_rotation_X functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dbirman committed Nov 3, 2023
1 parent 9ac814f commit ba381d1
Showing 1 changed file with 0 additions and 70 deletions.
70 changes: 0 additions & 70 deletions API/oursin/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,76 +175,6 @@ def set_rotation(self, rotation):
self.rotation = rotation
client.sio.emit('SetCameraRotation', {self.id: rotation})

def set_rotation_axial(self, above=True):
"""Set the camera to the standard axial view. Does not change the window, only the rotation.
Parameters
----------
above : boolean
default true, the above view
Examples
--------
>>> c1.set_rotation_axial(True)
"""
if self.in_unity == False:
raise Exception("Camera is not created. Please create camera before calling method.")

if above:
rotation = [0,0,0]
else:
rotation = [0,-180,0]
rotation = utils.sanitize_vector3(rotation)
self.rotation = rotation
client.sio.emit('SetCameraRotation', {self.id: rotation})


def set_rotation_coronal(self, back=True):
"""Set the camera to the standard coronal view. Does not change the window, only the rotation.
Parameters
----------
bool : boolean
default true, the back view
Examples
--------
>>> c1.set_rotation_coronal(True)
"""
if self.in_unity == False:
raise Exception("Camera is not created. Please create camera before calling method.")

if back:
rotation = [90,0,0]
else:
rotation = [90,-180,0]
rotation = utils.sanitize_vector3(rotation)
self.rotation = rotation
client.sio.emit('SetCameraRotation', {self.id: rotation})


def set_rotation_sagittal(self, left=True):
"""Set the camera to the standard sagittal view. Does not change the window, only the rotation.
Parameters
----------
bool : boolean
default true, the left view
Examples
--------
>>> c1.set_rotation_sagittal(True)
"""
if self.in_unity == False:
raise Exception("Camera is not created. Please create camera before calling method.")

if left:
rotation = [90,-90,0]
else:
rotation = [90,90,0]
rotation = utils.sanitize_vector3(rotation)
self.rotation = rotation
client.sio.emit('SetCameraRotation', {self.id: rotation})



def set_zoom(self,zoom):
"""Set the camera zoom.
Expand Down

0 comments on commit ba381d1

Please sign in to comment.