added space and joint group

git-svn-id: svn://anubis/misc/OdeWorld@142 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
josh 2009-09-26 17:10:10 +00:00
parent 754f83e639
commit 4a1ad7b56c
2 changed files with 12 additions and 1 deletions

View File

@ -4,9 +4,14 @@
OdeWorld::OdeWorld()
{
m_world = dWorldCreate();
m_space = dHashSpaceCreate(0);
m_contactJointGroup = dJointGroupCreate(0);
setGravity(0, -9.81, 0);
}
OdeWorld::~OdeWorld()
{
dJointGroupDestroy(m_contactJointGroup);
dSpaceDestroy(m_space);
dWorldDestroy(m_world);
}

View File

@ -9,9 +9,15 @@ class OdeWorld
public:
OdeWorld();
~OdeWorld();
void setGravity(float x, float y, float z)
{
dWorldSetGravity(m_world, x, y, z);
}
protected:
dWorldID m_world;
dWorldID m_world;
dSpaceID m_space;
dJointGroupID m_contactJointGroup;
};
#endif