Browse Source

Remove Shape:destroy().

With the changes to Shapes rendering them mere blocks of information with no role in the World save being attached to Bodies and discarded, Shape:destroy no longer has any justification for its continued existence. Truly, on several levels, it has been hoist with its own petard.
Bill Meltsner 13 years ago
parent
commit
e5cabe3b3f

+ 0 - 1
src/modules/physics/box2d/wrap_ChainShape.cpp

@@ -114,7 +114,6 @@ namespace box2d
 		{ "rayCast", w_Shape_rayCast },
 		{ "computeAABB", w_Shape_computeAABB },
 		{ "computeMass", w_Shape_computeMass },
-		{ "destroy", w_Shape_destroy },
 		{ 0, 0 }
 	};
 

+ 0 - 1
src/modules/physics/box2d/wrap_CircleShape.cpp

@@ -57,7 +57,6 @@ namespace box2d
 		{ "rayCast", w_Shape_rayCast },
 		{ "computeAABB", w_Shape_computeAABB },
 		{ "computeMass", w_Shape_computeMass },
-		{ "destroy", w_Shape_destroy },
 		{ 0, 0 }
 	};
 

+ 0 - 1
src/modules/physics/box2d/wrap_EdgeShape.cpp

@@ -48,7 +48,6 @@ namespace box2d
 		{ "rayCast", w_Shape_rayCast },
 		{ "computeAABB", w_Shape_computeAABB },
 		{ "computeMass", w_Shape_computeMass },
-		{ "destroy", w_Shape_destroy },
 		{ 0, 0 }
 	};
 

+ 0 - 1
src/modules/physics/box2d/wrap_PolygonShape.cpp

@@ -48,7 +48,6 @@ namespace box2d
 		{ "rayCast", w_Shape_rayCast },
 		{ "computeAABB", w_Shape_computeAABB },
 		{ "computeMass", w_Shape_computeMass },
-		{ "destroy", w_Shape_destroy },
 		{ 0, 0 }
 	};
 

+ 0 - 11
src/modules/physics/box2d/wrap_Shape.cpp

@@ -91,16 +91,6 @@ namespace box2d
 		return t->computeMass(L);
 	}
 
-	int w_Shape_destroy(lua_State * L)
-	{
-		Proxy * p = (Proxy *)lua_touserdata(L, 1);
-		p->own = false;
-
-		Shape * t = (Shape *)p->data;
-		t->release();
-		return 0;
-	}
-
 	static const luaL_Reg functions[] = {
 		{ "getType", w_Shape_getType },
 		{ "getRadius", w_Shape_getRadius },
@@ -109,7 +99,6 @@ namespace box2d
 		{ "rayCast", w_Shape_rayCast },
 		{ "computeAABB", w_Shape_computeAABB },
 		{ "computeMass", w_Shape_computeMass },
-		{ "destroy", w_Shape_destroy },
 		{ 0, 0 }
 	};
 

+ 0 - 1
src/modules/physics/box2d/wrap_Shape.h

@@ -42,7 +42,6 @@ namespace box2d
 	int w_Shape_computeAABB(lua_State * L);
 	int w_Shape_computeMass(lua_State * L);
 
-	int w_Shape_destroy(lua_State * L);
 	extern "C" int luaopen_shape(lua_State * L);
 
 } // box2d