Commits

German Larrain  committed e69a563

graphics.Adapter: changed function '_update_body(body, pos, rot)' to '_update_pose(obj, pos, rot)'.

  • Participants
  • Parent commits 4a9bb71

Comments (0)

Files changed (2)

File ars/graphics/__init__.py

 	def update_position_rotation(self, pos, rot):
 		self._position = pos
 		self._rotation = rot
-		self.adapter._update_body(self._actor, pos, rot)
+		self.adapter._update_pose(self._actor, pos, rot)
 
 	@property
 	def actor(self):
 
 	@staticmethod
 	@abstractmethod
-	def _update_body(body, pos, rot):
+	def _update_pose(obj, pos, rot):
 		raise NotImplementedError()
 
 

File ars/graphics/adapters.py

 		raise exc.ArsError()
 
 	@staticmethod
-	def _update_body(body, pos, rot):
+	def _update_pose(obj, pos, rot):
 		t = VtkAdapter._create_transform_matrix(pos, rot)
-		VtkAdapter._set_object_transform_matrix(body, t)
+		VtkAdapter._set_object_transform_matrix(obj, t)
 
 	def _timer_callback(self, obj, event):
 		self.timer_count += 1
 		boxMapper.SetInputConnection(box.GetOutputPort())
 		boxActor = vtk.vtkActor()
 
-		VtkAdapter._update_body(boxActor, pos, rot)
+		VtkAdapter._update_pose(boxActor, pos, rot)
 		boxActor.SetMapper(boxMapper)
 
 		self._actor = boxActor
 		coneMapper.SetInputConnection(cone.GetOutputPort())
 		coneActor = vtk.vtkActor()
 
-		VtkAdapter._update_body(coneActor, center, rot)
+		VtkAdapter._update_pose(coneActor, center, rot)
 		coneActor.SetMapper(coneMapper)
 
 		self._actor = coneActor
 		sphereMapper.SetInputConnection(sphere.GetOutputPort())
 		sphereActor = vtk.vtkActor()
 
-		VtkAdapter._update_body(sphereActor, center, rot)
+		VtkAdapter._update_pose(sphereActor, center, rot)
 		sphereActor.SetMapper(sphereMapper)
 
 		self._actor = sphereActor
 		cylMapper.SetInputConnection(transFilter.GetOutputPort())
 		cylActor = vtk.vtkActor()
 
-		VtkAdapter._update_body(cylActor, center, rot)
+		VtkAdapter._update_pose(cylActor, center, rot)
 		cylActor.SetMapper(cylMapper)
 
 		self._actor = cylActor
 		assembly.AddPart(sphereActor1)
 		assembly.AddPart(sphereActor2)
 
-		VtkAdapter._update_body(assembly, center, rot)
+		VtkAdapter._update_pose(assembly, center, rot)
 		self._actor = assembly
 
 
 
 		# actor: represents an object (geometry & properties) in a rendered scene
 		triangles_actor = vtk.vtkActor()
-		VtkAdapter._update_body(triangles_actor, pos, rot)
+		VtkAdapter._update_pose(triangles_actor, pos, rot)
 		triangles_actor.SetMapper(mapper)
 
 		self._actor = triangles_actor