added loadPhy() to Engine::Object

git-svn-id: svn://anubis/anaglym/trunk@36 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
Josh Holtrop 2009-09-27 23:11:16 +00:00
parent d476eb4639
commit cb1186d9e8
3 changed files with 9 additions and 5 deletions

6
ag.cc
View File

@ -119,11 +119,7 @@ namespace ag
lua_setfield(L, -2, "draw"); lua_setfield(L, -2, "draw");
if (physpath != "") if (physpath != "")
{ {
/* TODO: ODE info */ g_engine->getObject(id)->loadPhy(physpath);
#if 0
dGeomID gid =
g_engine->getWorld().loadPhy(physpath);
#endif
} }
return 1; return 1;
} }

View File

@ -170,3 +170,8 @@ Engine::Object * Engine::getObject(int id)
void Engine::run() void Engine::run()
{ {
} }
void Engine::Object::loadPhy(const std::string & path, bool static_data)
{
m_geoms = g_engine->m_world.loadPhy(path, static_data);
}

View File

@ -19,8 +19,11 @@ class Engine
public: public:
WFObj * wfobj; WFObj * wfobj;
GLuint display_list; GLuint display_list;
std::vector<dGeomID> m_geoms;
void draw() { glCallList(display_list); } void draw() { glCallList(display_list); }
void loadPhy(const std::string & path,
bool static_data = false);
}; };
Engine(); Engine();