aboutsummaryrefslogtreecommitdiff
path: root/src/shared/lua_api/phys/bhingeconstraint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/lua_api/phys/bhingeconstraint.cpp')
-rw-r--r--src/shared/lua_api/phys/bhingeconstraint.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/shared/lua_api/phys/bhingeconstraint.cpp b/src/shared/lua_api/phys/bhingeconstraint.cpp
new file mode 100644
index 0000000..168d1b6
--- /dev/null
+++ b/src/shared/lua_api/phys/bhingeconstraint.cpp
@@ -0,0 +1,50 @@
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <list>
+extern "C" {
+ #include <lua.h>
+ #include <lauxlib.h>
+ #include <lualib.h>
+}
+#include <Irrlicht.h>
+#include <btBulletDynamicsCommon.h>
+#include <shared/lua_api/phys/bhingeconstraint.hpp>
+
+using namespace irr;
+using namespace scene;
+using namespace core;
+using namespace video;
+
+extern btDiscreteDynamicsWorld* World;
+extern std::list<btRigidBody*> Objects;
+
+int newbhingeconstraint(lua_State *L){
+ return 0;
+}
+
+static const luaL_reg hingeconstraint_m[] = {
+// {"delete", delbphysbox},//client side delete needs to delete the visual representation
+ {0, 0},
+};
+
+void bhingeconstraint_register(lua_State* L){
+ lua_getglobal(L,"phys");//{}
+ lua_pushcfunction(L,newbhingeconstraint);//{},newhingeconstraint()
+ lua_setfield(L,-2,"newhingeconstraint");//{}
+
+ lua_pop(L,1);//
+
+ luaL_newmetatable(L,"phys.hingeconstraint");
+ lua_newtable(L);//phys.hingeconstraint,{}
+ luaL_register(L,NULL,hingeconstraint_m);
+ //luaL_register(L,NULL,cbphysbox_m);//phys.hingeconstraint,{}
+ lua_setfield(L,-2,"__index");//phys.physbox
+
+ lua_pop(L,1);
+
+ //printf("When registering physbox, new() is %p\n",newcbphysbox);
+ //printf("setpos is %p\n",cbphyssetpos);
+
+ lua_pop(L,1);
+}