added space and joint group
git-svn-id: svn://anubis/misc/OdeWorld@142 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
parent
754f83e639
commit
4a1ad7b56c
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user