Commits

German Larrain committed 38e5fdf

collision.base.Trimesh: removed param 'center' from constructor, which was not
consistent with the other geoms.

  • Participants
  • Parent commits 6650ecb

Comments (0)

Files changed (3)

File ars/model/collision/adapters.py

 
 class Trimesh(Geom, base.Trimesh):
 
-	def __init__(self, space, vertices, faces, center):
+	def __init__(self, space, vertices, faces):
 		Geom.__init__(self)
-		base.Trimesh.__init__(self, space, vertices, faces, center)
+		base.Trimesh.__init__(self, space, vertices, faces)
 
 		self._inner_object = ode_objects_factories.create_ode_trimesh(
 			space.inner_object, vertices, faces)
-		# FIXME: setting pos here is not consistent with the other constructors
-		self.set_position(center)
 
 #==============================================================================
 # Basic Shapes

File ars/model/collision/base.py

 class Trimesh(Geom):
 
 	@abstractmethod
-	def __init__(self, space, vertices, faces, center):
+	def __init__(self, space, vertices, faces):
 		super(Trimesh, self).__init__()
 
 	@staticmethod

File ars/model/simulator/__init__.py

 
 	def add_trimesh_floor(self, vertices, faces, center=(0, 0, 0),
 			color=(0.2, 0.5, 0.5)):
-		self._floor_geom = coll.Trimesh(self._space, vertices, faces, center)
+		self._floor_geom = coll.Trimesh(self._space, vertices, faces)
+		self._floor_geom.set_position(center)
+
 		gFloor = gp.Trimesh(vertices, faces, center)
 		gFloor.set_color(color)
 		name = 'floor'