German Larrain committed 520c7c6

model.simulator.Simulation.add_floor has a new parameter: color, with a default value

Comments (0)

Files changed (1)


 # Created on 2011.10.17
-# Last modified on 2011.11.16
+# Last modified on 2011.12.04
 # @author: german
 # TODO: attribute the code sections that were copied from somewhere else
 		name = 'axes'
 		return self.add_object(SimulatedObject(name, actor=gAxes))
-	def add_floor(self, normal=(0,1,0), dist=0, box_size = (5,0.1,5), box_center=(0,0,0)):
+	def add_floor(self, normal=(0,1,0), dist=0, box_size = (5,0.1,5), box_center=(0,0,0), color=(0.2,0.5,0.5)):
 		Create a plane geom to simulate a floor. It won't be used later explicitly.
 		Space object has a reference to it
 		# FIXME: the relation between ODE's definition of plane and the center of the box
 		self._floor_geom = phs.create_plane_geom(self._space, normal, dist) # ode.GeomPlane(self._space, normal, dist)
 		gFloor = gp.Box(box_size, box_center) #TODO: use normal parameter for orientation
+		gFloor.set_color(color)
 		name = "floor"
 		return self.add_object(SimulatedObject(name, actor=gFloor, geom=self._floor_geom))