From 445a08d2e1b703d75feebe087b7722e12a93ab87 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 28 Oct 2009 15:50:45 +0000 Subject: [PATCH] calling dInitODE() and dCloseODE() properly for ODE version 0.11.1; cylinder-capsule and cylinder-cylinder collisions still not working (ODE problem); need to stop calling dGeomGetPosition() for planes; need to rework plane initialization to support creating planes with (a,b,c,d) parameters git-svn-id: svn://anubis/anaglym/trunk@136 99a6e188-d820-4881-8870-2d33a10e2619 --- anaglym.cc | 2 ++ tests/managed_objects.lua | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/anaglym.cc b/anaglym.cc index 45b1c4b..620631b 100644 --- a/anaglym.cc +++ b/anaglym.cc @@ -74,11 +74,13 @@ int main(int argc, char * argv[]) Video video; video.start(width, height, fullscreen, grab_input); + dInitODE(); g_engine = new Engine(argv[0], video); if (g_engine->load(program)) g_engine->run(); delete g_engine; video.stop(); + dCloseODE(); return 0; } diff --git a/tests/managed_objects.lua b/tests/managed_objects.lua index 871a541..d37ecfa 100644 --- a/tests/managed_objects.lua +++ b/tests/managed_objects.lua @@ -1,5 +1,7 @@ -ground = ag.createStaticPlane(0, 0, 0, 0, 0, 0) +--ground = ag.createStaticPlane(0, 0, 0, 0, 0, 0) +ground = ag.createStaticBox(1000, 1000, 1000) +ground:setPosition(0, 0, -500) ground:setColor(0.2, 1.0, 0.2) ag.setCamera(10, -10, 10, 0, 0, 0) @@ -12,9 +14,9 @@ function key_down_event(key) if (key == "b") then box = ag.createBox(1, 1, 1) init(box) --- elseif (key == "c") then --- cyl = ag.createCylinder(0.5, 1) --- init(cyl) + elseif (key == "c") then + cyl = ag.createCylinder(0.5, 1) + init(cyl) elseif (key == "a") then ccyl = ag.createCCylinder(0.5, 1) init(ccyl)