Commits

German Larrain committed 77e5edf

Trimesh actor constructor now requires a given position.
Simulation.add_trimesh_floor constructor has a new "center" argument with a default value.

Comments (0)

Files changed (2)

ars/graphics/adapters.py

 		self._actor = assembly
 
 class Trimesh(VtkBody, gp.Trimesh):
-	def __init__(self, vertices, faces, position=None, rotation=None):
+	def __init__(self, vertices, faces, position, rotation=None):
 		super(Trimesh, self).__init__(vertices, faces, position, rotation)
 
 		# create points

ars/model/simulator/__init__.py

 #		return self.add_object(SimulatedObject(name, actor=gFloor, geom=self._floor_geom))
 		return self.add_object(SimulatedObject(name, actor=gFloor))
 	
-	def add_trimesh_floor(self, vertices, faces, color=(0.2,0.5,0.5)):
+	def add_trimesh_floor(self, vertices, faces, center=(0,0,0), color=(0.2,0.5,0.5)):
 		self._floor_geom = shapes.Trimesh(self._space, vertices, faces)
-		gFloor = gp.Trimesh(vertices, faces)
+		gFloor = gp.Trimesh(vertices, faces, center)
 		gFloor.set_color(color)
 		name = "floor"
 		return self.add_object(SimulatedObject(name, actor=gFloor))