コード例 #1
0
ファイル: search.py プロジェクト: 3nterz/navigationtask
	def setupTown(self):
		"""
		Set up virtual town landmarks
		"""
		avail_lmarks = self.town.labelledA
		avail_dmarks = self.town.distinctA
		avail_ndmarks = self.town.nondistinctA

		self.layout = generate.buildLayout(self.town.layout, avail_lmarks, avail_dmarks, avail_ndmarks)

		self.layout.addMeasurements(self.config.unitScale)

		self.layout.buildVTown(self.vr, self.config, self.landmarkTouched)

		self.layout.printEnvironment()

		all_landmarks = Pool()
		all_landmarks.extend(avail_lmarks)
		all_landmarks.extend(avail_dmarks)
		all_landmarks.extend(avail_ndmarks)
		
		if len(all_landmarks) > 0:
			self.target = all_landmarks.sample(1)[0]
			self.targetPoolDict = self.target
			self.target = self.target.name
			return True
		
		self.target = "unknown"
		return False
コード例 #2
0
ファイル: walkthrough.py プロジェクト: 3nterz/navigationtask
	def setupTown(self):
		"""
		Set up visible virtual town landmarks
		"""
		avail_lmarks = self.town.labelledA
		avail_dmarks = self.town.distinctA
		avail_ndmarks = self.town.nondistinctA
		
		self.layout = generate.buildLayout(self.town.layout, avail_lmarks, avail_dmarks, avail_ndmarks)

		self.layout.addMeasurements(self.config.unitScale)

		self.layout.buildVTown(self.vr, self.config, self.landmarkTouched)

		self.layout.printEnvironment()