Commits

German Larrain  committed 3ad93b9

app.Program: new 'add_axes' and 'add_floor' keyword arguments in 'create_simulation' method

  • Participants
  • Parent commits 70a2d04

Comments (0)

Files changed (1)

File ars/app/__init__.py

 		self.gAdapter.reset()
 		self.create_simulation()
 
-	def create_simulation(self):
+	def create_simulation(self, add_axes=True, add_floor=True):
 		"""
 		Creates an empty simulation and:
 		-adds basic simulation objects ('add_basic_simulation_objects' method)
-		-adds axes to the visualization at the coordinates-system origin
-		-adds a floor with a defined normal vector and some visualization
+		-(if `add_axes` is True) adds axes to the visualization at the coordinates-system origin
+		-(if `add_floor` is True) adds a floor with a defined normal vector and some visualization
 		parameters
 		-calls the 'create_sim_objects' method which must be implemented by
 		subclasses
 		# set up the simulation parameters
 		self.sim = Simulation(self.FPS, self.STEPS_PER_FRAME)
 		self.sim.add_basic_simulation_objects()
-		self.sim.add_axes()
-		self.sim.add_floor(normal=(0,1,0), box_size=self.FLOOR_BOX_SIZE, color=(0.7,0.7,0.7))
+
+		if add_axes:
+			self.sim.add_axes()
+		if add_floor:
+			self.sim.add_floor(normal=(0,1,0), box_size=self.FLOOR_BOX_SIZE,
+				color=(0.7,0.7,0.7))
 
 		self.create_sim_objects()