fixed bug to initialize m_body to 0 in OdeWorld::Object
git-svn-id: svn://anubis/misc/OdeWorld@163 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
parent
ccb6708633
commit
0496353916
@ -87,7 +87,7 @@ OdeWorld::Object * OdeWorld::createObject(bool is_static)
|
||||
|
||||
/* push an OpenGL matrix onto the matrix stack for a given
|
||||
* ODE body position and rotation */
|
||||
void OdeWorld::pushTransform(const float pos[3], const float R[12])
|
||||
void OdeWorld::pushTransform(const dReal * pos, const dReal * R)
|
||||
{
|
||||
GLfloat matrix[16];
|
||||
matrix[0] = R[0];
|
||||
@ -115,6 +115,7 @@ OdeWorld::Object::Object(bool is_static, dWorldID world, dSpaceID space)
|
||||
m_is_static = is_static;
|
||||
m_world = world;
|
||||
m_space = space;
|
||||
m_body = 0;
|
||||
}
|
||||
|
||||
void OdeWorld::Object::setPosition(double x, double y, double z)
|
||||
@ -314,7 +315,7 @@ void OdeWorld::Object::setupGeom(dGeomID geom, dMass * mass,
|
||||
|
||||
const dReal * OdeWorld::Object::getPosition()
|
||||
{
|
||||
if (m_body != NULL)
|
||||
if (m_body != 0)
|
||||
{
|
||||
return dBodyGetPosition(m_body);
|
||||
}
|
||||
@ -327,7 +328,7 @@ const dReal * OdeWorld::Object::getPosition()
|
||||
|
||||
const dReal * OdeWorld::Object::getRotation()
|
||||
{
|
||||
if (m_body != NULL)
|
||||
if (m_body != 0)
|
||||
{
|
||||
return dBodyGetRotation(m_body);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ class OdeWorld
|
||||
friend void OdeWorld_collide_callback(void * data,
|
||||
dGeomID o1, dGeomID o2);
|
||||
|
||||
static void pushTransform(const float pos[3], const float R[12]);
|
||||
static void pushTransform(const dReal * pos, const dReal * R);
|
||||
|
||||
protected:
|
||||
dWorldID m_world;
|
||||
|
Loading…
x
Reference in New Issue
Block a user