Commits

German Larrain  committed 577f172

graphics: no code changes, just whitespace and comments.

  • Participants
  • Parent commits 54d827a

Comments (0)

Files changed (2)

File ars/graphics/__init__.py

 from abc import ABCMeta, abstractmethod
 
-TIMER_PERIOD = 50 # milliseconds
+TIMER_PERIOD = 50  # milliseconds
 TIMER_EVENT = 'TimerEvent'
 KEY_PRESS_EVENT = 'KeyPressEvent'
 
 	__metaclass__ = ABCMeta
 
 	@abstractmethod
-	def __init__(self, height, radius, center, rot=None, resolution = 100):
+	def __init__(self, height, radius, center, rot=None, resolution=100):
 		super(Cone, self).__init__(center, rot)
 
 
 	__metaclass__ = ABCMeta
 
 	@abstractmethod
-	def __init__(self, radius, center, rot=None, phiResolution = 50, thetaResolution = 50):
+	def __init__(self, radius, center, rot=None, phiResolution=50,
+                 thetaResolution=50):
 		super(Sphere, self).__init__(center, rot)
 
 
 			self.add_object(object_)
 
 	@abstractmethod
-	def start_window(self, on_idle_callback, on_reset_callback, on_key_press_callback):
+	def start_window(
+            self, on_idle_callback, on_reset_callback, on_key_press_callback):
 		raise NotImplementedError()
 
 	@abstractmethod

File ars/graphics/adapters.py

 	"""Graphics adapter to the Visualization Toolkit (VTK) library"""
 
 	def __init__(
-		self, title, pos=None, size=(1000, 600), zoom=1.0,
-		cam_position=(10, 8, 10), background_color=(0.1, 0.1, 0.4), **kwargs):
+            self, title, pos=None, size=(1000, 600), zoom=1.0,
+            cam_position=(10, 8, 10), background_color=(0.1, 0.1, 0.4),
+            **kwargs):
 
 		super(VtkAdapter, self).__init__()
 		self.renderer = vtk.vtkRenderer()
 	def remove_object(self, object_):
 		self.renderer.RemoveActor(object_.actor)
 
-	def start_window(self, on_idle_callback=None, on_reset_callback=None, on_key_press_callback=None):
+	def start_window(self, on_idle_callback=None, on_reset_callback=None,
+                     on_key_press_callback=None):
 		# TODO: refactor according to restart_window(), reset() and the desired behavior
 		self.on_idle_parent_callback = on_idle_callback
 		self.on_reset_parent_callback = on_reset_callback
 
 
 class Cone(VtkBody, gp.Cone):
-	def __init__(self, height, radius, center, rot=None, resolution = 20):
+	def __init__(self, height, radius, center, rot=None, resolution=20):
 		gp.Cone.__init__(self, height, radius, center, rot, resolution)
 
 		cone = vtk.vtkConeSource()
 		cone.SetHeight(height)
 		cone.SetRadius(radius)
-		cone.SetResolution(resolution) # it is the circumferential number of facets
-		# TODO: cone.SetDirection(*direction) # The vector does not have to be normalized
+		cone.SetResolution(resolution)
+		# TODO: cone.SetDirection(*direction)
+		# The vector does not have to be normalized
 
 		coneMapper = vtk.vtkPolyDataMapper()
 		coneMapper.SetInputConnection(cone.GetOutputPort())
 
 	"""
 
-	def __init__(self, radius, center, rot=None, phiResolution = 20, thetaResolution = 20):
-		gp.Sphere.__init__(self, radius, center, rot, phiResolution, thetaResolution)
+	def __init__(
+            self, radius, center, rot=None, phiResolution=20,
+			thetaResolution=20):
+		gp.Sphere.__init__(
+            self, radius, center, rot, phiResolution, thetaResolution)
 
 		sphere = vtk.vtkSphereSource()
 		sphere.SetRadius(radius)
-		sphere.SetPhiResolution(phiResolution) # it is the circumferential number of facets
+		sphere.SetPhiResolution(phiResolution)
 		sphere.SetThetaResolution(thetaResolution)
 
 		sphereMapper = vtk.vtkPolyDataMapper()