Commits

German Larrain  committed 8a4d062

collision.base.NearCallbackArgs: made attributes private; added public properties;
added docstrings to class and constructor.

  • Participants
  • Parent commits c24ea3e

Comments (0)

Files changed (1)

File ars/model/collision/base.py

 
 
 class NearCallbackArgs(object):
-	"""Class to encapsulate args passed to the `near_callback` function"""
+
+	"""Data structure to save the args passed to
+	:meth:`Engine.near_callback`.
+
+	All attributes are read-only (set at initialization).
+
+	"""
 
 	def __init__(self, world=None, contact_group=None, ignore_connected=True):
-		self.world = world
-		self.contact_group = contact_group
-		self.ignore_connected = ignore_connected
+		"""Constructor.
+
+		:param world:
+		:type world: :class:`.physics.base.World`
+		:param contact_group:
+		:type contact_group: :class:`ContactGroup`
+		:param ignore_connected: whether to ignore collisions of geoms
+			whose bodies are connected, or not
+		:type ignore_connected: bool
+
+		"""
+		self._world = world
+		self._contact_group = contact_group
+		self._ignore_connected = ignore_connected
+
+	@property
+	def world(self):
+		return self._world
+
+	@property
+	def contact_group(self):
+		return self._contact_group
+
+	@property
+	def ignore_connected(self):
+		return self._ignore_connected