Commits

German Larrain committed b4bd8e0

physics.base: no code changes; reordered classes homogenously and defined sections.

  • Participants
  • Parent commits fa9975a

Comments (0)

Files changed (1)

ars/model/physics/base.py

 
 from . import signals
 
+#==============================================================================
+# Environment
+#==============================================================================
+
 
 class Engine(object):
 
 		"""
 		raise NotImplementedError()
 
+#==============================================================================
+# Parents
+#==============================================================================
+
 
 class Body(object):
 
 		"""Return last saved velocities (linear and angular)."""
 		return self._saved_linear_vel, self._saved_angular_vel
 
+#==============================================================================
+# Bodies
+#==============================================================================
+
 
 class Box(Body):
 
 		return self._size
 
 
-class Cone(Body):
-
-	__metaclass__ = ABCMeta
-
-	def __init__(self, height, radius, *args, **kwargs):
-		super(Cone, self).__init__(*args, **kwargs)
-		self._height = height
-		self._radius = radius
-
-	@property
-	def height(self):
-		return self._height
-
-	@property
-	def radius(self):
-		return self._radius
-
-
 class Sphere(Body):
 
 	__metaclass__ = ABCMeta
 		return self._radius
 
 
+class Capsule(Body):
+
+	__metaclass__ = ABCMeta
+
+	def __init__(self, length, radius, *args, **kwargs):
+		super(Capsule, self).__init__(*args, **kwargs)
+		self._length = length
+		self._radius = radius
+
+	@property
+	def length(self):
+		return self._length
+
+	@property
+	def radius(self):
+		return self._radius
+
+
 class Cylinder(Body):
 
 	__metaclass__ = ABCMeta
 		return self._radius
 
 
-class Capsule(Body):
+class Cone(Body):
 
 	__metaclass__ = ABCMeta
 
-	def __init__(self, length, radius, *args, **kwargs):
-		super(Capsule, self).__init__(*args, **kwargs)
-		self._length = length
+	def __init__(self, height, radius, *args, **kwargs):
+		super(Cone, self).__init__(*args, **kwargs)
+		self._height = height
 		self._radius = radius
 
 	@property
-	def length(self):
-		return self._length
+	def height(self):
+		return self._height
 
 	@property
 	def radius(self):