added loadPhy() to Engine::Object
git-svn-id: svn://anubis/anaglym/trunk@36 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
parent
d476eb4639
commit
cb1186d9e8
6
ag.cc
6
ag.cc
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
|
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user