Commits

German Larrain committed 6acaf46

workaround to revert changes in 5aff0ce69e3e and keep them in this branch.

Comments (0)

Files changed (3)

ars/model/collision/adapters.py

 			space.inner_object, normal, dist)
 
 
+class Cone(OdeBasicShape, base.Cone):
+	"""Cone"""
+
+	def __init__(self):
+		super(Cone, self).__init__()
+		raise exc.ArsError("Not available in ODE")
+
+
 class NearCallbackArgs(base.NearCallbackArgs):
 	pass

ars/model/physics/adapters.py

 		self._inner_object = body
 		self.attach_geom(geom)
 
+
+class Cone(OdeBody, base.Cone):
+	def __init__(self, world, space, height, radius, mass=None, density=None):
+		OdeBody.__init__(self, world, space, mass, density)
+		base.Cone.__init__(self, height, radius, mass, density)
+		raise exc.ArsError("Not available in ODE")
+
 #==============================================================================
 # Private functions
 #==============================================================================

ars/model/simulator/__init__.py

 		name = "box" + str(center)  # FIXME
 		return self.add_object(SimulatedBody(name, body, g_box))
 
+	#===========================================================================
+	# def add_cone(self, height, radius, center, mass=None, density=None):
+	#	 body, geom = phs.createConeBodyAndGeom(self._world, self._space, density, height, radius)
+	#	 body.setPosition(center)
+	#	
+	#	 g_object = gp.Cone(height, radius, center)
+	#	 self.graphicBodies.append((body, g_object))
+	#	 return graphicObject
+	#	raise exc.ArsError("Not available in ODE")
+	#===========================================================================
+
 	def add_cylinder(self, length, radius, center, mass=None, density=None):
 		body = phs.Cylinder(self._world, self._space, length, radius, mass, density)
 		body.set_position(center)