Commits

German Larrain committed 551bf87

collision.base.Engine: added class abstract method 'are_geoms_connected'.

  • Participants
  • Parent commits 8792ccc

Comments (0)

Files changed (1)

ars/model/collision/base.py

 		# http://docs.python.org/3/library/abc.html
 		raise NotImplementedError()
 
+	@classmethod
+	def are_geoms_connected(cls, geom1, geom2):
+		"""Return whether ``geom1``'s body is connected to ``geom2``'s body.
+
+		The *connection* is checked as whether geoms bodies are connected
+		through a joint or not.
+
+		:param geom1:
+		:type geom1: type of :attr:`Geom.inner_object`
+		:param geom2:
+		:type geom2: type of :attr:`Geom.inner_object`
+		:return: True if geoms' bodies are connected; False otherwise
+		:rtype: bool
+
+		"""
+		# Like :meth:`calc_collision`, this is a @abtractclassmethod too.
+		raise NotImplementedError()
+
 
 class Space(object):