Commits

German Larrain committed 2c45517

simulator: added docstrings for setters and getters of position and rotation in
SimulatedPhysicsObject and SimulatedBody.

Comments (0)

Files changed (1)

ars/model/simulator/__init__.py

 
 	@abstractmethod
 	def get_position(self):
+		"""Get the position of the body.
+
+		:return: current position
+		:rtype: 3-sequence of floats
+
+		"""
 		pass
 
 	@abstractmethod
 	def set_position(self, position):
+		"""Set the orientation of the body.
+
+		:param position: new position
+		:type position: 3-sequence of floats
+
+		"""
 		pass
 
 	@abstractmethod
 	def get_rotation(self):
+		"""Get the orientation of the body.
+
+		:return: rotation matrix
+		:rtype: 9-sequence of floats
+
+		"""
 		pass
 
 	@abstractmethod
 	def set_rotation(self, rot_matrix):
+		"""Set the orientation of the body.
+
+		:param rot_matrix: rotation matrix
+		:type rot_matrix: 9-sequence of floats
+
+		"""
 		pass
 
 
 		return self._body
 
 	def get_position(self):
+		"""Get the position of the body.
+
+		:return: current position
+		:rtype: 3-sequence of floats
+
+		"""
 		return self._body.get_position()
 
 	def set_position(self, position):
+		"""Set the orientation of the body.
+
+		:param position: new position
+		:type position: 3-sequence of floats
+
+		"""
 		self._body.set_position(position)
 
 	def get_rotation(self):
+		"""Get the orientation of the body.
+
+		:return: rotation matrix
+		:rtype: 9-sequence of floats
+
+		"""
 		return self._body.get_rotation()
 
 	def set_rotation(self, rot_matrix):
+		"""Set the orientation of the body.
+
+		:param rot_matrix: rotation matrix
+		:type rot_matrix: 9-sequence of floats
+
+		"""
 		self._body.set_rotation(rot_matrix)
 
 	def _get_attr_in_body(self, attr, *args):